You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON is a light-weight language-independent data interchange format.
The JSON-Java package is a reference implementation that demonstrates how to parse JSON documents into Java objects and how to generate new JSON documents from the Java classes.
Project goals include:
Reliable and consistent results
Adherence to the JSON specification
Easy to build, use, and include in other projects
No external dependencies
Fast execution and low memory footprint
Maintain backward compatibility
Designed and tested to use on Java versions 1.6 - 21
The files in this package implement JSON encoders and decoders. The package can also convert between JSON and XML, HTTP headers, Cookies, and CDL.
If you would like to contribute to this project
For more information on contributions, please see CONTRIBUTING.md
Bug fixes, code improvements, and unit test coverage changes are welcome! Because this project is currently in the maintenance phase, the kinds of changes that can be accepted are limited. For more information, please read the FAQ.
Build Instructions
The org.json package can be built from the command line, Maven, and Gradle. The unit tests can be executed from Maven, Gradle, or individually in an IDE e.g. Eclipse.
Building from the command line
Build the class files from the package root directory src/main/java
javac org/json/*.java
Create the jar file in the current directory
jar cf json-java.jar org/json/*.class
Compile a program that uses the jar (see example code below)