cloud1's answer helped me out:

Try pressing 'Reimport All Maven Projects' button. It's the first button at Maven Projects tab (blue circle). Looks like this dependency wasn't downloaded from Internet yet.

Answer from parsecer on Stack Overflow
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json
Maven Repository: org.json » json
December 24, 2025 - There are a large number of JSON packages in Java. Perhaps someday the Java community will standardize on one. Until then, choose carefully. ... aar android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle groovy io ios javascript jvm kotlin library logging maven mobile module npm osgi persistence plugin resources rlang sdk server service spring sql starter testing tools ui web webapp
🌐
Maven Central
central.sonatype.com › artifact › org.json › json
org.json:json - Maven Central
<dependency> <groupId>org.json...</version> <packaging>bundle</packaging> <name>JSON in Java</name> <description> JSON is a light-weight, language independent, data interchange format....
🌐
GitHub
github.com › provectus › kafka-ui
GitHub - provectus/kafka-ui: Open-Source Web UI for Apache Kafka Management · GitHub
There are 3 supported types of schemas: Avro®, JSON Schema, and Protobuf schemas.
Starred by 12K users
Forked by 1.4K users
Languages   Java 57.9% | TypeScript 41.2% | ANTLR 0.7% | HTML 0.1% | JavaScript 0.1% | CSS 0.0%
🌐
Maven Central
central.sonatype.com › artifact › org.json › json › 20210307
20210307 - org.json - Maven Central - Sonatype
<dependency> <groupId>org.json...</version> <packaging>bundle</packaging> <name>JSON in Java</name> <description> JSON is a light-weight, language independent, data interchange format....
🌐
Reddit
reddit.com › r/java › the curious case of json-java (org.json) and maven's dependency "hell"
r/java on Reddit: The curious case of JSON-Java (org.json) and Maven's dependency "hell"
July 19, 2025 -

Hi. I have a recurring maven(?) issue that I hope is not unique to me and has been solved by someone somewhere.

As JSON parser, I use JSON-Java (the one with package org.json), instead of more famous ones, as the DX and API feel more fit for most/all my projects.

However, from time to time, I reach a very dreadful situation, where the "version" of the JSON-Java library that is available to my code is "not" the one that I have declared in my pom.xml file. In once case, the copyright notice in the source that I could see by clicking the class name in VSCode was from 2010, with the painful difference to the modern version that all parsing methods threw checked exceptions. In another instance, the JSONArray class did not implement Iterable/Iterator where in modern versions it does.

This is likely a maven transitive dependency issue, but the reason it is so visible for this particular library, is because either many libraries already have their own dependency on it, or that it's interface has evolved quite significantly along the way. Likely both.

The solution "in the book" for this is apparently to do "mvn dependency:tree" and exclude JSON-Java explicitly from other dependencies that depend on it. But it doesn't work for me! In my dependency three, only the recent version that is in my own pom file is shown, whereas in code/IDE (VSCode + IntelliJ), I can only use the old version. My deployment involves building a fat Jar, so it happens there too.

Am I doing something wrong? Is there a proven way to make only a certain version of a dependency available to my code, regardless of other versions that may be present deeper in the class path? Does the order of dependencies in pom file matter? and how can I strictly control the versions of dependencies that appear in my fat jar, in case it is possible at all?

Many thanks

Find elsewhere
🌐
GitHub
github.com › stleary › JSON-java
GitHub - stleary/JSON-java: A reference implementation of a JSON package in Java. · GitHub
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.
Starred by 4.7K users
Forked by 2.6K users
Languages   Java
🌐
Maven Repository
mvnrepository.com › artifact › org.json › JSON-Java › 1.0 › dependencies
Maven Repository: org.json » JSON-Java » 1.0 - Dependencies
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. ... aar android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle groovy io ios ...
🌐
TutorialsPoint
tutorialspoint.com › org_json › org_json_quick_guide.htm
Org.Json - Quick Guide
Download the latest version of org.json jar file from org.json @ MVNRepository.
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json › 3.1
Maven Repository: org.json » json » 3.1
December 4, 2014 - There are a large number of JSON packages in Java. Perhaps someday the Java community will standardize on one. Until then, choose carefully. ... Note: this artifact is located at PentahoOmni repository (https://nexus.pentaho.org/content/groups/omni/) ... aar android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle groovy io ios javascript jvm kotlin library logging maven ...
Published   Dec 04, 2014
Version   3.1
🌐
GitLab
advisories.gitlab.com › pkg › maven › org.json › json
Maven/Org.json/Json | GitLab Advisory Database
Denial of Service attacks are possible through decoding crafted JSON data triggering a java.lang.OutOfMemoryError exception. A stack overflow in the org.json.JSONTokener.nextValue::JSONTokener.java component of allows attackers to cause a Denial of Service (DoS) via crafted JSON data.
🌐
Baeldung
baeldung.com › home › json › introduction to json-java (org.json)
Introduction to JSON-Java (org.json)
June 20, 2025 - We use classes from the JSON-Java library to parse and manipulate JSON in Java. We also know this library as org.json.
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json › used-by
Maven Repository: org.json » json - Used By
Library for writing tests that checks JSON documents (useful for testing responses from REST services). ... A library jar that provides APIs for Applications written for the Google Android Platform. ... aar android apache api arm assets build build-system bundle client clojure cloud config ...
🌐
SourceForge
json-lib.sourceforge.net
Maven - Json-lib::Welcome
Json.org | Maven 2 · Introduction ... FAQ · Changes · Javadoc (jdk13) Javadoc (jdk15) JSON-lib is a java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans and DynaBeans....
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json › books
Maven Repository: org.json » json - Books
There are a large number of JSON packages in Java. Perhaps someday the Java community will standardize on one. Until then, choose carefully. ... aar android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle groovy io ios javascript jvm kotlin library logging maven ...
🌐
Maven Repository
mvnrepository.com › artifact › org.json › JSON-Java
Maven Repository: org.json » JSON-Java
June 15, 2025 - JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. ... aar android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle groovy io ios ...