Class JsonSerializer
- java.lang.Object
-
- org.apache.sling.graphql.core.json.JsonSerializer
-
public class JsonSerializer extends Object
All conversions between JSON and Objects should happen in this class, in case we want to replace the underlying converter library later
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,Object>WRITER_OPTIONS
-
Constructor Summary
Constructors Constructor Description JsonSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>jsonToMaps(InputStream input)voidsendJSON(Writer out, graphql.ExecutionResult result)StringtoJSON(Object data)
-
-
-
Method Detail
-
sendJSON
public void sendJSON(Writer out, graphql.ExecutionResult result) throws IOException
- Throws:
IOException
-
jsonToMaps
public Map<String,Object> jsonToMaps(InputStream input)
-
-