If you are using Json-simple, use the below maven dependency.

<dependency>
    <groupId>com.googlecode.json-simple</groupId>
    <artifactId>json-simple</artifactId>
    <version>1.1</version>
</dependency>

Link: https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1

Answer from rahulnikhare on Stack Overflow
🌐
Jar-Download
jar-download.com › home › com.googlecode.json-simple › json-simple › 1.1.1 › source code › jsonparser.java
org.json.simple.parser.JSONParser Maven / Gradle / Ivy
Maven · Gradle · Ivy · SBT · /* * $Id: JSONParser.java,v 1.1 2006/04/15 14:10:48 platform Exp $ * Created on 2006-4-15 */ package org.json.simple.parser; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.json.simple.JSONArray; import org.json.simple.JSONObject; /** * Parser for JSON text.
🌐
Jar-download
jar-download.com › maven-repository-class-search.php
Download dependencies for java class org.json.simple.parser.JSONParser
Here you can download the dependencies for the java class org.json.simple.parser.JSONParser. Use this engine to looking through the maven repository.
Discussions

java - Looking for JsonParser dependency - Stack Overflow
Simply search for it on google or mavencentral. ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 0 Need Jar file to read JSON array returned in response, having all these three types JSONObject,JSONParse,JSONArray More on stackoverflow.com
🌐 stackoverflow.com
java - org.json.simple cannot be resolved - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
🌐 stackoverflow.com
junit - Gradle dependency json-simple error - Stack Overflow
I'm fairly new to Gradle so I'm trying to build a Java project and not sure about the dependencies. I have never gotten Gradle configured to be able to do my tests or now a jar file to compile and... More on stackoverflow.com
🌐 stackoverflow.com
java - Read JSON file with JSONParser not available in the jarfile - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
🌐 stackoverflow.com
🌐
DigitalOcean
digitalocean.com › community › tutorials › json-simple-example
json-simple example | DigitalOcean
August 4, 2022 - package com.journaldev.json.write; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.Iterator; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; public class JsonSimpleReader { public static void main(String[] args) throws ParseException, FileNotFoundException, IOException { JSONParser parser = new JSONParser(); Reader reader = new FileReader("data.json"); Object jsonObj = parser.parse(reader); JSONObject j
🌐
Maven Repository
mvnrepository.com › artifact › com.googlecode.json-simple › json-simple › 1.1
Maven Repository: com.googlecode.json-simple » json-simple » 1.1
Indexed Artifacts (63.6M) · Popular Categories · Testing Frameworks & Tools · Android Packages · JVM Languages · Logging Frameworks · Java Specifications · JSON Libraries · Core Utilities · Mocking
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json
Maven Repository: org.json » json
December 24, 2025 - JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write · JSON is a light-weight, language independent, data interchange format. See http://www.JSON.org/ The files in this package implement JSON encoders/decoders in Java.
🌐
Java2s
java2s.com › Open-Source › Maven_Repository › JSON › json-simple › json_simple_1_1_1.htm
Maven Repository - POM file for JSON json-simple 1.1.1 1.1.1
maven-source-plugin · The following packages are defined in the json-simple-1.1.1.jar · org.json.simple org.json.simple.parser · Here is the content of the POM file.
Find elsewhere
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json-simple
Maven Repository: org.json » json-simple
Indexed Artifacts (63.6M) · Popular Categories · Testing Frameworks & Tools · Android Packages · JVM Languages · Logging Frameworks · Java Specifications · JSON Libraries · Core Utilities · Mocking
🌐
Google Groups
groups.google.com › g › jsonpath › c › nQZrbY1Skac
org.json.simple.parser.ParseException
It's the maven (pom.xml) configuration, causing the confusion with the jar build. "json_simple-1.1.jar" has all the dependencies with in maven repository,
🌐
TutorialsPoint
tutorialspoint.com › json_simple › json_simple_quick_guide.htm
JSON.simple - Quick Guide
import java.io.IOException; import java.util.List; import java.util.Stack; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.ContentHandler; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; class JsonDemo { public static void main(String[] args) { JSONParser parser = new JSONParser(); String text = "{\"first\": 123, \"second\": [4, 5, 6], \"third\": 789}"; try { CustomContentHandler handler = new CustomContentHandler(); parser.parse(text, handler,true); } catch(ParseException pe) { } } } class CustomContent
🌐
GitHub
gist.github.com › mcSw4p › ab37318dbd394f4b5cc5de5d6d3f6ab3
JSON Simple guide · GitHub
[maven | .jar(direct) | .jar] // JSON Simple imports import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; File jsonFile = new File("/hello.json"); // Do with as you please /* * Simple key value pairs */ JSONParser parser = new JSONParser(); try{ JSONObject jObj = (JSONObject) parser.parse(new FileReader(jsonFile)); } catch (IOException | ParseException e) { e.printStackTrace(); } String value = (String) jObj.get("world"); long delay = (Long) jObj.get("delay"); boolean debug = (Boolean) jObj.
🌐
RoseIndia
roseindia.net › answers › viewqa › Java-Beginners › 259748-JSONParser-Java-maven-dependency.html
JSONParser Java maven dependency
August 1, 2020 - What is the JSONParser Java maven dependency code that I can add into my pom.xml file? ... The JSONParser is a Java library for working with the JSON documents.The JSON stands for JavaScript Object Notation, which is independent data exchange format between the application.
🌐
Google Code
code.google.com › archive › p › json-simple
Google Code Archive - Long-term storage for Google Code Project Hosting.
Archive · Skip to content · The Google Code Archive requires JavaScript to be enabled in your browser · Google · About Google · Privacy · Terms
Top answer
1 of 16
962

