{"id":15032844,"url":"https://github.com/stleary/json-java","last_synced_at":"2026-03-11T23:03:05.531Z","repository":{"id":1249305,"uuid":"1187853","full_name":"stleary/JSON-java","owner":"stleary","description":"A reference implementation of a JSON package in Java.","archived":false,"fork":false,"pushed_at":"2025-04-18T16:48:25.000Z","size":3110,"stargazers_count":4612,"open_issues_count":27,"forks_count":2587,"subscribers_count":239,"default_branch":"master","last_synced_at":"2025-05-10T00:08:23.564Z","etag":null,"topics":["hackoberfest2023","hacktoberfest","java","json","public-domain"],"latest_commit_sha":null,"homepage":"http://stleary.github.io/JSON-java/index.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stleary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-12-21T17:46:09.000Z","updated_at":"2025-05-09T07:30:49.000Z","dependencies_parsed_at":"2023-01-13T11:03:03.170Z","dependency_job_id":"ee3b5d55-c04a-4844-a2f0-18565d35e797","html_url":"https://github.com/stleary/JSON-java","commit_stats":{"total_commits":960,"total_committers":112,"mean_commits":8.571428571428571,"dds":0.659375,"last_synced_commit":"14f71274f79ac50afb316845539f4195facc33ee"},"previous_names":["douglascrockford/json-java"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stleary%2FJSON-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stleary%2FJSON-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stleary%2FJSON-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stleary%2FJSON-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stleary","download_url":"https://codeload.github.com/stleary/JSON-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053223,"owners_count":22006717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hackoberfest2023","hacktoberfest","java","json","public-domain"],"created_at":"2024-09-24T20:19:34.248Z","updated_at":"2026-03-11T23:03:05.524Z","avatar_url":"https://github.com/stleary.png","language":"Java","readme":"![Json-Java logo](https://github.com/stleary/JSON-java/blob/master/images/JsonJava.png?raw=true)\n\n\u003csub\u003e\u003csup\u003eimage credit: Ismael Pérez Ortiz\u003c/sup\u003e\u003c/sub\u003e\n\n\nJSON in Java [package org.json]\n===============================\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.json/json.svg)](https://mvnrepository.com/artifact/org.json/json)\n[![Java CI with Maven](https://github.com/stleary/JSON-java/actions/workflows/pipeline.yml/badge.svg)](https://github.com/stleary/JSON-java/actions/workflows/pipeline.yml)\n[![CodeQL](https://github.com/stleary/JSON-java/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stleary/JSON-java/actions/workflows/codeql-analysis.yml)\n[![javadoc](https://javadoc.io/badge2/org.json/json/javadoc.svg)](https://javadoc.io/doc/org.json/json)\n\n**[Click here if you just want the latest release jar file.](https://search.maven.org/remotecontent?filepath=org/json/json/20251224/json-20251224.jar)**\n\n\n# Overview\n\n[JSON](http://www.JSON.org/) is a light-weight language-independent data interchange format.\n\nThe 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.\n\nThe files in this package implement JSON encoders and decoders. The package can also convert between JSON and XML, HTTP headers, Cookies, and CDL.\n\nProject goals include:\n* Reliable and consistent results\n* Adherence to the JSON specification \n* Easy to build, use, and include in other projects\n* No external dependencies\n* Fast execution and low memory footprint\n* Maintain backward compatibility\n* Designed and tested to use on Java versions 1.6 - 25\n\n# License Clarification\nThis project is in the public domain. This means:\n* You can use this code for any purpose, including commercial projects\n* No attribution or credit is required\n* You can modify, distribute, and sublicense freely\n* There are no conditions or restrictions whatsoever\n\nWe recognize this can create uncertainty for some corporate legal departments accustomed to standard licenses like MIT or Apache 2.0.\nIf your organization requires a named license for compliance purposes, public domain is functionally equivalent to the Unlicense or CC0 1.0, both of which have been reviewed and accepted by organizations including the Open Source Initiative and Creative Commons. You may reference either when explaining this project's terms to your legal team.\n\n\n# If you would like to contribute to this project\n\nFor more information on contributions, please see [CONTRIBUTING.md](https://github.com/stleary/JSON-java/blob/master/docs/CONTRIBUTING.md)\n\nBug 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](https://github.com/stleary/JSON-java/wiki/FAQ).\n\n# Build Instructions\n\nThe 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.\n \n**Building from the command line**\n\n*Build the class files from the package root directory src/main/java*\n```shell\njavac org/json/*.java\n```\n\n*Create the jar file in the current directory*\n```shell\njar cf json-java.jar org/json/*.class\n```\n\n*Compile a program that uses the jar (see example code below)*\n```shell\njavac -cp .;json-java.jar Test.java (Windows)\njavac -cp .:json-java.jar Test.java (Unix Systems)\n```\n\n*Test file contents*\n\n```java\nimport org.json.JSONObject;\npublic class Test {\n    public static void main(String args[]){\n       JSONObject jo = new JSONObject(\"{ \\\"abc\\\" : \\\"def\\\" }\");\n       System.out.println(jo);\n    }\n}\n```\n\n*Execute the Test file*\n```shell \njava -cp .;json-java.jar Test (Windows)\njava -cp .:json-java.jar Test (Unix Systems)\n```\n\n*Expected output*\n\n```json\n{\"abc\":\"def\"}\n```\n\n \n**Tools to build the package and execute the unit tests**\n\nExecute the test suite with Maven:\n```shell\nmvn clean test\n```\n\nExecute the test suite with Gradlew:\n\n```shell\ngradlew clean build test\n```\n\n*Optional* Execute the test suite in strict mode with Gradlew:\n\n```shell\ngradlew testWithStrictMode\n```\n\n*Optional* Execute the test suite in strict mode with Maven:\n\n```shell\nmvn test -P test-strict-mode \n```\n\n# Notes\n\nFor more information, please see [NOTES.md](https://github.com/stleary/JSON-java/blob/master/docs/NOTES.md)\n\n# Files\n\nFor more information on files, please see [FILES.md](https://github.com/stleary/JSON-java/blob/master/docs/FILES.md)\n\n# Release history:\n\nFor the release history, please see [RELEASES.md](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstleary%2Fjson-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstleary%2Fjson-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstleary%2Fjson-java/lists"}