Flatted: Circular JSON Parser
JSON →Flatted is a lightweight (0.5KB) and high-performance JavaScript library designed for serializing and deserializing JavaScript objects that contain circular references, a common limitation of standard `JSON.stringify` and `JSON.parse`. It achieves this by flattening circular structures and replacing references with unique string indices. The library maintains an API surface that mirrors the native `JSON` object, including support for `reviver` and `replacer` functions since v1, making it familiar for developers. Currently at version 3.4.2, `flatted` is actively maintained by the creator of CircularJSON, offering a stable and mature solution for handling complex object graphs. It differentiates itself by its minimal footprint and focus on speed for JSON-compatible values, providing a targeted alternative to more comprehensive serialization libraries like `structured-clone` for specific use cases.
Traffic · last 30 days ↑250% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany