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)
void
sendJSON(Writer out, graphql.ExecutionResult result)
String
toJSON(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)
-
-