0.0.4 • Published 6 days ago
json2gbnf v0.0.4
JSON2GBNF
A library for parsing JSON schema definitions into .gbnf
grammar files in Javascript.
Install
npm install json2gbnf
Usage
import JSON2GBNF from 'json2gbnf';
const grammar = JSON2GBNF({
type: 'object',
properties: {
number: { type: 'number' },
street_name: { type: 'string' },
street_type: { enum: ['Street', 'Avenue', 'Boulevard'] },
},
});
console.log(grammar); // GBNF grammar