java.lang.Object
technology.sola.json.serializer.JsonSerializer
-
Constructor Summary
ConstructorsConstructorDescriptionJsonSerializer
(JsonSerializerConfig config) Creates an instance of JsonSerializer with desiredJsonSerializerConfig
. -
Method Summary
Modifier and TypeMethodDescriptionSerializes aJsonArray
to a String utilizing the currentJsonSerializerConfig
.serialize
(JsonElement jsonElement) Serializes aJsonElement
to a String utilizing the currentJsonSerializerConfig
.serialize
(JsonObject jsonObject) Serializes aJsonObject
to a String utilizing the currentJsonSerializerConfig
.
-
Constructor Details
-
JsonSerializer
Creates an instance of JsonSerializer with desiredJsonSerializerConfig
.- Parameters:
config
- the configuration for the serializer
-
-
Method Details
-
serialize
Serializes aJsonElement
to a String utilizing the currentJsonSerializerConfig
.- Parameters:
jsonElement
- theJsonElement
to serialize- Returns:
- the serialized JSON string
-
serialize
Serializes aJsonObject
to a String utilizing the currentJsonSerializerConfig
.- Parameters:
jsonObject
- theJsonObject
to serialize- Returns:
- the serialized JSON string
-
serialize
Serializes aJsonArray
to a String utilizing the currentJsonSerializerConfig
.- Parameters:
jsonArray
- theJsonArray
to serialize- Returns:
- the serialized JSON string
-