A "JSON document", here, is described as:
For convenience, even though it's not in the JSON spec, I have included ISO8601 timestamp values as a "JSON property type".
A JProp represents the type of a scalar property within a JSON document. These are regarded separately
from the JValue type for a few important reasons:
In order to create a distinction between "a parsed JSON value" and "a reference to a location within a JSON document", it must be the case that we have another way to represent the concept of "the expected type of a value at a location within a JSON document" that is separate from "a value at a location within a JSON document, from which the type is derived".
Creating a second type was the most straightforward way to implement this behavior.
A Keypath is a data structure that stores the JSON path to a value of a given key.
Elements in a Keypath are either the name of a field, or the index of an array.
Use the functions in the Json.InElm.Keypath module to work with Keypath values.
A Node is a reprentation of part of a JSON document, along with everything that is inside of it,
along with its "key path", which is its location within a JSON document.
This means that the output of the parser will always be a single Node; but depending on the input,
that Node's JValue may have other Nodes inside of it.
Parse a raw JSON string to a Node.
Parse a Json.Decode.Value to a Node.
Parse a Json.Decode.Value to a Node, at a given KeyPath.
Create a decoder to a Node, given a Keypath.
JValueFrom a Node, get all possible Nodes.
Try to get a List (String, Node) from a JValue, where the String
value is the name of the field in the object.
NodeCombinator that allows you to build a view function that renders a Node; i.e., if you can provide all of the functions
to destructure a Node, we can display it for you!
A
JValuerepresents a typed value within a JSON document.