Questions tagged [json-simple]

JSON.simple is a Java-to-JSON binding API that serializes and deserializes JSON data to and from Java data structures.

JSON.simple is a Java-to-JSON binding API designed to be a simple Java toolkit to encode or decode JSON text.

See also:

234 questions
0
votes
0 answers

POST multiple requests using a List of payloads in Java for sending HttpRequest

I have a payload utility class where I am iterating over a list of payloads (which are in a json file). There is currently one way to identify an individual payload and that is seen below (Product_Div and Product_SubDiv are two individual…
wheelerlc64
  • 435
  • 2
  • 5
  • 17
0
votes
2 answers

JSON format for jQuery UI Autocomplete using json-simple

I am trying to generate a proper JSON output for use with jQuery UI Autocomplete. I am forced to use the JAVA json-simple lib and I tried every combination that I could think of. Lets suppose that I like the drop down to show a list of "Alex1",…
Alexius DIAKOGIANNIS
  • 2,465
  • 2
  • 21
  • 32
0
votes
1 answer

java.lang.ClassNotFoundException: org.json.simple.parser.JSONParser

I have included json-simple in my pom.xml for Maven: com.googlecode.json-simple json-simple 1.1.1
0
votes
1 answer

Json Simple dependency Issue

So I have been trying to import JSON Simple (https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1) I am also using Visual Studio Code. So I have added the dependency in my pom.xml file, but it still wont find my imports. …
0
votes
1 answer

parse values from json file

I have a data.json file, the content is like this: [ {"raw":"{\"productId\":\"PU02\",\"productType\":\"RAU\", \"productDate\":\"2022-06-03\"}"}, {"raw":"{\"productId\":\"AB03\",\"productType\":\"PUE\", \"productDate\":\"2022-05-28\"}"}, ... ] I…
user842225
  • 5,445
  • 15
  • 69
  • 119
0
votes
0 answers

Create new json file using json template file

I have a json template file. Using java program, I need to read the template and create a new json file with updated values. Example Template json example: { "page": 2, "per_page": 6, "total": 12, "total_pages": 2, "data": [ …
0
votes
1 answer

Why does my JSONParser throw NoClassDefFoundError?

I'm trying to convert scanner string into JSONObject in Java and import JSON modules from Json Simple. I have already added JSON-simple-1.1.1.jar into my build path. However, when I was trying to paser my inline string. My inline string looks like…
0
votes
2 answers

How to get the key of the vale in json simple in java

I encountered a problem { "a": "X1abs", "b": "d4vT" } This is to be done with plugin json-simple So what I want is that if I have "X1abs", then I get the key which is "a" Please Help me
0
votes
3 answers

How to iterrate through Json Array and return each value

I have a Json file that contains an Array of Json Objects: [{"id":"939f0080-e93e-4245-80d3-3ac58a4a4335","name":"Micha","date":"2021-04-20T11:21:48.000Z","entry":"Wow"},…
M123
  • 1
  • 2
0
votes
1 answer

Eclipse not recognizing json-simple

When I try to run import org.json.simple.JSONObject;, I get an error saying the type org.json.simple.JSONObject is not accessible If I try to change it to import org.json.simple.*;, I still get an error saying the package is not accessible. I have…
aayush-a
  • 1
  • 1
  • 3
0
votes
1 answer

Parse Json Array java

i try to parse JSON array with format from file like this > [ { "Absensi": 20, "Tunjangan Makan": 400000, "name": "asdasd", "ID": 1, "Gaji Total": 5400000, "Gaji Pokok": 5000000, "email": [ "asdasd", …
user16226061
0
votes
1 answer

Java: JSON.simple Parser - convert BufferedReader's readUTF string to Reader

I am writing a server which receives a JSON string then parse it to Java JSONObject, by using the JSON.simple package: https://mkyong.com/java/json-simple-example-read-and-write-json/. I am using DataInputStream to read input, but when I try to…
Yige Song
  • 333
  • 6
  • 16
0
votes
1 answer

Compare the key of a JSON Object to a String

I am trying to compare the key of a JSON Object to a String to assess whether or not my JSON Object contains the specified value at that key before continue processing. Here is a sample of the String…
0
votes
1 answer

Retrieve JSON value as inputstream

My JSON will be as follows: { "id" : "1", "data" : "aaaaaaaaaaaaaaaaaaaaa" } I am ready to use any JSON Parser. But I want the data element as InputStream. Could you please me to implement the same in Java?
user1862354
  • 117
  • 11
0
votes
2 answers

Error parsing json with simple-json library

I want to get all the "name" of these Json, I tried iterator and mapString, but without success, the result is always NULL. try { JSONParser parser = new JSONParser(); JSONObject json = (JSONObject)…
Paulo Roberto
  • 1,498
  • 5
  • 19
  • 42