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