JSON.isRawJSON() checks whether a value is a raw JSON object created by JSON.rawJSON(), helping avoid double serialization in data pipelines.
Reference
JSON
JSON parsing and stringification.
- JSON.isRawJSON()
- JSON.parse()
JSON.parse() converts a JSON string into a JavaScript value. Covers the reviver function, common errors, prototype pollution, and number precision handling.
- JSON.rawJSON()
JSON.rawJSON() wraps a JSON primitive so JSON.stringify emits it verbatim. Use it for lossless 64-bit integers, exact unicode escapes, and tricky JS cases.
- JSON.stringify()
Use JSON.stringify() to convert JavaScript values to JSON strings, with replacer and space parameters for filtering properties and pretty-printing output.