java.lang.Object
dev.metaschema.databind.model.metaschema.binding.JsonKey
All Implemented Interfaces:
IBoundObject

@MetaschemaAssembly(formalName="JSON Key", description="Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share `json-key` values.", name="json-key", moduleClass=MetaschemaModelModule.class) public class JsonKey extends Object implements IBoundObject
Used in JSON (and similar formats) to identify a flag that will be used as the property name in an object hold a collection of sibling objects. Requires that siblings must never share json-key values.
  • Constructor Details

    • JsonKey

      public JsonKey()
      Constructs a new dev.metaschema.databind.model.metaschema.binding.JsonKey instance with no metadata.
    • JsonKey

      public JsonKey(IMetaschemaData data)
      Constructs a new dev.metaschema.databind.model.metaschema.binding.JsonKey instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public IMetaschemaData getMetaschemaData()
      Description copied from interface: IBoundObject
      Get additional Metaschema-related information for the object (i.e., resource location).
      Specified by:
      getMetaschemaData in interface IBoundObject
      Returns:
      the Metaschema-related information
    • getFlagRef

      @NonNull public String getFlagRef()
      Get the jSON Key Flag Reference.

      References the flag that will serve as the JSON key.

      Returns:
      the flag-ref value
    • setFlagRef

      public void setFlagRef(@NonNull String value)
      Set the jSON Key Flag Reference.

      References the flag that will serve as the JSON key.

      Parameters:
      value - the flag-ref value to set
    • toString

      public String toString()
      Overrides:
      toString in class Object