safe-json-value
is-json-value
safe-json-value | is-json-value | |
---|---|---|
13 | 1 | |
206 | 5 | |
- | - | |
7.1 | 7.2 | |
3 days ago | 14 days ago | |
JavaScript | JavaScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
safe-json-value
- ⛑️ JSON serialization should never fail
-
⛑ JSON serialization should never fail.
safe-json-value is a JavaScript library to prevent JSON.serialize() from:
- JSON serialization should never fail
is-json-value
-
⛑️ JSON serialization should never fail
That being said, when JSON serialization should indeed fail, the library above might also be useful as it provides additional insights into why it did fail: specific property path and value, and reason why it failed. I have written a [second library `is-json-value`](https://github.com/ehmicky/is-json-value) which makes it convenient to generate a list of warning messages indicating why a value is not JSON-safe.
What are some alternatives?
parse-json - Parse JSON with more helpful errors
joss - JOSS can serialize almost every JavaScript data type and data structure, so data can be seamlessly exchanged between browsers and servers (Deno or Node.js).
json-query - Retrieves values from JSON objects for data binding
derive-ts - Derive a TypeScript interface from a JavaScript object or JSON.
PEG.js - PEG.js: Parser generator for JavaScript
wild-wild-path - 🤠 Object property paths with wildcards and regexps 🌵
neat-csv - Fast CSV parser
wild-wild-utils - 🤠 Functional utilities using object property paths with wildcards and regexps 🌵
strip-css-comments - Strip comments from CSS
modern-errors - Handle errors in a simple, stable, consistent way
parse5 - HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant.
nearley - 📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.