Registry / serialization / jsonformer

jsonformer

JSON →
library0.0.0jsnpmunverified

jsonformer is a JSON transpiler by value or schema, currently in early development (v0.0.0). It provides a lexer and parser for a custom JSON-like language with a context-free grammar. The project aims to enable transformation of JSON structures based on either literal values or schema definitions. As a very early-stage package, it is not yet feature-complete and has no stable release cadence. The library is written in TypeScript and targets both Node.js and browser environments.

npm install jsonformer
INSTALL
IMPORT
SIG · JSONFORMER
J
jsonformer
serializationjavascriptv0.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jsonformer
import jsonformer from 'jsonformer'
const jsonformer = require('jsonformer')
Default export; package may be ESM-only.
lexer
import { lexer } from 'jsonformer'
import lexer from 'jsonformer/lexer'
Named export for lexer function.
parser
import { parser } from 'jsonformer'
const parser = require('jsonformer').parser
Named export for parser function.

Shows basic usage: transpile a JSON string using default export. Note that transpile may not yet be implemented.

import jsonformer from 'jsonformer'; const code = `{ "hello": "world" }`; const result = jsonformer.transpile(code); console.log(result);
Debug
Known issues
gotchaPackage is in early development (v0.0.0). APIs are unstable and may change without notice.
fix
Do not use in production. Pin to a specific version if experimenting.
affects: 0.0.0
breakingTranspiler functionality (schema and value) is not yet implemented as per README.
fix
Use only lexer and parser for now.
affects: 0.0.0
deprecatedThe package has no published releases and may be considered abandoned by some standards.
fix
Monitor GitHub repository for updates.
affects: 0.0.0
Errors
Common errors & fixes
Cannot find module 'jsonformer'
Package not installed or not published to npm properly.
fix
Check package.json and run `npm install jsonformer`.
import jsonformer from 'jsonformer'; SyntaxError: Unexpected identifier
Using ES module syntax in a CommonJS environment.
fix
Set type: module in package.json or use .mjs extension, or switch to require().
Upgrade
Version history
0.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
jsonformer — npm install jsonformer · libregistry