JSONValue
API reference
Implements Node
asBoolean- Decode a boolean from json
asInteger- Decode an integer from json
asString- Decode a string from json
contents- Return the value encoded as json
fields- List fields of the encoded object
id- A unique identifier for this JSONValue.
asArray- Decode an array from json
field- Lookup the field at the given path, and return its value.
newBoolean- Encode a boolean to json
newInteger- Encode an integer to json
newString- Encode a string to json
withContents- Return a new json value, decoded from the given content
withField- Set a new field at the given path
asBoolean: Boolean!
Decode a boolean from json
asInteger: Int!
Decode an integer from json
asString: String!
Decode a string from json
contents(pretty: Boolean = false, indent: String = " "): JSON!
Return the value encoded as json
pretty: Boolean = falsePretty-print
indent: String = " "Optional line prefix
fields: [String!]!
List fields of the encoded object
id: ID!
A unique identifier for this JSONValue.
field(path: [String!]!): JSONValue!
Lookup the field at the given path, and return its value.
path: [String!]!Path of the field to lookup, encoded as an array of field names
newBoolean(value: Boolean!): JSONValue!
Encode a boolean to json
value: Boolean!New boolean value
newInteger(value: Int!): JSONValue!
Encode an integer to json
value: Int!New integer value
withContents(contents: JSON!): JSONValue!
Return a new json value, decoded from the given content
contents: JSON!New JSON-encoded contents