public class GsonElementDeclarationJsonSerializer extends Object implements ElementDeclarationJsonSerializer
ElementDeclarationJsonSerializer that uses Gson as the underlying serializer.| Constructor and Description |
|---|
GsonElementDeclarationJsonSerializer(boolean prettyPrint) |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gson.GsonBuilder |
configureGsonForElementDeclaration(com.google.gson.GsonBuilder gsonBuilder)
Configures all required
TypeAdapters for a Gson serializer to be able to serialize and deserialize instances
of ElementDeclaration |
<T extends ElementDeclaration> |
deserialize(String declaration,
Class<T> clazz)
Deserializes a JSON representation of an
ElementDeclaration, to an actual instance of it. |
String |
serialize(ElementDeclaration declaration)
Serializes an
ElementDeclaration into JSON |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultpublic GsonElementDeclarationJsonSerializer(boolean prettyPrint)
public static com.google.gson.GsonBuilder configureGsonForElementDeclaration(com.google.gson.GsonBuilder gsonBuilder)
TypeAdapters for a Gson serializer to be able to serialize and deserialize instances
of ElementDeclarationgsonBuilder - the GsonBuilder to configureGsonBuilder received.public String serialize(ElementDeclaration declaration)
ElementDeclaration into JSONserialize in interface ElementDeclarationJsonSerializerdeclaration - ElementDeclaration to be serializedString JSON representation of the ElementDeclarationpublic <T extends ElementDeclaration> T deserialize(String declaration, Class<T> clazz)
ElementDeclaration, to an actual instance of it.deserialize in interface ElementDeclarationJsonSerializerdeclaration - serialized ElementDeclarationElementDeclaration based in the JSONCopyright © 2025 MuleSoft, Inc.. All rights reserved.