public class ExtensionModelJsonSerializer extends Object
ExtensionModel into a readable and processable JSON representation and from a JSON
String to an ExtensionModel instance
Considerations:
ModelPropertys that are considered as externalizable, the ones that
ModelProperty.isPublic() returns true, will be serializedModelProperty, that can be dynamically attached to any EnrichableModel, only the
already know set of ModelProperty will be tagged with a friendly name, example: LayoutModel is going to be
identified with the display name. Otherwise, the ModelProperty will be serialized tagging it with the full
qualifier name of the class.ModelPropertys, their full qualified name will be used, if the class is not found in the
ClassLoader the ModelProperty object will be discarded| Constructor and Description |
|---|
ExtensionModelJsonSerializer()
Creates a new instance of the
ExtensionModelJsonSerializer. |
ExtensionModelJsonSerializer(boolean prettyPrint)
Creates a new instance of the
ExtensionModelJsonSerializer. |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.api.meta.model.ExtensionModel |
deserialize(String extensionModel)
Deserializes a JSON representation of an
ExtensionModel, to an actual instance of it. |
List<org.mule.runtime.api.meta.model.ExtensionModel> |
deserializeList(String extensionModelList)
Deserializes a JSON representation of a
List of ExtensionModel, to an actual instance of it. |
String |
serialize(org.mule.runtime.api.meta.model.ExtensionModel extensionModel)
Serializes an
ExtensionModel into JSON |
String |
serializeList(List<org.mule.runtime.api.meta.model.ExtensionModel> extensionModelList) |
public ExtensionModelJsonSerializer()
ExtensionModelJsonSerializer. This serializer is capable of serializing and
deserializing ExtensionModel from JSON (deserialize(String) and to JSON ( serialize(ExtensionModel)public ExtensionModelJsonSerializer(boolean prettyPrint)
ExtensionModelJsonSerializer.prettyPrint - boolean indicating if the serialization of the ExtensionModel should be printed in a human
readable or into compact and more performable formatpublic String serialize(org.mule.runtime.api.meta.model.ExtensionModel extensionModel)
ExtensionModel into JSONextensionModel - ExtensionModel to be serializedString JSON representation of the ExtensionModelpublic String serializeList(List<org.mule.runtime.api.meta.model.ExtensionModel> extensionModelList)
extensionModelList - List of ExtensionModel to be serializedString JSON representation of the List of ExtensionModelpublic org.mule.runtime.api.meta.model.ExtensionModel deserialize(String extensionModel)
ExtensionModel, to an actual instance of it.extensionModel - serialized ExtensionModelExtensionModel based in the JSONpublic List<org.mule.runtime.api.meta.model.ExtensionModel> deserializeList(String extensionModelList)
List of ExtensionModel, to an actual instance of it.extensionModelList - serialized List ExtensionModelExtensionModel based in the JSONCopyright © 2017 MuleSoft, Inc.. All rights reserved.