Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including fast-json-stringify with all npm packages installed. Try it out:

const fastJson = require('..') const stringify = fastJson({ title: 'Example Schema', type: 'object', properties: { firstName: { type: 'string' }, lastName: { type: 'string' }, age: { description: 'Age in years', type: 'integer' }, now: { type: 'string' }, birthdate: { type: ['string'], format: 'date-time' }, reg: { type: 'string' }, obj: { type: 'object', properties: { bool: { type: 'boolean' } } }, arr: { type: 'array', items: { type: 'object', properties: { str: { type: 'string' } } } } }, required: ['now'], patternProperties: { '.*foo#x27;: { type: 'string' }, test: { type: 'number' }, date: { type: 'string', format: 'date-time' } }, additionalProperties: { type: 'string' } }) console.log(stringify({ firstName: 'Matteo', lastName: 'Collina', age: 32, now: new Date(), reg: /"([^"]|\\")*"/, foo: 'hello', numfoo: 42, test: 42, strtest: '23', arr: [{ str: 'stark' }, { str: 'lannister' }], obj: { bool: true }, notmatch: 'valar morghulis', notmatchobj: { a: true }, notmatchnum: 42 }))

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

fast-json-stringify v5.5.0

Stringify your JSON at max speed

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free