java.lang.Object
org.mule.runtime.extension.api.persistence.metadata.MetadataKeysResultJsonSerializer

public class MetadataKeysResultJsonSerializer extends Object
Serializer that can convert a MetadataResult of a MetadataKeysContainer type into a readable and processable JSON representation and from a JSON String to an MetadataResult instance
Since:
1.0
  • Field Details

    • gson

      protected final com.google.gson.Gson gson
  • Constructor Details

    • MetadataKeysResultJsonSerializer

      public MetadataKeysResultJsonSerializer()
    • MetadataKeysResultJsonSerializer

      public MetadataKeysResultJsonSerializer(boolean prettyPrint)
  • Method Details

    • serialize

      public String serialize(org.mule.runtime.api.metadata.resolving.MetadataResult metadataResult)
      Parameters:
      metadataResult - the MetadataResult to be serialized
      Returns:
      String JSON representation of the MetadataResult
    • deserialize

      public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> deserialize(String metadataResult)
      Deserializes a JSON representation of an MetadataResult, to an actual instance of it.
      Parameters:
      metadataResult - the serialized MetadataResult in a String JSON representation
      Returns:
      an instance of MetadataResult based on the serialized JSON