About 50 results
Open links in new tab
  1. Parsing JSON Object in Java - Stack Overflow

    Fetch the data from JSONObject using index '"interestKey"'. Note : JSON parsing uses the escape sequence for special nested characters if the json response (usually from other JSON response …

  2. java - JSONObject - How to get a value? - Stack Overflow

    Implementation has a bug (s): (1) while-loop is continuing even after recursive call returns a legitimate value. (2) you have no way to differentiate between, key not found vs key has legitimate value as "". …

  3. java - JSONObject in JSONObject - Stack Overflow

    Aug 2, 2012 · JSONObject provides accessors for a number of different data types, including nested JSONObjects and JSONArrays, using JSONObject.getJSONObject(String), …

  4. java - How to iterate over a JSONObject? - Stack Overflow

    I use a JSON library called JSONObject (I don't mind switching if I need to). I know how to iterate over JSONArrays, but when I parse JSON data from Facebook I don't get an array, only a JSONObje...

  5. java - Which one to use? JSONObject from org.json VS JsonObject …

    The problem was that the code I pasted in used JsonObject (which comes from javax.json library) and not JSONObject (which comes from org.json library). When I noticed the difference in case between …

  6. How to convert jsonString to JSONObject in Java - Stack Overflow

    However, I think your question is more like, How do I endup with an actual JSONObject object from a JSON String. I was looking at the google-json api and couldn't find anything as straight forward as …

  7. json - How to put a List<class> into a JSONObject and then read that ...

    How to put a List<class> into a JSONObject and then read that object in Java? Asked 14 years, 5 months ago Modified 1 year, 5 months ago Viewed 149k times

  8. java - How to create JSON Object using String? - Stack Overflow

    Nov 21, 2013 · FYI that this will fail to parse JSON arrays (even though they are technically valid JSON). For example, trying JSONObject("[{\"foo\":2, \"bar\": 3}]"); results in A JSONObject text must begin …

  9. How to get a value which is a List from a JSONObject in Java

    Dec 14, 2022 · How to get a value which is a List from a JSONObject in Java Asked 3 years, 1 month ago Modified 3 years, 1 month ago Viewed 11k times

  10. How to put object into JSONObject properly? - Stack Overflow

    May 3, 2015 · 60 Since you use JSONObject to represent non-primitive types, any instance passed to JSONObject.put(Object, Object) will generate nested items (or trees).