Class EntityMetadataResultJsonSerializer
java.lang.Object
org.mule.runtime.extension.api.persistence.metadata.EntityMetadataResultJsonSerializer
Serializer that can convert a
MetadataResult of TypeMetadataDescriptor type into a readable and processable
JSON representation and from a JSON String to an MetadataResult instance- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor>deserialize(String result) Deserializes a JSON representation of anMetadataResult, to an actual instance of it.serialize(org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor> result)
-
Field Details
-
gson
protected final com.google.gson.Gson gson
-
-
Constructor Details
-
EntityMetadataResultJsonSerializer
public EntityMetadataResultJsonSerializer(boolean prettyPrint)
-
-
Method Details
-
serialize
public String serialize(org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor> result) - Parameters:
result- theMetadataResultto be serialized- Returns:
StringJSON representation of theMetadataResult
-
deserialize
public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor> deserialize(String result) Deserializes a JSON representation of anMetadataResult, to an actual instance of it.- Parameters:
result- the serializedMetadataResultin aStringJSON representation- Returns:
- an instance of
MetadataResultbased on the serialized JSON
-