JASON is a JSON-like serializer/parser that extends JSON to support objects with methods, cyclic references, Dates, RegExps, Booleans, undefined, and array holes. Current stable version 0.1.3. It uses eval() internally, making it unsafe for untrusted input. Unlike JSON, it preserves object types and allows serialization of complex JavaScript structures, but should only be used in trusted environments. No updates since 2010.
npm install JASONNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates stringify and parse of complex objects including methods, dates, undefined, and circular references.
Only use JASON with strings produced by JASON.stringify from a trusted source. Never parse untrusted input.
Avoid objects with getters or proxies when using JASON. Use a safer serializer like JSON or structured clone for such cases.
Convert Map/Set to objects or arrays before serialization. Use Symbol.for() keys with caution.
Always use JASON.parse for JASON strings and JASON.stringify for creating them.
Add 'import JASON from "JASON"' or 'const JASON = require("JASON")' at the top of the file.Use JASON.stringify instead of JSON.stringify for objects with cycles.
Use JASON.stringify and JASON.parse to preserve methods.
No dependency data recorded yet.