Module dev.metaschema.databind
Class JsonKey
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 Summary
ConstructorsConstructorDescriptionJsonKey()Constructs a newdev.metaschema.databind.model.metaschema.binding.JsonKeyinstance with no metadata.JsonKey(IMetaschemaData data) Constructs a newdev.metaschema.databind.model.metaschema.binding.JsonKeyinstance with the specified metadata. -
Method Summary
Modifier and TypeMethodDescriptionGet the jSON Key Flag Reference.Get additional Metaschema-related information for the object (i.e., resource location).voidsetFlagRef(String value) Set the jSON Key Flag Reference.toString()
-
Constructor Details
-
JsonKey
public JsonKey()Constructs a newdev.metaschema.databind.model.metaschema.binding.JsonKeyinstance with no metadata. -
JsonKey
Constructs a newdev.metaschema.databind.model.metaschema.binding.JsonKeyinstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
Description copied from interface:IBoundObjectGet additional Metaschema-related information for the object (i.e., resource location).- Specified by:
getMetaschemaDatain interfaceIBoundObject- Returns:
- the Metaschema-related information
-
getFlagRef
Get the jSON Key Flag Reference.References the flag that will serve as the JSON key.
- Returns:
- the flag-ref value
-
setFlagRef
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
-