Documentation ¶
Overview ¶
Package jsonization de/serializes model instances to and from JSON.
We can not use one-pass deserialization for JSON since the object properties do not have fixed order, and hence we can not read `modelType` property ahead of the remaining properties.
To de-serialize, call one of the `*FromJsonable` functions.
To serialize, call ToJsonable function.
Index ¶
- func AASSubmodelElementsFromJsonable(jsonable interface{}) (result aastypes.AASSubmodelElements, err error)
- func AASSubmodelElementsToJsonable(that aastypes.AASSubmodelElements) (result string, err error)
- func AbstractLangStringFromJsonable(jsonable interface{}) (result aastypes.IAbstractLangString, err error)
- func AdministrativeInformationFromJsonable(jsonable interface{}) (result aastypes.IAdministrativeInformation, err error)
- func AnnotatedRelationshipElementFromJsonable(jsonable interface{}) (result aastypes.IAnnotatedRelationshipElement, err error)
- func AssetAdministrationShellFromJsonable(jsonable interface{}) (result aastypes.IAssetAdministrationShell, err error)
- func AssetInformationFromJsonable(jsonable interface{}) (result aastypes.IAssetInformation, err error)
- func AssetKindFromJsonable(jsonable interface{}) (result aastypes.AssetKind, err error)
- func AssetKindToJsonable(that aastypes.AssetKind) (result string, err error)
- func BasicEventElementFromJsonable(jsonable interface{}) (result aastypes.IBasicEventElement, err error)
- func BlobFromJsonable(jsonable interface{}) (result aastypes.IBlob, err error)
- func CapabilityFromJsonable(jsonable interface{}) (result aastypes.ICapability, err error)
- func ConceptDescriptionFromJsonable(jsonable interface{}) (result aastypes.IConceptDescription, err error)
- func DataElementFromJsonable(jsonable interface{}) (result aastypes.IDataElement, err error)
- func DataSpecificationContentFromJsonable(jsonable interface{}) (result aastypes.IDataSpecificationContent, err error)
- func DataSpecificationIEC61360FromJsonable(jsonable interface{}) (result aastypes.IDataSpecificationIEC61360, err error)
- func DataTypeDefXSDFromJsonable(jsonable interface{}) (result aastypes.DataTypeDefXSD, err error)
- func DataTypeDefXSDToJsonable(that aastypes.DataTypeDefXSD) (result string, err error)
- func DataTypeIEC61360FromJsonable(jsonable interface{}) (result aastypes.DataTypeIEC61360, err error)
- func DataTypeIEC61360ToJsonable(that aastypes.DataTypeIEC61360) (result string, err error)
- func DirectionFromJsonable(jsonable interface{}) (result aastypes.Direction, err error)
- func DirectionToJsonable(that aastypes.Direction) (result string, err error)
- func EmbeddedDataSpecificationFromJsonable(jsonable interface{}) (result aastypes.IEmbeddedDataSpecification, err error)
- func EntityFromJsonable(jsonable interface{}) (result aastypes.IEntity, err error)
- func EntityTypeFromJsonable(jsonable interface{}) (result aastypes.EntityType, err error)
- func EntityTypeToJsonable(that aastypes.EntityType) (result string, err error)
- func EnvironmentFromJsonable(jsonable interface{}) (result aastypes.IEnvironment, err error)
- func EventElementFromJsonable(jsonable interface{}) (result aastypes.IEventElement, err error)
- func EventPayloadFromJsonable(jsonable interface{}) (result aastypes.IEventPayload, err error)
- func ExtensionFromJsonable(jsonable interface{}) (result aastypes.IExtension, err error)
- func FileFromJsonable(jsonable interface{}) (result aastypes.IFile, err error)
- func HasDataSpecificationFromJsonable(jsonable interface{}) (result aastypes.IHasDataSpecification, err error)
- func HasExtensionsFromJsonable(jsonable interface{}) (result aastypes.IHasExtensions, err error)
- func HasKindFromJsonable(jsonable interface{}) (result aastypes.IHasKind, err error)
- func HasSemanticsFromJsonable(jsonable interface{}) (result aastypes.IHasSemantics, err error)
- func IdentifiableFromJsonable(jsonable interface{}) (result aastypes.IIdentifiable, err error)
- func KeyFromJsonable(jsonable interface{}) (result aastypes.IKey, err error)
- func KeyTypesFromJsonable(jsonable interface{}) (result aastypes.KeyTypes, err error)
- func KeyTypesToJsonable(that aastypes.KeyTypes) (result string, err error)
- func LangStringDefinitionTypeIEC61360FromJsonable(jsonable interface{}) (result aastypes.ILangStringDefinitionTypeIEC61360, err error)
- func LangStringNameTypeFromJsonable(jsonable interface{}) (result aastypes.ILangStringNameType, err error)
- func LangStringPreferredNameTypeIEC61360FromJsonable(jsonable interface{}) (result aastypes.ILangStringPreferredNameTypeIEC61360, err error)
- func LangStringShortNameTypeIEC61360FromJsonable(jsonable interface{}) (result aastypes.ILangStringShortNameTypeIEC61360, err error)
- func LangStringTextTypeFromJsonable(jsonable interface{}) (result aastypes.ILangStringTextType, err error)
- func LevelTypeFromJsonable(jsonable interface{}) (result aastypes.ILevelType, err error)
- func ModellingKindFromJsonable(jsonable interface{}) (result aastypes.ModellingKind, err error)
- func ModellingKindToJsonable(that aastypes.ModellingKind) (result string, err error)
- func MultiLanguagePropertyFromJsonable(jsonable interface{}) (result aastypes.IMultiLanguageProperty, err error)
- func OperationFromJsonable(jsonable interface{}) (result aastypes.IOperation, err error)
- func OperationVariableFromJsonable(jsonable interface{}) (result aastypes.IOperationVariable, err error)
- func PropertyFromJsonable(jsonable interface{}) (result aastypes.IProperty, err error)
- func QualifiableFromJsonable(jsonable interface{}) (result aastypes.IQualifiable, err error)
- func QualifierFromJsonable(jsonable interface{}) (result aastypes.IQualifier, err error)
- func QualifierKindFromJsonable(jsonable interface{}) (result aastypes.QualifierKind, err error)
- func QualifierKindToJsonable(that aastypes.QualifierKind) (result string, err error)
- func RangeFromJsonable(jsonable interface{}) (result aastypes.IRange, err error)
- func ReferableFromJsonable(jsonable interface{}) (result aastypes.IReferable, err error)
- func ReferenceElementFromJsonable(jsonable interface{}) (result aastypes.IReferenceElement, err error)
- func ReferenceFromJsonable(jsonable interface{}) (result aastypes.IReference, err error)
- func ReferenceTypesFromJsonable(jsonable interface{}) (result aastypes.ReferenceTypes, err error)
- func ReferenceTypesToJsonable(that aastypes.ReferenceTypes) (result string, err error)
- func RelationshipElementFromJsonable(jsonable interface{}) (result aastypes.IRelationshipElement, err error)
- func ResourceFromJsonable(jsonable interface{}) (result aastypes.IResource, err error)
- func SpecificAssetIDFromJsonable(jsonable interface{}) (result aastypes.ISpecificAssetID, err error)
- func StateOfEventFromJsonable(jsonable interface{}) (result aastypes.StateOfEvent, err error)
- func StateOfEventToJsonable(that aastypes.StateOfEvent) (result string, err error)
- func SubmodelElementCollectionFromJsonable(jsonable interface{}) (result aastypes.ISubmodelElementCollection, err error)
- func SubmodelElementFromJsonable(jsonable interface{}) (result aastypes.ISubmodelElement, err error)
- func SubmodelElementListFromJsonable(jsonable interface{}) (result aastypes.ISubmodelElementList, err error)
- func SubmodelFromJsonable(jsonable interface{}) (result aastypes.ISubmodel, err error)
- func ToJsonable(that aastypes.IClass) (result map[string]interface{}, err error)
- func ValueListFromJsonable(jsonable interface{}) (result aastypes.IValueList, err error)
- func ValueReferencePairFromJsonable(jsonable interface{}) (result aastypes.IValueReferencePair, err error)
- type DeserializationError
- type SerializationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AASSubmodelElementsFromJsonable ¶
func AASSubmodelElementsFromJsonable( jsonable interface{}, ) (result aastypes.AASSubmodelElements, err error)
Parse `jsonable` as a literal of aastypes.AASSubmodelElements, or return an error.
func AASSubmodelElementsToJsonable ¶
func AASSubmodelElementsToJsonable( that aastypes.AASSubmodelElements, ) (result string, err error)
Serialize `that` to a string, or return an error.
func AbstractLangStringFromJsonable ¶
func AbstractLangStringFromJsonable( jsonable interface{}, ) ( result aastypes.IAbstractLangString, err error, )
Parse `jsonable` as an instance of aastypes.IAbstractLangString, or return an error.
func AdministrativeInformationFromJsonable ¶
func AdministrativeInformationFromJsonable( jsonable interface{}, ) ( result aastypes.IAdministrativeInformation, err error, )
Parse `jsonable` as an instance of aastypes.IAdministrativeInformation, or return an error.
func AnnotatedRelationshipElementFromJsonable ¶
func AnnotatedRelationshipElementFromJsonable( jsonable interface{}, ) ( result aastypes.IAnnotatedRelationshipElement, err error, )
Parse `jsonable` as an instance of aastypes.IAnnotatedRelationshipElement, or return an error.
func AssetAdministrationShellFromJsonable ¶
func AssetAdministrationShellFromJsonable( jsonable interface{}, ) ( result aastypes.IAssetAdministrationShell, err error, )
Parse `jsonable` as an instance of aastypes.IAssetAdministrationShell, or return an error.
func AssetInformationFromJsonable ¶
func AssetInformationFromJsonable( jsonable interface{}, ) ( result aastypes.IAssetInformation, err error, )
Parse `jsonable` as an instance of aastypes.IAssetInformation, or return an error.
func AssetKindFromJsonable ¶
Parse `jsonable` as a literal of aastypes.AssetKind, or return an error.
func AssetKindToJsonable ¶
Serialize `that` to a string, or return an error.
func BasicEventElementFromJsonable ¶
func BasicEventElementFromJsonable( jsonable interface{}, ) ( result aastypes.IBasicEventElement, err error, )
Parse `jsonable` as an instance of aastypes.IBasicEventElement, or return an error.
func BlobFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IBlob, or return an error.
func CapabilityFromJsonable ¶
func CapabilityFromJsonable( jsonable interface{}, ) ( result aastypes.ICapability, err error, )
Parse `jsonable` as an instance of aastypes.ICapability, or return an error.
func ConceptDescriptionFromJsonable ¶
func ConceptDescriptionFromJsonable( jsonable interface{}, ) ( result aastypes.IConceptDescription, err error, )
Parse `jsonable` as an instance of aastypes.IConceptDescription, or return an error.
func DataElementFromJsonable ¶
func DataElementFromJsonable( jsonable interface{}, ) ( result aastypes.IDataElement, err error, )
Parse `jsonable` as an instance of aastypes.IDataElement, or return an error.
func DataSpecificationContentFromJsonable ¶
func DataSpecificationContentFromJsonable( jsonable interface{}, ) ( result aastypes.IDataSpecificationContent, err error, )
Parse `jsonable` as an instance of aastypes.IDataSpecificationContent, or return an error.
func DataSpecificationIEC61360FromJsonable ¶
func DataSpecificationIEC61360FromJsonable( jsonable interface{}, ) ( result aastypes.IDataSpecificationIEC61360, err error, )
Parse `jsonable` as an instance of aastypes.IDataSpecificationIEC61360, or return an error.
func DataTypeDefXSDFromJsonable ¶
func DataTypeDefXSDFromJsonable( jsonable interface{}, ) (result aastypes.DataTypeDefXSD, err error)
Parse `jsonable` as a literal of aastypes.DataTypeDefXSD, or return an error.
func DataTypeDefXSDToJsonable ¶
func DataTypeDefXSDToJsonable( that aastypes.DataTypeDefXSD, ) (result string, err error)
Serialize `that` to a string, or return an error.
func DataTypeIEC61360FromJsonable ¶
func DataTypeIEC61360FromJsonable( jsonable interface{}, ) (result aastypes.DataTypeIEC61360, err error)
Parse `jsonable` as a literal of aastypes.DataTypeIEC61360, or return an error.
func DataTypeIEC61360ToJsonable ¶
func DataTypeIEC61360ToJsonable( that aastypes.DataTypeIEC61360, ) (result string, err error)
Serialize `that` to a string, or return an error.
func DirectionFromJsonable ¶
Parse `jsonable` as a literal of aastypes.Direction, or return an error.
func DirectionToJsonable ¶
Serialize `that` to a string, or return an error.
func EmbeddedDataSpecificationFromJsonable ¶
func EmbeddedDataSpecificationFromJsonable( jsonable interface{}, ) ( result aastypes.IEmbeddedDataSpecification, err error, )
Parse `jsonable` as an instance of aastypes.IEmbeddedDataSpecification, or return an error.
func EntityFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IEntity, or return an error.
func EntityTypeFromJsonable ¶
func EntityTypeFromJsonable( jsonable interface{}, ) (result aastypes.EntityType, err error)
Parse `jsonable` as a literal of aastypes.EntityType, or return an error.
func EntityTypeToJsonable ¶
func EntityTypeToJsonable( that aastypes.EntityType, ) (result string, err error)
Serialize `that` to a string, or return an error.
func EnvironmentFromJsonable ¶
func EnvironmentFromJsonable( jsonable interface{}, ) ( result aastypes.IEnvironment, err error, )
Parse `jsonable` as an instance of aastypes.IEnvironment, or return an error.
func EventElementFromJsonable ¶
func EventElementFromJsonable( jsonable interface{}, ) ( result aastypes.IEventElement, err error, )
Parse `jsonable` as an instance of aastypes.IEventElement, or return an error.
func EventPayloadFromJsonable ¶
func EventPayloadFromJsonable( jsonable interface{}, ) ( result aastypes.IEventPayload, err error, )
Parse `jsonable` as an instance of aastypes.IEventPayload, or return an error.
func ExtensionFromJsonable ¶
func ExtensionFromJsonable( jsonable interface{}, ) ( result aastypes.IExtension, err error, )
Parse `jsonable` as an instance of aastypes.IExtension, or return an error.
func FileFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IFile, or return an error.
func HasDataSpecificationFromJsonable ¶
func HasDataSpecificationFromJsonable( jsonable interface{}, ) ( result aastypes.IHasDataSpecification, err error, )
Parse `jsonable` as an instance of aastypes.IHasDataSpecification, or return an error.
func HasExtensionsFromJsonable ¶
func HasExtensionsFromJsonable( jsonable interface{}, ) ( result aastypes.IHasExtensions, err error, )
Parse `jsonable` as an instance of aastypes.IHasExtensions, or return an error.
func HasKindFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IHasKind, or return an error.
func HasSemanticsFromJsonable ¶
func HasSemanticsFromJsonable( jsonable interface{}, ) ( result aastypes.IHasSemantics, err error, )
Parse `jsonable` as an instance of aastypes.IHasSemantics, or return an error.
func IdentifiableFromJsonable ¶
func IdentifiableFromJsonable( jsonable interface{}, ) ( result aastypes.IIdentifiable, err error, )
Parse `jsonable` as an instance of aastypes.IIdentifiable, or return an error.
func KeyFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IKey, or return an error.
func KeyTypesFromJsonable ¶
Parse `jsonable` as a literal of aastypes.KeyTypes, or return an error.
func KeyTypesToJsonable ¶
Serialize `that` to a string, or return an error.
func LangStringDefinitionTypeIEC61360FromJsonable ¶
func LangStringDefinitionTypeIEC61360FromJsonable( jsonable interface{}, ) ( result aastypes.ILangStringDefinitionTypeIEC61360, err error, )
Parse `jsonable` as an instance of aastypes.ILangStringDefinitionTypeIEC61360, or return an error.
func LangStringNameTypeFromJsonable ¶
func LangStringNameTypeFromJsonable( jsonable interface{}, ) ( result aastypes.ILangStringNameType, err error, )
Parse `jsonable` as an instance of aastypes.ILangStringNameType, or return an error.
func LangStringPreferredNameTypeIEC61360FromJsonable ¶
func LangStringPreferredNameTypeIEC61360FromJsonable( jsonable interface{}, ) ( result aastypes.ILangStringPreferredNameTypeIEC61360, err error, )
Parse `jsonable` as an instance of aastypes.ILangStringPreferredNameTypeIEC61360, or return an error.
func LangStringShortNameTypeIEC61360FromJsonable ¶
func LangStringShortNameTypeIEC61360FromJsonable( jsonable interface{}, ) ( result aastypes.ILangStringShortNameTypeIEC61360, err error, )
Parse `jsonable` as an instance of aastypes.ILangStringShortNameTypeIEC61360, or return an error.
func LangStringTextTypeFromJsonable ¶
func LangStringTextTypeFromJsonable( jsonable interface{}, ) ( result aastypes.ILangStringTextType, err error, )
Parse `jsonable` as an instance of aastypes.ILangStringTextType, or return an error.
func LevelTypeFromJsonable ¶
func LevelTypeFromJsonable( jsonable interface{}, ) ( result aastypes.ILevelType, err error, )
Parse `jsonable` as an instance of aastypes.ILevelType, or return an error.
func ModellingKindFromJsonable ¶
func ModellingKindFromJsonable( jsonable interface{}, ) (result aastypes.ModellingKind, err error)
Parse `jsonable` as a literal of aastypes.ModellingKind, or return an error.
func ModellingKindToJsonable ¶
func ModellingKindToJsonable( that aastypes.ModellingKind, ) (result string, err error)
Serialize `that` to a string, or return an error.
func MultiLanguagePropertyFromJsonable ¶
func MultiLanguagePropertyFromJsonable( jsonable interface{}, ) ( result aastypes.IMultiLanguageProperty, err error, )
Parse `jsonable` as an instance of aastypes.IMultiLanguageProperty, or return an error.
func OperationFromJsonable ¶
func OperationFromJsonable( jsonable interface{}, ) ( result aastypes.IOperation, err error, )
Parse `jsonable` as an instance of aastypes.IOperation, or return an error.
func OperationVariableFromJsonable ¶
func OperationVariableFromJsonable( jsonable interface{}, ) ( result aastypes.IOperationVariable, err error, )
Parse `jsonable` as an instance of aastypes.IOperationVariable, or return an error.
func PropertyFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IProperty, or return an error.
func QualifiableFromJsonable ¶
func QualifiableFromJsonable( jsonable interface{}, ) ( result aastypes.IQualifiable, err error, )
Parse `jsonable` as an instance of aastypes.IQualifiable, or return an error.
func QualifierFromJsonable ¶
func QualifierFromJsonable( jsonable interface{}, ) ( result aastypes.IQualifier, err error, )
Parse `jsonable` as an instance of aastypes.IQualifier, or return an error.
func QualifierKindFromJsonable ¶
func QualifierKindFromJsonable( jsonable interface{}, ) (result aastypes.QualifierKind, err error)
Parse `jsonable` as a literal of aastypes.QualifierKind, or return an error.
func QualifierKindToJsonable ¶
func QualifierKindToJsonable( that aastypes.QualifierKind, ) (result string, err error)
Serialize `that` to a string, or return an error.
func RangeFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IRange, or return an error.
func ReferableFromJsonable ¶
func ReferableFromJsonable( jsonable interface{}, ) ( result aastypes.IReferable, err error, )
Parse `jsonable` as an instance of aastypes.IReferable, or return an error.
func ReferenceElementFromJsonable ¶
func ReferenceElementFromJsonable( jsonable interface{}, ) ( result aastypes.IReferenceElement, err error, )
Parse `jsonable` as an instance of aastypes.IReferenceElement, or return an error.
func ReferenceFromJsonable ¶
func ReferenceFromJsonable( jsonable interface{}, ) ( result aastypes.IReference, err error, )
Parse `jsonable` as an instance of aastypes.IReference, or return an error.
func ReferenceTypesFromJsonable ¶
func ReferenceTypesFromJsonable( jsonable interface{}, ) (result aastypes.ReferenceTypes, err error)
Parse `jsonable` as a literal of aastypes.ReferenceTypes, or return an error.
func ReferenceTypesToJsonable ¶
func ReferenceTypesToJsonable( that aastypes.ReferenceTypes, ) (result string, err error)
Serialize `that` to a string, or return an error.
func RelationshipElementFromJsonable ¶
func RelationshipElementFromJsonable( jsonable interface{}, ) ( result aastypes.IRelationshipElement, err error, )
Parse `jsonable` as an instance of aastypes.IRelationshipElement, or return an error.
func ResourceFromJsonable ¶
Parse `jsonable` as an instance of aastypes.IResource, or return an error.
func SpecificAssetIDFromJsonable ¶
func SpecificAssetIDFromJsonable( jsonable interface{}, ) ( result aastypes.ISpecificAssetID, err error, )
Parse `jsonable` as an instance of aastypes.ISpecificAssetID, or return an error.
func StateOfEventFromJsonable ¶
func StateOfEventFromJsonable( jsonable interface{}, ) (result aastypes.StateOfEvent, err error)
Parse `jsonable` as a literal of aastypes.StateOfEvent, or return an error.
func StateOfEventToJsonable ¶
func StateOfEventToJsonable( that aastypes.StateOfEvent, ) (result string, err error)
Serialize `that` to a string, or return an error.
func SubmodelElementCollectionFromJsonable ¶
func SubmodelElementCollectionFromJsonable( jsonable interface{}, ) ( result aastypes.ISubmodelElementCollection, err error, )
Parse `jsonable` as an instance of aastypes.ISubmodelElementCollection, or return an error.
func SubmodelElementFromJsonable ¶
func SubmodelElementFromJsonable( jsonable interface{}, ) ( result aastypes.ISubmodelElement, err error, )
Parse `jsonable` as an instance of aastypes.ISubmodelElement, or return an error.
func SubmodelElementListFromJsonable ¶
func SubmodelElementListFromJsonable( jsonable interface{}, ) ( result aastypes.ISubmodelElementList, err error, )
Parse `jsonable` as an instance of aastypes.ISubmodelElementList, or return an error.
func SubmodelFromJsonable ¶
Parse `jsonable` as an instance of aastypes.ISubmodel, or return an error.
func ToJsonable ¶
Serialize “that“ instance to a JSON-able representation.
Return a structure which can be readily converted to JSON, or an error if some value could not be converted.
func ValueListFromJsonable ¶
func ValueListFromJsonable( jsonable interface{}, ) ( result aastypes.IValueList, err error, )
Parse `jsonable` as an instance of aastypes.IValueList, or return an error.
func ValueReferencePairFromJsonable ¶
func ValueReferencePairFromJsonable( jsonable interface{}, ) ( result aastypes.IValueReferencePair, err error, )
Parse `jsonable` as an instance of aastypes.IValueReferencePair, or return an error.
Types ¶
type DeserializationError ¶
type DeserializationError struct { Path *aasreporting.Path Message string }
Represent an error during the de-serialization.
Implements `error`.
func (*DeserializationError) Error ¶
func (de *DeserializationError) Error() string
func (*DeserializationError) PathString ¶
func (de *DeserializationError) PathString() string
Render the path as a string.
type SerializationError ¶
type SerializationError struct { Path *aasreporting.Path Message string }
Represent an error during the serialization.
Implements `error`.
func (*SerializationError) Error ¶
func (se *SerializationError) Error() string
func (*SerializationError) PathString ¶
func (se *SerializationError) PathString() string
Render the path as a string.