npm.io
1.1.0 • Published 5 years ago

@ts-common/json-parser

Licence
MIT
Version
1.1.0
Deps
6
Size
46 kB
Vulns
0
Weekly
0

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

Keywords