Skip to main content

Crate tabnas_json

Crate tabnas_json 

Source
Expand description

A standard JSON grammar plugin for the tabnas parsing engine.

The engine ships no grammar of its own; this crate supplies the strict, standard-JSON one. The rule set (val / map / list / pair / elem) is jsonic’s “Plain JSON” grammar, the pure-JSON core jsonic defines before extending it for the relaxed jsonic format. Here that core is installed on its own, with the lexer restricted to strict JSON and none of jsonic’s extended grammar (comments, unquoted keys, implicit objects/arrays, trailing commas, single/backtick strings, path diving).

This plugin is intended to be the foundation other tabnas grammar plugins build on: install it first, then layer additional rules on the shared val / map / list / pair / elem rules.

Structs§

JsonError
The error a failed parse produces, re-exported so callers need not depend on the engine crate directly. Mirrors the TypeScript export { TabnasError as JsonError }.

Constants§

VERSION
This crate’s version. It MUST equal ts/package.json “version”: the release orchestrator rewrites both, and tests/version_test.rs fails the build if they drift. Mirrors VERSION in ts/src/json.ts and const VERSION in go/json.go.

Functions§

json
Install the strict JSON options and the JSON rule set on parser.
make
Build a standard-JSON parser instance.
parse
Parse a JSON source string with the shared default parser.