awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
douglascrockford avatar

douglascrockford/JSON-js

0
View on GitHub↗
8,724 stars·4,494 forks·JavaScript·18 viewswww.JSON.org↗

JSON Js

This is a JavaScript library for parsing and serializing JSON data, with a particular focus on handling objects that contain circular references. It provides a standard JSON parser that reads text and reconstructs JavaScript values without using the eval function, guarding against code injection, alongside a standard serializer that converts objects into JSON strings for data interchange.

The library distinguishes itself by offering specialized encoding and decoding for cyclical object graphs. It can serialize objects with circular references by replacing repeated object paths with JSONPath string placeholders, and then reconstruct the original graph topology from those placeholders during parsing, enabling a lossless round-trip of complex data structures. This is achieved through recursive object traversal and stack-based cycle detection during serialization, with string interning to reduce memory overhead in deeply nested structures.

The library covers the full cycle of JSON data interchange, from safe parsing and standard serialization to the specialized handling of cyclical structures. The documentation provides the source code and usage examples for the parsing and serialization functions.

Features

  • Lossless Graph Round-Trip Serializers - Enables lossless round-trip serialization of object graphs with circular references.
  • JSON Parsers - Provides a safe JSON parser that reconstructs JavaScript values without eval, preventing code injection.
  • JSON Serialization Libraries - Converts JavaScript objects into JSON strings for data interchange and storage.
  • Cyclical JSON Decoders - Decodes JSON strings with JSONPath links to restore original object graphs with cycles intact.
  • Cyclical Structure Restorers - Restores JSON strings with JSONPath links back into original object graphs with cycles intact.
  • Cyclical Object Handlers - Handles encoding and recovery of JavaScript objects with circular references using JSONPath links.
  • JSON Parsing - Provides a standard JSON parser that reads text and reconstructs JavaScript values.
  • Eval-Free Parsers - Implements a recursive descent JSON parser that avoids eval to prevent code injection.
  • Safe Parsers - Parses JSON strings safely without eval, guarding against code injection vulnerabilities.
  • JSON Serialization - Converts in-memory objects into JSON strings for data interchange and storage.
  • JSONPath-Based Deserializers - Ships a deserializer that resolves JSONPath placeholders to restore circular object references.
  • Cyclical Structure Serializers - Provides a serializer that encodes circular references using JSONPath placeholders for lossless graph serialization.
  • Cyclical JSON Encoders - Encodes objects with circular references into JSON-safe representations using JSONPath links.
  • Cyclical Structure Encoders - Encodes objects with circular references into JSON-safe representations using JSONPath links.

Star history

Star history chart for douglascrockford/json-jsStar history chart for douglascrockford/json-js

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with JSON Js

These projects share indexed features with JSON Js. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • serde-rs/jsonserde-rs avatar

    serde-rs/json

    5,587View on GitHub↗

    This is a Rust serialization library for converting data structures to and from JSON strings and byte streams. It is built as a framework within the Serde ecosystem, providing both a strongly typed parser for compile-time safety and a recursive value tree for manipulating JSON data without a predefined schema. The project supports both typed and untyped processing. It can map JSON data into specific Rust types for schema conformity or parse input into a flexible, schemaless representation. It also includes macro-based utilities for the dynamic construction of JSON objects.

    Rustjsonrustserde
    View on GitHub↗5,587
  • johnezang/jsonkitjohnezang avatar

    johnezang/JSONKit

    6,180View on GitHub↗

    JSONKit is an Objective-C library used for parsing, serializing, and manipulating JSON data. It functions as a JSON parser that converts text into native data structures and a serializer that transforms native objects into formatted JSON text. The library includes a gzip compression wrapper that compresses serialized JSON payloads to reduce network transfer sizes and automatically detects and decompresses gzip buffers before decoding. The toolset provides capabilities for JSON parsing and serialization, supporting customizable indentation, character escaping, and flexible comment handling.

    Objective-C
    View on GitHub↗6,180
  • miloyip/json-tutorialmiloyip avatar

    miloyip/json-tutorial

    7,939View on GitHub↗

    This is an educational tutorial that walks through implementing a complete JSON library from scratch in C. The project covers the full data lifecycle of JSON, including parsing text into structured in-memory representations, validating input against the specification, serializing data back into standard JSON output, and providing structured access to elements within parsed arrays and objects. The implementation is built around a hand-written recursive descent parser that processes JSON text by matching grammar rules to build a structured data tree. Parsed values are stored in a tagged union r

    C
    View on GitHub↗7,939
  • alibaba/fastjsonalibaba avatar

    alibaba/fastjson

    25,625View on GitHub↗

    Fastjson is a Java data binding framework and serialization library designed to convert objects to JSON strings and parse JSON data into typed objects. It functions as a JSON parser and stream processor capable of transforming JSON strings into data structures. The project emphasizes high performance JSON processing and memory management, specifically through the use of a pipeline to stream oversized JSON objects and texts to prevent memory exhaustion. It provides capabilities for JSON data serialization and deserialization workflows, including custom JSON data mapping and the ability to def

    Java
    View on GitHub↗25,625
Compare all 30 related projects→

Frequently asked questions

What does douglascrockford/json-js do?

This is a JavaScript library for parsing and serializing JSON data, with a particular focus on handling objects that contain circular references. It provides a standard JSON parser that reads text and reconstructs JavaScript values without using the eval function, guarding against code injection, alongside a standard serializer that converts objects into JSON strings for data interchange.

What are the main features of douglascrockford/json-js?

The main features of douglascrockford/json-js are: Lossless Graph Round-Trip Serializers, JSON Parsers, JSON Serialization Libraries, Cyclical JSON Decoders, Cyclical Structure Restorers, Cyclical Object Handlers, JSON Parsing, Eval-Free Parsers.

Which projects share features with douglascrockford/json-js?

Projects with overlapping indexed features include: serde-rs/json — This is a Rust serialization library for converting data structures to and from JSON strings and byte streams. It is… johnezang/jsonkit — JSONKit is an Objective-C library used for parsing, serializing, and manipulating JSON data. It functions as a JSON… miloyip/json-tutorial — This is an educational tutorial that walks through implementing a complete JSON library from scratch in C. The project… json-iterator/go — This project is a high-performance JSON library for Go, serving as a replacement for the standard encoding/json… alibaba/fastjson — Fastjson is a Java data binding framework and serialization library designed to convert objects to JSON strings and… square/moshi — Moshi is a JSON serialization library and parser for Kotlin and Java. It functions as a reflectionless JSON encoder…