public final class OperationDataJsonSerializer
extends java.lang.Object
Operation.Data response into Json representation.| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
serialize(Operation.Data data,
java.lang.String indent)
Serializes GraphQL operation response data into its equivalent Json representation.
|
static java.lang.String |
serialize(Operation.Data data,
java.lang.String indent,
ScalarTypeAdapters scalarTypeAdapters)
Serializes GraphQL operation response data into its equivalent Json representation.
|
public static java.lang.String serialize(@NotNull
Operation.Data data,
@NotNull
java.lang.String indent)
{
"data": {
"allPlanets": {
"__typename": "PlanetsConnection",
"planets": [
{
"__typename": "Planet",
"name": "Tatooine",
"surfaceWater": 1.0
}
]
}
}
}
data - GraphQL operation data to be serializedindent - the indentation string to be repeated for each level of indentation in the encoded document. Must be a string
containing only whitespace,public static java.lang.String serialize(@NotNull
Operation.Data data,
@NotNull
java.lang.String indent,
@NotNull
ScalarTypeAdapters scalarTypeAdapters)
{
"data": {
"allPlanets": {
"__typename": "PlanetsConnection",
"planets": [
{
"__typename": "Planet",
"name": "Tatooine",
"surfaceWater": 1.0
}
]
}
}
}
data - GraphQL operation data to be serializedindent - the indentation string to be repeated for each level of indentation in the encoded document. Must be a string
containing only whitespace,scalarTypeAdapters - configured instance of custom GraphQL scalar type adapters