public class JsonGeneratorImpl extends Object implements JsonGenerator
| Constructor and Description |
|---|
JsonGeneratorImpl() |
| Modifier and Type | Method and Description |
|---|---|
JsonValue |
createJsonArray(Collection<?> collection)
Create JSON array from specified collection.
|
JsonValue |
createJsonArray(Object array)
Create JSON array from specified object.
|
JsonValue |
createJsonObject(Object object)
Create JSON object from specified object.
|
JsonValue |
createJsonObjectFromMap(Map<String,?> map)
Create JSON object from specified map.
|
JsonValue |
createJsonObjectFromString(String s)
Create JSON object from specified string imply it is JSON object in String
format.
|
public JsonValue createJsonArray(Collection<?> collection) throws JsonException
collection - source collectionJsonException - if collection can't be transformed in JSON
representationpublic JsonValue createJsonArray(Object array) throws JsonException
array must
be array.array - source arrayJsonException - if array can't be transformed in JSON representationpublic JsonValue createJsonObjectFromMap(Map<String,?> map) throws JsonException
map - source mapJsonException - if map can't be transformed in JSON representationpublic JsonValue createJsonObjectFromString(String s) throws JsonException
s - source stringJsonException - if map can't be transformed in JSON representationpublic JsonValue createJsonObject(Object object) throws JsonException
createJsonObject in interface JsonGeneratorobject - source objectJsonException - if map can't be transformed in JSON representationCopyright © 2019 eXo Platform SAS. All Rights Reserved.