char/fjson
friendly JSON implementation in TypeScript
git clone https://git.t4t.associates/char/fjson
bb03820
main
1/** 2* config format: "friendly JSON" for TypeScript :D 3* it is essentially JSON, except: 4* - the root of a document may be an "implicit map" 5* - simple ASCII identifier keys may be unquoted in maps 6* - trailing commas are permitted in maps and arrays 7* - commas can be replaced by newlines in maps and arrays 8* - strings may be single-quoted 9* - documents may contain `// comments` 10* 11* ```ts 12* import { parse, stringify } from "./mod.ts"; 13* const value = parse("name: 'demo'\nactive: true"); 14* // => { "name": "demo", "active": true } 15* ``` 16*/ 17export { FjsonError } from "./errors.ts" ; 18export type { FjsonErrorKind , Span } from "./errors.ts" ; 19export { DEFAULT_MAX_DEPTH , resolveMaxDepth } from "./options.ts" ; 20export type { Options } from "./options.ts" ; 21export { 22nodeToValue , 23parse , 24parseObject , 25parseObjectTree , 26parseTree , 27} from "./parse.ts" ; 28export { stringify } from "./stringify.ts" ; 29export { apply , applyWith } from "./apply.ts" ; 30export { Document } from "./document.ts" ; 31export type { PathSegment } from "./document.ts" ; 32export type { 33ArrayNode , 34BoolNode , 35JsonObject , 36JsonValue , 37NullNode , 38NumberNode , 39ObjectMember , 40ObjectNode , 41StringNode , 42SyntaxNode , 43} from "./parse.ts" ;