Parse a JSON string from a web API response into a Java object you can read and manipulate.
Build a JSON object from scratch in Java and serialize it to a string to send to an API.
Convert XML data to JSON format or JSON data to XML using the built-in conversion utilities.
Handle JSON in an Android app without adding any third-party dependencies to your project.
Add org.json as a Maven or Gradle dependency. No additional setup required, it has zero external dependencies and works with any standard Java or Android project.
JSON-java (published under the package name org.json) is a reference implementation of JSON handling for the Java programming language. JSON is a simple text format for storing and exchanging structured data, and this library gives Java programs a straightforward way to read JSON text into Java objects and to produce JSON output from Java data. It is one of the oldest and most widely referenced JSON libraries in the Java ecosystem. Beyond basic JSON parsing and generation, the library also includes converters between JSON and several other formats: XML, HTTP headers, cookies, and CDL (a comma-delimited format). These converters let you translate data between JSON and those formats without writing the conversion logic yourself. The library has no external dependencies, meaning you can include it in a project without pulling in any other libraries. It is designed to work on a wide range of Java versions, from Java 1.6 through the current Java 25, which makes it practical for projects that must support older runtimes. The project is in the public domain, which means there are no conditions on use, modification, or redistribution. No attribution is required. The README notes this can sometimes cause uncertainty for corporate legal teams and suggests referencing the Unlicense or CC0 1.0 when explaining the terms to a legal department, since those have equivalent meaning and are more widely recognized. The project is currently in a maintenance phase. Bug fixes and test coverage improvements are accepted, but significant new features are not. Build instructions cover the command line, Maven, and Gradle. A pre-built jar file is available directly from Maven Central for projects that do not want to build from source.
← stleary on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.