Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the regression has not already been reported
Last working version
3.0.1
Stopped working in version
4.0.0
Node.js version
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
💥 Regression Report
I think it related to the refactor of #423
Debug mode no longer work like README.md
describe.
Steps to Reproduce
const debugCompiled = fastJson({
title: 'default string',
type: 'object',
properties: {
firstName: {
type: 'string'
}
}
}, { debugMode: true })
console.log(debugCompiled) // it is an array of functions that can create your `stringify` function
console.log(debugCompiled.toString()) // print a "ready to read" string function, you can save it to a file
const rawString = debugCompiled.toString()
const stringify = fastJson.restore(rawString) // use the generated string to get back the `stringify` function
console.log(stringify({ firstName: 'Foo', surname: 'bar' })) // '{"firstName":"Foo"}'
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
No labels