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 aJsonArrayto a String using the currentJsonSerializerConfig.serialize(JsonElement jsonElement) Serializes aJsonElementto a String using the currentJsonSerializerConfig.serialize(JsonObject jsonObject) Serializes aJsonObjectto a String using the currentJsonSerializerConfig.
-
Constructor Details
-
JsonSerializer
Creates an instance of JsonSerializer with desiredJsonSerializerConfig.- Parameters:
config- the configuration for the serializer
-
-
Method Details
-
serialize
Serializes aJsonElementto a String using the currentJsonSerializerConfig.- Parameters:
jsonElement- theJsonElementto serialize- Returns:
- the serialized JSON string
-
serialize
Serializes aJsonObjectto a String using the currentJsonSerializerConfig.- Parameters:
jsonObject- theJsonObjectto serialize- Returns:
- the serialized JSON string
-
serialize
Serializes aJsonArrayto a String using the currentJsonSerializerConfig.- Parameters:
jsonArray- theJsonArrayto serialize- Returns:
- the serialized JSON string
-