Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 727 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 727 Bytes

JSON Parser

Build Status

JSON Parser with a source map.

Next Design

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