JSON Parser with a source map.
type TrackedJsonCommon = {
// ...position, directives, raw value, kind, etc...
}
type TrackedJsonObject = {
kind: "object"
readonly properties: StringMap<TrackedJson>
} & TrackedJsonCommon
type TrackedJsonArray = {
kind: "array"
readonly items: ReadonlyArray<TrackedJson>
} & TrackedJsonCommon
type TrackedJsonPrimitive = {
kind: "string"|"number"|"null"|"boolean"
} & TrackedJsonCommon
type TrackedJson = TrackedJsonObject|TrackedJsonArray|TrackedJsonPrimitive