flatted is a compact serialization library for JavaScript data that contains circular or repeated object references. It provides parse and stringify functions with an interface modeled after the native JSON API. During serialization, objects, arrays, and strings are flattened into indexed entries, allowing the parser to rebuild the original reference graph later. The package also includes toJSON and fromJSON helpers for classes that need recursive data to survive standard JSON workflows. It supports ESM, CommonJS, and CDN delivery, with related implementations available for PHP, Python, and Go. Flatted only handles JSON-compatible values, so specialized objects and internal runtime resources require a different serialization strategy.

Features

  • Circular reference serialization
  • Repeated reference preservation
  • JSON-style parse and stringify APIs
  • Replacer, reviver, and spacing parameters
  • toJSON and fromJSON helpers
  • ESM, CommonJS, and CDN compatibility

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

ISC License

Follow flatted

flatted Web Site

Other Useful Business Software
Build Agents and Models on One Platform Icon
Build Agents and Models on One Platform

Everything you need to build production-ready agents and models. Access 200+ Google and third-party AI models and tools.

Gemini Enterprise Agent Platform is Google Cloud's comprehensive platform for developers to build, scale, govern, and optimize agents and models. Choose from Google's most advanced models and third-party models like Anthropic's Claude Model Family.
Try It Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of flatted!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript JSON Software

Registered

2026-07-14