LLMpediaThe first transparent, open encyclopedia generated by LLMs

org.json

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Gson Hop 4
Expansion Funnel Raw 46 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted46
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
org.json
Nameorg.json
DeveloperDouglas Crockford
Released2001
Programming languageJava
Operating systemCross-platform
LicenseVarious (see Licensing and Distribution)
GenreData interchange library

org.json org.json is a lightweight Java library for parsing, generating, transforming, and querying JSON data. It was authored and popularized by Douglas Crockford and distributed in simple source form that made it widely used across Apache Software Foundation projects, Eclipse Foundation tooling, Android (operating system), and numerous corporate and academic systems. The library's compact API and minimal dependencies established it as a common utility in server-side frameworks, client libraries, embedded devices, and enterprise middleware.

History

org.json originated from the early 2000s efforts to standardize JavaScript Object Notation as a language-agnostic interchange format championed by Douglas Crockford, who had earlier written about JSON in the context of Netscape Communications Corporation and the emergence of web APIs. The code was released in simple Java source form and gained adoption through references in technical blogs, conference talks at events such as JavaOne and O'Reilly Media summits, and inclusion in open projects hosted by organizations like SourceForge and GitHub. Over time, the library was packaged into distributions by third parties and embedded into large ecosystems including Android (operating system), Apache Tomcat, and numerous commercial products. Legal and licensing discussions arose when distributors repackaged the source, prompting scrutiny from communities around the Free Software Foundation and corporate legal departments.

Features

org.json offers core features focused on JSON fundamentals: creation and parsing of JSON objects and arrays, conversions between textual JSON and in-memory representations, and simple serialization. The library provides concrete classes for JSON object composition and manipulation compatible with data models used by frameworks such as Java Platform, Standard Edition, Spring Framework, Hibernate ORM, and Jakarta EE. It emphasizes a small binary and source footprint favored in constrained environments like Android (operating system) devices and embedded systems used in projects by vendors such as Oracle Corporation and IBM. The implementation follows the JSON data model described in the IETF JSON work that influenced standards bodies like W3C and IETF Internet community. org.json also supports basic tokenization and utility helpers that are commonly employed in tooling from vendors such as Apache Software Foundation and Red Hat.

API and Usage

The API is intentionally minimalistic: primary types include mutable JSON object and array classes that expose methods to put, get, remove, and iterate over entries. Typical usage patterns appear in web frameworks such as Spring Framework controllers, servlet implementations in Apache Tomcat, and REST clients interacting with services described by OpenAPI Initiative specifications. Examples of integration patterns appear in build tools like Maven and Gradle when projects include the library as a dependency, and in continuous integration pipelines using Jenkins or Travis CI. Because the code is plain Java source, developers often adapt it in proprietary systems at companies like Google, Microsoft, and Facebook for internal tooling or data interchange layers. The API does not include advanced features such as JSON Schema validation or streaming models comparable to offerings from Jackson (project) or Gson (library), focusing instead on direct in-memory manipulation.

Licensing and Distribution

Licensing has been a notable aspect of org.json's history. The original source was distributed with a permissive notice by Douglas Crockford, but subsequent repackagings and modifications led to multiple license declarations when vendors or maintainers published jars to repositories like Maven Central or Bintray. This resulted in discussions among legal teams at organizations including Apache Software Foundation, Eclipse Foundation, and corporate contributors regarding compatibility with permissive and copyleft licenses such as those maintained by the Free Software Foundation. Some distributions adopted explicitly permissive licenses to facilitate inclusion in projects from Red Hat, IBM, and other enterprise vendors, while forks emerged to clarify terms for package managers and build systems.

Reception and Criticism

org.json has been praised for its simplicity and suitability for embedded or minimal-footprint use in products from companies such as Apple Inc. and Samsung Electronics. Critics, including contributors to projects like Jackson (project) and Gson (library), have pointed to limitations: lack of streaming parsing, absence of comprehensive type binding like in JAXB, and sparse error reporting compared with more feature-rich libraries used in frameworks like Spring Framework and Micronaut. The licensing ambiguity around repackaging also drew critique from legal teams at organizations such as Red Hat and Canonical (company), prompting forks and alternative distributions. Security researchers associated with institutions such as CERT and university labs have assessed lightweight JSON parsers including org.json for robustness against malformed inputs and resource exhaustion.

Alternatives and Implementations

Developers often choose alternatives based on needs: Jackson (project) for performance and advanced data binding, Gson (library) for flexible object mapping, JSON.simple for minimal footprints, and streaming parsers in projects like javax.json (JSON-P) or Jsoniter. Enterprise platforms including Spring Framework, Quarkus, and Micronaut frequently provide first-class support for these alternatives. Other implementations and forks maintained on platforms such as GitHub and GitLab provide compatibility layers, additional features, or clarified licensing suitable for integration into distributions maintained by Debian and Fedora Project packagers.

Category:Java (programming language) libraries