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

Decompiled .class file, bytecode version46.0(Java 1.3 or older) Download sources/choose cources

I'm importing a project I wrote on a different machine and I get this error message. The project uses the json.simple package and it is when I'm viewing its sources files that I get this error. I have the option to choose source files from where I…
Stormtrooper
  • 107
  • 3
  • 8
0
votes
3 answers

Aplication with json-simple crash after non json data

Ive got HttpURLConnection urlConnection = null; String result = ""; try { String host = "http://www.example.com/json.json"; URL url = new URL(host); urlConnection = (HttpURLConnection)…
Sirwiz
  • 15
  • 5
0
votes
2 answers

java json error on casting

My Java code look like below: import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; String jsonMember = strUrl; String strMember = readUrl(jsonMember); if (!Validator.isEmpty(strMember)) { …
Teddybugs
  • 1,232
  • 1
  • 12
  • 37
0
votes
2 answers

json simple parse array of arrays

I found a way to parse array of arrays in here with gson.. but I need it with json simple.. here's my json file: { "matrix" : [ [6,"",3,8,"A"], ["","B",1,"A",9] ] } The arrays are made of strings, integers and null, is there a way to parse…
leverglowh
  • 734
  • 1
  • 7
  • 23
0
votes
2 answers

Java parse JSON array from JSON file

I haven't been programming for a long time but I like it and trying to get back on track. So please excuse the nature of the problem/question here. What I need is pretty simple in my opinion but i'm mostly struggling with using gson and json-simple…
Zee
  • 172
  • 1
  • 5
  • 12
0
votes
1 answer

JSON Simple - example

I'am using JSON Simple (https://code.google.com/p/json-simple/downloads/list). But I have a problem with this. I'm creating something like this: public String showMe() { JSONParser parser = new JSONParser(); try { URL…
Chrisss
  • 87
  • 1
  • 10
0
votes
1 answer

working with JSON-Simple in java replacing a value

I'm getting a java safety error and honestly if this was a house I was living in I'd be a little scared too. obj is a JSONObject from the JSON-Simple library obj.put("ord.cancelled_by__c",…
Tim Willis
  • 140
  • 10
0
votes
2 answers

How to return a single object with json-simple in java?

I've this json object: public static final String JSON_TEXT = "{" + "\"Subjects\": [{" + "\"primaryKey\": \"1\"," + "\"subjectName\": \"English\"" + "}," + "{" + "\"primaryKey\": \"2\"," + …
hagep
  • 1
  • 1
0
votes
0 answers

How to prevent JSON from removing spaces?

I am using the json.simple library. And I want to stick to that, if possible. When i retrieve an Object String blockString = message.get("block").toString(); and then System.out.println(blockString) gives me this {"type": "block", "transactions":…
InDaPond
  • 574
  • 3
  • 6
  • 23
0
votes
1 answer

JSON custumize toString

You can answer the entire question with only reading my question in BOLD letters below, I wanted to provide some context just in case the question is not clear I am recreating a blockchain and therefore need to verify that the blocks created…
InDaPond
  • 574
  • 3
  • 6
  • 23
0
votes
2 answers

JSON Parsing Error: Unexpected character (s) at position 226025

I saw similar question on Stackoverflow but none of them helped me to solve my issue. So, I am asking for help as I have tried to find out what is the reason behind the error I am getting but failed. Please don't mark it as a duplicate question. I…
Wasi Ahmad
  • 35,739
  • 32
  • 114
  • 161
0
votes
1 answer

How to create json object using json simple with "dot" in name?

My json object looks like this { name.raw:John } How would I create the corresponding json simple object "name.raw". I am facing issues due to the dot in name
user2297083
  • 168
  • 11
0
votes
2 answers

How to read a large JSON file?

How to read a large JSON file ? { "Count": 361888, "Items": [ { "S3Url": {"S": Grouper/1904/1/private/drafts/D1_2/siepon_D1_2/siepon_C11_D1‌​_2_diff.pdf" }, "JSONFile": {"S":…
0
votes
1 answer

Fetch data from JSON file, save as objects and fetch data with a key-value

I have a JSON file { "measurements": [ { "time": "100416", "temp": "7.64", }, { "time": "110416", "temp": " 7.76 ", }, { "time": "120416", "temp": " 7.86 ", } …
Sumsum
  • 1
  • 1
0
votes
1 answer

json-simple Java: where's error and how to solve?

I have long json answer, here it…
Lame Lane
  • 11
  • 1
  • 8