The org.json library is easy to use.

Just remember (while casting or using methods like getJSONObject and getJSONArray) that in JSON notation

  • [ … ] represents an array, so library will parse it to JSONArray
  • { … } represents an object, so library will parse it to JSONObject

Example code below:

import org.json.*;

String jsonString = ... ; //assign your JSON String here
JSONObject obj = new JSONObject(jsonString);
String pageName = obj.getJSONObject("pageInfo").getString("pageName");

JSONArray arr = obj.getJSONArray("posts"); // notice that `"posts": [...]`
for (int i = 0; i < arr.length(); i++)
{
    String post_id = arr.getJSONObject(i).getString("post_id");
    ......
}

You may find more examples from: Parse JSON in Java

Downloadable jar: http://mvnrepository.com/artifact/org.json/json

2 of 16
714

For the sake of the example lets assume you have a class Person with just a name.

private class Person {
    public String name;

    public Person(String name) {
        this.name = name;
    }
}

Jackson (Maven)

My personal favourite and probably the most widely used.

ObjectMapper mapper = new ObjectMapper();

// De-serialize to an object
Person user = mapper.readValue("{\"name\": \"John\"}", Person.class);
System.out.println(user.name); //John

// Read a single attribute
JsonNode nameNode = mapper.readTree("{\"name\": \"John\"}");
System.out.println(nameNode.get("name").asText());

Google GSON (Maven)

Gson g = new Gson();

// De-serialize to an object
Person person = g.fromJson("{\"name\": \"John\"}", Person.class);
System.out.println(person.name); //John

// Read a single attribute
JsonObject jsonObject = new JsonParser().parseString("{\"name\": \"John\"}").getAsJsonObject();
System.out.println(jsonObject.get("name").getAsString()); //John

Org.JSON (Maven)

This suggestion is listed here simply because it appears to be quite popular due to stackoverflow reference to it. I would not recommend using it as it is more a proof-of-concept project than an actual library.

JSONObject obj = new JSONObject("{\"name\": \"John\"}");

System.out.println(obj.getString("name")); //John
🌐
GeeksforGeeks
geeksforgeeks.org › java › what-is-json-java-org-json
What is JSON-Java (org.json)? - GeeksforGeeks
July 17, 2022 - // importing JSON simple libraries import java.io.FileReader; import java.util.Iterator; import java.util.Map; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.*; public class JSONReadExample { public static void main(String[] args) throws Exception { // The file JSON.json is parsed Object object = new JSONParser().parse(new FileReader("author.json")); // objc is convereted to JSON object JSONObject jsonObject = (JSONObject)object; // obtaining the fname and lname String firstName = (String)jsonObject.get("firstName"); String lastName = (String
🌐
Findjar
findjar.com › class › org › json › simple › parser › JSONParser.html
org.json.simple.parser.JSONParser - JAR Search - findJAR.com
This page shows details for the Java class JSONParser contained in the package org.json.simple.parser. All JAR files containing the class org.json.simple.parser.JSONParser file are listed.