Mined Opinions For API: com.googlecode.json-simple

This tab contains all the opinions collected from Stack Overflow about the API. The other tabs present summaries of the opinions using different algorithms.
  • , fix the imports and it works for me.. details
  • Another library that would be great to traverse such JSON 'trees' is [JSON.Simple]( URL_https://code.google.com/p/json-simple/) .. details
  • Since I don't see anything like that in the json-simple examples I'm going to assume it doesn't support that.. details
  • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( URL_https://code.google.com/p/json - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.. details
  • You can use [json-simple]( URL_http://code.google.com/p/json-simple /) which is simple, as the name implies.. details
  • Reason you want to pretty print it?. details
  • This worked perfectly!!. details
  • , fix the imports and it works for me.. details
  • Thanks, I'll look into that!.. details
  • You can use [json-simple]( URL_http://code.google.com/p/json-simple /) which is simple, as the name implies.. details
  • Reason you want to pretty print it?. details
  • Thanks for your descriptive information.. details
  • Many thanks :).. details
  • Thanks, I'll look into that!.. details
  • It should be pretty simple to check if the string begins and ends with [].. details
  • Many thanks :).. details
  • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( URL_https://code.google.com/p/json - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.. details
  • @mabuzer Gave up...just using Gson (for pretty-print) + json-simple for everything else.. details
  • This worked perfectly!!. details
  • Thanks for your descriptive information.. details
  • There are many JSON parsers.I found URL_https://code.google.com/p/json-simple/ [json-simple] easy to implement.A set of URL_https://code.google.com/p/json- simple/wiki/DecodingExamples [decoding-examples] show how to create an JSON- Object out of String Here is a code-snippet to read a JSON object from String.. details
  • There are many JSON parsers.I found URL_https://code.google.com/p/json-simple/ [json-simple] easy to implement.A set of URL_https://code.google.com/p/json- simple/wiki/DecodingExamples [decoding-examples] show how to create an JSON- Object out of String Here is a code-snippet to read a JSON object from String.. details
  • I'm making a Java game, where I want to save files to be in JSON and I'm using JSON.simple library for that.. details
  • Any help would be much appreciated :) .. details
  • I have found out, that JSONLib can save for example Float and afterwards, read it as a Float (that's basically what I want).. details
  • This code would be a good example of how not to do it.. details
  • REPLY I currently don't understand how i can get the array in [dropped], I did some of the easier example, but this is a first for me.. details
  • I'll be very grateful CODESNIPPET_JAVA1 .. details
  • It seems like there a hierarchy but I don't know how to access it** .. details
  • I got a _date_ value (_19.11.2013_), but I don't know how to get child's values of _date_ and _time_.I'm using json-simple library.. details
  • That works as well.. details
  • As you can see, it works as intended: CODESNIPPET_JAVA2 .. details
  • That works as well.. details
  • As you can see, it works as intended: CODESNIPPET_JAVA2 .. details
  • Thanks.. details
  • thanks "bidifx".. details
  • I like the URL_https://code.google.com/p/json-simple/ [json-simple] library for parsing the results.. details
  • I like the URL_https://code.google.com/p/json-simple/ [json-simple] library for parsing the results.. details
  • I'm using JSON Simple libraries.. details
  • If my answer was helpful, feel free to upvote/accept.. details
  • In JSON simple, you would do: CODESNIPPET_JAVA2 .. details
  • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
  • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
  • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
  • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
  • Infact I was not able to get the unmodified example working either, and the original authors have not explained their code.. details
  • Infact I was not able to get the unmodified example working either, and the original authors have not explained their code.. details
  • (The first case will sometimes have [] in it so I can't do index of and I'd like a cleaner way than just checking the first character.. details
  • I am hitting a service and sometimes getting back something like this: CODESNIPPET_JAVA1 .. details
  • Thanks!. details
  • and sometimes getting return like this: CODESNIPPET_JAVA2 .. details
  • (The first case will sometimes have [] in it so I can't do index of and I'd like a cleaner way than just checking the first character.. details
  • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
  • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
  • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
  • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
  • Json how to get value from key with special character - json-simple.. details
  • I cannot get a value from a key, because the key has a CODETERM1 in it.. details
  • How can I deal with the key with a special character CODETERM2 in it?. details
  • Also thanks!. details
  • Also thanks!. details
  • Any help is appreciated, thanks.. details
  • Okay, I just tested it with Java (OpenJDK 1.6.0, using the libjson-simple-java library) and it worked fine.. details
  • I've been thinking for these two JSON library: Google Gson JSON.Simple XStream Google Gson is pretty awesome, it can serialize class object that have no-args constructor.. details
  • JSON.Simple is neat to with a very simple to use API.. details
  • Use a JSON Streaming parser like URL_https://code.google.com/p/json-simple/ [json-simple] or URL_http://wiki.fasterxml.com/JacksonHome [Jackson] .. details
  • Use a JSON Streaming parser like URL_https://code.google.com/p/json-simple/ [json-simple] or URL_http://wiki.fasterxml.com/JacksonHome [Jackson] .. details
  • Running through Netbeans works perfectly.. details
  • Any advice would be greatly appreciated.. details
  • A fast, simple, lightweight parser that I like is json-simple.. details
  • A fast, simple, lightweight parser that I like is json-simple.. details
  • Thanks.. details
  • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
  • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
  • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
  • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
  • @Tom Glad I could help :).. details
  • That's a great help, thanks Hassan!.. details
  • Just think of it like XML - you can't have a valid XML document without a root node.. details
  • Just think of it like XML - you can't have a valid XML document without a root node.. details
  • But, you're in luck!. details
  • Debugging I have found that parse method returns an object that is a Map!. details
  • Here's another discussion on the same topic that is useful: URL_http://stackoverflow.com/questions/8941768/how-to-add-an-url-in-a-json- object [how-to-add-an-URL-in-a-JSON-object] .. details
  • First, you may want to use the JSON simple library, I believe it doesn't automatically escape your strings like that.. details
  • To prevent all the object creation, look at event driven xml and json handling like URL_http://www.saxproject.org/ [SAX] for XML and URL_http://code.google.com/p/json-simple/ [Json-Simple] and/or URL_http://jackson.codehaus.org/ [Jackson] for JSON.. details
  • To prevent all the object creation, look at event driven xml and json handling like URL_http://www.saxproject.org/ [SAX] for XML and URL_http://code.google.com/p/json-simple/ [Json-Simple] and/or URL_http://jackson.codehaus.org/ [Jackson] for JSON.. details
  • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
  • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
  • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
  • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
  • Thanks for the help.. details
  • I'm using the JSON.simple toolkit found URL_http://code.google.com/p/json- simple/ [here] Here's my code.. details
  • I'm using the JSON.simple toolkit found URL_http://code.google.com/p/json- simple/ [here] Here's my code.. details
  • with about a dozen more artists, all distinguished individually by curly braces with commas in-between.. details
  • Your use case could be handled much better with a free- form JSON processor like json-simple ( URL_http://code.google.com/p/json-simple) .. details
  • Your use case could be handled much better with a free- form JSON processor like json-simple ( URL_http://code.google.com/p/json-simple) .. details
  • Wondering if there is a simpler way in simple-json itself or if there are other libraries that better.. details
  • For reference, see "Example 1" on the URL_http://code.google.com/p/json- simple/wiki/DecodingExamples [json-simple-decoding-example] page.. details
  • For reference, see "Example 1" on the URL_http://code.google.com/p/json- simple/wiki/DecodingExamples [json-simple-decoding-example] page.. details
  • Thanks .. details
  • I hope somebody can help me with a code line which I am missing in my code.. details
  • It will work after all!.. details
  • Hmm... JSON-simple doesn't look like it will quite work.. details
  • Thanks.. details
  • Thanks.. details
  • Jackson or json-simple from Google would be my recommendations: URL_http://code.google.com/p/json-simple/ .. details
  • Jackson or json-simple from Google would be my recommendations: URL_http://code.google.com/p/json-simple/ .. details
  • I haven't look at this issue in over a year, but if you're willing to modify the source code a bit, URL_http://code.google.com/p/json - simple/issues/detail?id=22 has some information on enhancing json-simple with pretty-printing.. details
  • I haven't look at this issue in over a year, but if you're willing to modify the source code a bit, URL_http://code.google.com/p/json - simple/issues/detail?id=22 has some information on enhancing json-simple with pretty-printing.. details
  • Did you find out how to get json-simple working with integrated pretty-print?. details
  • If you don't have a Java bean but want to create json use libraries like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • If you don't have a Java bean but want to create json use libraries like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • Thanks.. details
  • Can someone please help?. details
  • The structure that JSON.simple deserialized into was a Map, where each entry key is a String, and each entry value is either a simple data type or another Map.. details
  • Update: I just tried to implement it using JSON Simple, and it works out of the box very easily by the following code: CODESNIPPET_JAVA3 .. details
  • I use [json-simple]( URL_http://code.google.com/p/json-simple/) , which is as the name implies - simple :).. details
  • I use [json-simple]( URL_http://code.google.com/p/json-simple/) , which is as the name implies - simple :).. details
  • Ha nice.. details
  • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
  • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
  • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
  • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
  • As an option, you can check URL_http://code.google.com/p/json-simple/ [JSON- Simple] .. details
  • As an option, you can check URL_http://code.google.com/p/json-simple/ [JSON- Simple] .. details
  • Thank you.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • hey hi i didnt find in it can you give me link.. details
  • hey hi i didnt find in it can you give me link.. details
  • I just rewrote the application with json-simple and it works great, you don't even have to escape() it, by default it treats string as string and not trying to parse it as JSON.. details
  • Life is so much simple with json-simple.. details
  • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
  • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
  • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
  • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
  • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
  • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
  • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
  • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
  • more human readable for debugging.. details
  • more human readable for debugging.. details
  • more human readable for debugging.. details
  • more human readable for debugging.. details
  • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json-simple/ ] Stoppable SAX-like interface for streaming input of JSON text 2.. details
  • I think you don't need an aditional libray, but use cutomized output of json- simple library.Check this example: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_6-1_-_Customize_JSON_outputs [json-simple :-Customize-JSON-outputs] .. details
  • I think you don't need an aditional libray, but use cutomized output of json- simple library.Check this example: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_6-1_-_Customize_JSON_outputs [json-simple :-Customize-JSON-outputs] .. details
  • any library that can pretty-print json in java, I'm using URL_http://code.google.com/p/json-simple/ [json-simple] ?. details
  • any library that can pretty-print json in java, I'm using URL_http://code.google.com/p/json-simple/ [json-simple] ?. details
  • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
  • Otherwise, json-simple is much simpler to use and the JAR is much smaller (14k vs 43k).. details
  • Use JSON Simple, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] Which has a small foot-print, no dependencies so it's perfect for Android.. details
  • Use JSON Simple, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] Which has a small foot-print, no dependencies so it's perfect for Android.. details
  • Thanks MatthewI didnt realize it was that advanced.. details
  • Thanks MatthewI didnt realize it was that advanced.. details
  • Thanks MatthewI didnt realize it was that advanced.. details
  • Thanks MatthewI didnt realize it was that advanced.. details
  • For instance, the json-simple version of URL_https://code.google.com/p/json- simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java [JSONObject] implements Map and URL_https://code.google.com/p/json- simple/source/browse/trunk/src/main/java/org/json/simple/JSONArray.java [JSONArray] implements List.. details
  • It also has other features, like a URL_http://code.google.com/p/json-simple/wiki/DecodingExamples#Example_5_- _Stoppable_SAX-like_content_handler [SAX-style-API] .. details
  • I would recommend using URL_http://code.google.com/p/json-simple/ [json- simple] or one of the other JSON libraries for Java that have developed.. details
  • I would recommend using URL_http://code.google.com/p/json-simple/ [json- simple] or one of the other JSON libraries for Java that have developed.. details
  • It also has other features, like a URL_http://code.google.com/p/json-simple/wiki/DecodingExamples#Example_5_- _Stoppable_SAX-like_content_handler [SAX-style-API] .. details
  • I'm not really an expert on Javascript so I bet there's a more elegant way to do it.... details
  • I haven't tried the Java snippet, but the Javascript code is awesome :).. details
  • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
  • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
  • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
  • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
  • URL_http://code.google.com/p/json-simple/ [json-simple] was excellent: tiny, with a simple API that generates HashMap/ArrayList with a single call.. details
  • URL_http://code.google.com/p/json-simple/ [json-simple] was excellent: tiny, with a simple API that generates HashMap/ArrayList with a single call.. details
  • And perfect for J2ME?. details
  • This is my favorite... details
  • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .. details
  • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .. details
  • I used a few of them and my favorite is, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] The library is very small so it's perfect for J2ME.. details
  • I used a few of them and my favorite is, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] The library is very small so it's perfect for J2ME.. details
  • According to my reading of both the code and comments of the JSONObject class ( URL_https://code.google.com/p/json - simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java), it doesn't do anything to preserve the order of the keys.. details
  • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.. details
  • Yeah it was an error on the server side.. details
  • Yeah it was an error on the server side.. details
  • Manually adding json-simple-1.1.1.jar to the Class-Path in the manifest.mf still creates the same error message.. details
  • As you can see in the code I posted, it is a static method of the JSONObject class.. details
  • @SLaks: In UserFacingService, it returns bad\u0020stuff.. details
  • The problem with GSON, it's complicated, json-simple is far easier.. details
  • @SLaks: In UserFacingService, it returns bad\u0020stuff.. details
  • According to my reading of both the code and comments of the JSONObject class ( URL_https://code.google.com/p/json - simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java), it doesn't do anything to preserve the order of the keys.. details
  • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.. details
  • -1: completely wrong.. details
  • This makes code look very ugly and hard to read.. details
  • Sending CODETERM7 should cause the user facing service to reject the command: CODESNIPPET_JAVA3 .. details
  • Sending CODETERM7 should cause the user facing service to reject the command: CODESNIPPET_JAVA3 .. details
  • But then if the user sends CODETERM8 , bad stuff happens: CODESNIPPET_JAVA4 .. details
  • But then if the user sends CODETERM8 , bad stuff happens: CODESNIPPET_JAVA4 .. details
  • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
  • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
  • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
  • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
  • What am I doing wrongly?I am using json-simple-1.1.1 .. details
  • What stupid mistake am I making?. details
  • JSON parsing using JSON-Simple not working.. details
  • Sorry!.. details
  • ): My bad... details
  • Consequently, I am struggling to understand how to use a lot of these classes.. details
  • Consequently, I am struggling to understand how to use a lot of these classes.. details
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose).. details
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose).. details
  • on the second case I get an exception CODESNIPPET_JAVA4 .. details
  • How do I avoid this?. details
  • This also did the trick.. details
  • This also did the trick.. details
  • Hi dsh, As you pointed out it is problem with the character encoding of my IDE which is set by default to the encoding of native operating system.. details
  • classes within classes, and the like Very long String values in classes within classes and those sort of things Size of object, i.e.. details
  • objects containing huge bytes What are the scenarios where marshaling _can't take it anymore_ or _bang against the wall_?. details
  • I'm just thinking out loud here to understand what could go wrong when using these kinds of frameworks as a backbone for my applications.. details
  • Even "java -cp json-simple-1.1.1.jar -jar still give the same error.. details
  • When I try running it through the command line "java -jar " I get the following error.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • They are both designed for representing vectors and complex structures, the assumption being that if you have simple/scalar data to transmit, you can just pass it directly.. details
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json_encode() ...of course, you shouldn't/wouldn't do this, but you can.. details
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json_encode() ...of course, you shouldn't/wouldn't do this, but you can.. details
  • They are both designed for representing vectors and complex structures, the assumption being that if you have simple/scalar data to transmit, you can just pass it directly.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own - but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own - but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • JSON-Simple by default probably uses a HashMap under the hood and intentionally does not preserve the order of the keys in the original JSON.. details
  • I'm using Json-Simple to write a config file using JSon-Simple lib, but I'm having problems converting the json string to map.. details
  • It should be possible, but i think you hold it the wrong way around:parse will PARSE json-text content, and provide you with an Java-equivalent ("decoding") look at the sample on the homepage: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_1-3_-_Encode_a_JSON_object_-_Using_Map [ URL_http://code.google.com/p/json-simple/wiki/EncodingExamples Example_1-3_ _Encode_a_JSON_object_-_Using_Map] .. details
  • It should be possible, but i think you hold it the wrong way around:parse will PARSE json-text content, and provide you with an Java-equivalent ("decoding") look at the sample on the homepage: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_1-3_-_Encode_a_JSON_object_-_Using_Map [ URL_http://code.google.com/p/json-simple/wiki/EncodingExamples Example_1-3_ _Encode_a_JSON_object_-_Using_Map] .. details
  • But I get an error message : CODESNIPPET_JAVA3 .. details
  • When I try and change all of the "JSONObject"s in the CODETERM10 method to CODETERM11 , an error occurs, saying that it is unable to cast a CODETERM12 to a CODETERM13 .. details
  • When I try and change all of the "JSONObject"s in the CODETERM10 method to CODETERM11 , an error occurs, saying that it is unable to cast a CODETERM12 to a CODETERM13 .. details
  • The problem is, I want to be able to, say, extract all dozen or so artists from the search result.. details
  • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .. details
  • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .. details
  • But I get the following exception: Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject at javaapplication1.JavaApplication1.main(JavaApplication1.java:24) Can somebody tell me what I am doing wrong?. details
  • But I get the following exception: Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject at javaapplication1.JavaApplication1.main(JavaApplication1.java:24) Can somebody tell me what I am doing wrong?. details
  • Having dug around in the JSON.simple's repo I found their .java source files, which we can use with their IDEs.. details
  • You get that error on what line??. details
  • if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.. details
  • if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.. details
  • This is a sampling of the worst JSON-to/from-Java libraries, right?. details
  • From URL_http://www.json.org [ URL_http://www.json.org ] , under the Java section: URL_http://www.json.org/java/index.html [ URL_http://www.json.org/java/index.html ] URL_http://json-lib.sourceforge.net/ [ URL_http://json-lib.sourceforge.net/ ] URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json-simple/ ] URL_http://code.google.com/p/jjson/ [ URL_http://code.google.com/p/jjson/ ] Pick your poison .. details
  • It just never sent it as UTF-8, no matter which tricks I tried on backend side.After changing to CODESNIPPET_JAVA3 .. details
  • What's the trick here?I am using this map to make JSON object with json-simple and send it from server to client.. details
  • This throw a exception Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray What is the problem in this code ?. details
  • This throw a exception Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray What is the problem in this code ?. details
  • As of this writing, there are these 20: URL_http://www.JSON.org/java/index.html [org.json] URL_https://github.com/upictec/org.json.me/ [org.json.me] URL_http://jackson.codehaus.org/ [Jackson-JSON-Processor] URL_http://json-lib.sourceforge.net/ [Json-lib] URL_http://developer.berlios.de/projects/jsontools/ [JSON-Tools] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://www.stringtree.org/stringtree-json.html [Stringtree] URL_http://sojo.sourceforge.net/ [SOJO] URL_http://www.restlet.org/ [Restlet] URL_http://jettison.codehaus.org/ [Jettison] URL_http://json-taglib.sourceforge.net/ [json-taglib] URL_http://xstream.codehaus.org/ [XStream] URL_http://code.google.com/p/jsonmarshaller/ [JsonMarshaller] URL_http://flexjson.sourceforge.net/ [Flexjson] URL_http://sourceforge.net/projects/jontools/ [JON-tools] URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://argo.sourceforge.net/ [Argo] URL_http://pivot.apache.org/ [Pivot] URL_http://jwm.slavitica.net/p/projects/jsonij [jsonij] URL_http://sourceforge.net/projects/fastjson/ [fastjson] ...but of course the list can change.. details
  • As of this writing, there are these 20: URL_http://www.JSON.org/java/index.html [org.json] URL_https://github.com/upictec/org.json.me/ [org.json.me] URL_http://jackson.codehaus.org/ [Jackson-JSON-Processor] URL_http://json-lib.sourceforge.net/ [Json-lib] URL_http://developer.berlios.de/projects/jsontools/ [JSON-Tools] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://www.stringtree.org/stringtree-json.html [Stringtree] URL_http://sojo.sourceforge.net/ [SOJO] URL_http://www.restlet.org/ [Restlet] URL_http://jettison.codehaus.org/ [Jettison] URL_http://json-taglib.sourceforge.net/ [json-taglib] URL_http://xstream.codehaus.org/ [XStream] URL_http://code.google.com/p/jsonmarshaller/ [JsonMarshaller] URL_http://flexjson.sourceforge.net/ [Flexjson] URL_http://sourceforge.net/projects/jontools/ [JON-tools] URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://argo.sourceforge.net/ [Argo] URL_http://pivot.apache.org/ [Pivot] URL_http://jwm.slavitica.net/p/projects/jsonij [jsonij] URL_http://sourceforge.net/projects/fastjson/ [fastjson] ...but of course the list can change.. details
  • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
  • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
  • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
  • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
  • I really doubt there is such a library that is built to handle this.. details
  • I really doubt there is such a library that is built to handle this.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
Summaries the opinions about com.googlecode.json-simple using topic modeling.
  • 0. find decoding snippet decodingexamples wiki create examples implement parsers read: 6
    • There are many JSON parsers.I found json-simple easy to implement.A set of simple/wiki/DecodingExamples [decoding-examples] show how to create an JSON- Object out of String Here is a code-snippet to read a JSON object from String.. details
    • and sometimes getting return like this: CODESNIPPET .. details
    • Any advice would be greatly appreciated.. details
    • Debugging I have found that parse method returns an object that is a Map!. details
    • For reference, see "Example 1" on the simple/wiki/DecodingExamples [json-simple-decoding-example] page.. details
    • Hmm... JSON-simple doesn't look like it will quite work.. details
  • 1. gson key character constructor serialize author args xstream explain infact: 6
    • , fix the imports and it works for me.. details
    • Infact I was not able to get the unmodified example working either, and the original authors have not explained their code.. details
    • How can I deal with the key with a special character $ in it?. details
    • I've been thinking for these two JSON library: Google Gson JSON.Simple XStream Google Gson is pretty awesome, it can serialize class object that have no-args constructor.. details
    • Here's another discussion on the same topic that is useful: object [how-to-add-an-URL-in-a-JSON-object] .. details
    • First, you may want to use the JSON simple library, I believe it doesn't automatically escape your strings like that.. details
  • 2. httpservlet assume html vlet case http form processor jackson imply: 5
    • Since I don't see anything like that in the json-simple examples I'm going to assume it doesn't support that.. details
    • You can use [json-simple]( /) which is simple, as the name implies.. details
    • Your use case could be handled much better with a free- form JSON processor like json-simple ( .. details
    • I use [json-simple]( , which is as the name implies - simple :).. details
    • Assuming you're using an vlet/http/HttpServlet.html [HttpServlet] and a JSON library like json-simple you could do something like this: CODESNIPPET .. details
  • 3. float find intend decodingexamples sax wiki single stoppable decode handler: 7
    • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.. details
    • I have found out, that JSONLib can save for example Float and afterwards, read it as a Float (that's basically what I want).. details
    • REPLY I currently don't understand how i can get the array in [dropped], I did some of the easier example, but this is a first for me.. details
    • thanks "bidifx".. details
    • 1 - For example, the nitwits that this poor developer was working for ... 2 - JSON-simple : .. details
    • I haven't look at this issue in over a year, but if you're willing to modify the source code a bit, - simple/issues/detail?id=22 has some information on enhancing json-simple with pretty-printing.. details
    • Life is so much simple with json-simple.. details
  • 4. print gson mabuzer bean create j2me imply find jackson key: 4
    • @mabuzer Gave up...just using Gson (for pretty-print) + json-simple for everything else.. details
    • If you don't have a Java bean but want to create json use libraries like json-simple .. details
    • And perfect for J2ME?. details
    • I used a few of them and my favorite is, - simple/] The library is very small so it's perfect for J2ME.. details
  • 5. outputs customize key wiki libray encodingexamples cutomized aditional output read: 7
    • Reason you want to pretty print it?. details
    • A fast, simple, lightweight parser that I like is json-simple.. details
    • Just think of it like XML - you can't have a valid XML document without a root node.. details
    • I used the JSON.simple library from here simple/ [ to read the JSON string to keep the order of keys and use JavaCSV library from here to convert to CSV format.. details
    • I think you don't need an aditional libray, but use cutomized output of json- simple library.Check this example: simple/wiki/EncodingExamples#Example_6-1_-_Customize_JSON_outputs [json-simple :-Customize-JSON-outputs] .. details
    • Thanks MatthewI didnt realize it was that advanced.. details
    • json-simple was excellent: tiny, with a simple API that generates HashMap/ArrayList with a single call.. details
  • 6. entry jackson key sax creation prevent structure escape rewrite deserialized: 9
    • I'm making a Java game, where I want to save files to be in JSON and I'm using JSON.simple library for that.. details
    • I got a _date_ value (_19.11.2013_), but I don't know how to get child's values of _date_ and _time_.I'm using json-simple library.. details
    • Use a JSON Streaming parser like json-simple or Jackson .. details
    • To prevent all the object creation, look at event driven xml and json handling like SAX for XML and Json-Simple and/or Jackson for JSON.. details
    • Jackson or json-simple from Google would be my recommendations: .. details
    • The structure that JSON.simple deserialized into was a Map, where each entry key is a String, and each entry value is either a simple data type or another Map.. details
    • I just rewrote the application with json-simple and it works great, you don't even have to escape() it, by default it treats string as string and not trying to parse it as JSON.. details
    • more human readable for debugging.. details
    • I happen to like json-simple .. details
  • 7. find jackson gson answer upvote feel accept didnt hey usefull: 8
    • Thanks for your descriptive information.. details
    • Another library that would be great to traverse such JSON 'trees' is [JSON.Simple]( .. details
    • I like the json-simple library for parsing the results.. details
    • If my answer was helpful, feel free to upvote/accept.. details
    • hey hi i didnt find in it can you give me link.. details
    • There are some libraries to parse json string into java objects: google-gson json-simple jackson This link is very usefull!. details
    • Otherwise, json-simple is much simpler to use and the JAR is much smaller (14k vs 43k).. details
    • I would recommend using json- simple] or one of the other JSON libraries for Java that have developed.. details
  • 8. sax key print stoppable find individually artist comma dozen curly: 53
    • This worked perfectly!!. details
    • Thanks, I'll look into that!.. details
    • It should be pretty simple to check if the string begins and ends with [].. details
    • Many thanks :).. details
    • Any help would be much appreciated :) .. details
    • This code would be a good example of how not to do it.. details
    • I'll be very grateful CODESNIPPET .. details
    • It seems like there a hierarchy but I don't know how to access it** .. details
    • That works as well.. details
    • Thanks.. details
    • I'm using JSON Simple libraries.. details
    • In JSON simple, you would do: CODESNIPPET .. details
    • I am hitting a service and sometimes getting back something like this: CODESNIPPET .. details
    • Thanks!. details
    • You can use json-simple its a high performance library and its very easy to use : CODESNIPPET .. details
    • Json how to get value from key with special character - json-simple.. details
    • I cannot get a value from a key, because the key has a $ in it.. details
    • Also thanks!. details
    • Any help is appreciated, thanks.. details
    • Okay, I just tested it with Java (OpenJDK 1.6.0, using the libjson-simple-java library) and it worked fine.. details
    • JSON.Simple is neat to with a very simple to use API.. details
    • Running through Netbeans works perfectly.. details
    • Thanks.. details
    • simple/ [ .. details
    • @Tom Glad I could help :).. details
    • That's a great help, thanks Hassan!.. details
    • But, you're in luck!. details
    • Using the excellent json-simple library, you should be able to do something like this: CODESNIPPET .. details
    • Thanks for the help.. details
    • I'm using the JSON.simple toolkit found simple/ [here] Here's my code.. details
    • with about a dozen more artists, all distinguished individually by curly braces with commas in-between.. details
    • Wondering if there is a simpler way in simple-json itself or if there are other libraries that better.. details
    • Thanks .. details
    • I hope somebody can help me with a code line which I am missing in my code.. details
    • It will work after all!.. details
    • Thanks.. details
    • Did you find out how to get json-simple working with integrated pretty-print?. details
    • Can someone please help?. details
    • Thanks.. details
    • Update: I just tried to implement it using JSON Simple, and it works out of the box very easily by the following code: CODESNIPPET .. details
    • Ha nice.. details
    • As an option, you can check JSON- Simple] .. details
    • Thank you.. details
    • They have an open issue for this, no luck with a fix so far: I just hacked their source code.. details
    • Stoppable SAX-like interface for streaming input of JSON text 2.. details
    • any library that can pretty-print json in java, I'm using json-simple ?. details
    • Use JSON Simple, - simple/] Which has a small foot-print, no dependencies so it's perfect for Android.. details
    • It also has other features, like a _Stoppable_SAX-like_content_handler [SAX-style-API] .. details
    • I'm not really an expert on Javascript so I bet there's a more elegant way to do it.... details
    • I haven't tried the Java snippet, but the Javascript code is awesome :).. details
    • JSON-Simple looks relatively easy to use (examples below).. details
    • This is my favorite... details
    • This is my favorite, - simple/] .. details
  • 9. implement browse jsonobject src jsonarray trunk main instance character case: 3
    • As you can see, it works as intended: CODESNIPPET .. details
    • (The first case will sometimes have [] in it so I can't do index of and I'd like a cleaner way than just checking the first character.. details
    • For instance, the json-simple version of simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java [JSONObject] implements Map and simple/source/browse/trunk/src/main/java/org/json/simple/JSONArray.java [JSONArray] implements List.. details
  • 0. understand read stricter order purpose implementation standard people gson side: 6
    • Yeah it was an error on the server side.. details
    • The problem with GSON, it's complicated, json-simple is far easier.. details
    • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose).. details
    • I'm just thinking out loud here to understand what could go wrong when using these kinds of frameworks as a backbone for my applications.. details
    • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
    • I'm using Json-Simple to write a config file using JSon-Simple lib, but I'm having problems converting the json string to map.. details
  • 1. jsonobject encoding order main browse preserve key accord trunk dsh: 4
    • According to my reading of both the code and comments of the JSONObject class ( - simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java), it doesn't do anything to preserve the order of the keys.. details
    • Hi dsh, As you pointed out it is problem with the character encoding of my IDE which is set by default to the encoding of native operating system.. details
    • The problem is, I want to be able to, say, extract all dozen or so artists from the search result.. details
    • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( /) and want to prevent JS-escaping.. details
  • 2. message create path manifest manually add understand exception case lot: 3
    • Manually adding json-simple-1.1.1.jar to the Class-Path in the manifest.mf still creates the same error message.. details
    • Consequently, I am struggling to understand how to use a lot of these classes.. details
    • on the second case I get an exception CODESNIPPET .. details
  • 3. javaapplication1 main exception jsonobject follow classcastexception jsonarray thread cast lang: 4
    • They are both designed for representing vectors and complex structures, the assumption being that if you have simple/scalar data to transmit, you can just pass it directly.. details
    • JSON-Simple by default probably uses a HashMap under the hood and intentionally does not preserve the order of the keys in the original JSON.. details
    • But I get the following exception: Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject at javaapplication1.JavaApplication1.main(JavaApplication1.java:24) Can somebody tell me what I am doing wrong?. details
    • Having dug around in the JSON.simple's repo I found their .java source files, which we can use with their IDEs.. details
  • 4. encode literal follow jsonobject standard equivalent cast decoding number content: 14
    • What am I doing wrongly?I am using json-simple-1.1.1 .. details
    • What stupid mistake am I making?. details
    • JSON parsing using JSON-Simple not working.. details
    • ): My bad... details
    • Sorry!.. details
    • How do I avoid this?. details
    • This also did the trick.. details
    • When I try running it through the command line "java -jar " I get the following error.. details
    • Even "java -cp json-simple-1.1.1.jar -jar still give the same error.. details
    • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own - but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard.. details
    • It should be possible, but i think you hold it the wrong way around:parse will PARSE json-text content, and provide you with an Java-equivalent ("decoding") look at the sample on the homepage: simple/wiki/EncodingExamples#Example_1-3_-_Encode_a_JSON_object_-_Using_Map [ Example_1-3_ _Encode_a_JSON_object_-_Using_Map] .. details
    • When I try and change all of the "JSONObject"s in the readJsonFromUrl method to JSONArrays , an error occurs, saying that it is unable to cast a JSONObject to a JSONArray .. details
    • You get that error on what line??. details
    • if your problem is because of the complicated class java has for actually parsing JSON, you may use JSON.simple library.. details
  • 5. stuff cmd service face u0020stuff send backend happen prevent sending: 5
    • @SLaks: In UserFacingService, it returns bad\u0020stuff.. details
    • But then if the user sends {"cmd": "bad\u0020stuff"} , bad stuff happens: CODESNIPPET .. details
    • The user facing service (using quick-json ) prevents the user from making the backend (using json-simple ) do bad stuff.. details
    • Sending {"cmd": "bad stuff"} should cause the user facing service to reject the command: CODESNIPPET .. details
    • JSON- Simple have a little bug though which I think could be easily solved: I'm using this anyway, thanks for the link.. details
  • 6. long sort thing read pick gson avoid sampling send follow: 3
    • This makes code look very ugly and hard to read.. details
    • classes within classes, and the like Very long String values in classes within classes and those sort of things Size of object, i.e.. details
    • From , under the Java section: Pick your poison .. details
  • 7. tools exception gson jsonobject change flexjson jon jsonmarshaller jackson processor: 4
    • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.. details
    • -1: completely wrong.. details
    • This throw a exception Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray What is the problem in this code ?. details
    • As of this writing, there are these 20: org.json org.json.me Jackson-JSON-Processor Json-lib JSON-Tools json-simple Stringtree SOJO Restlet Jettison json-taglib XStream JsonMarshaller Flexjson JON-tools google-gson Argo Pivot jsonij fastjson ...but of course the list can change.. details
  • 8. intend start pun post jsonobject build message avoid gson send: 4
    • As you can see in the code I posted, it is a static method of the JSONObject class.. details
    • But I get an error message : CODESNIPPET .. details
    • - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .. details
    • I really doubt there is such a library that is built to handle this.. details
  • 9. send side encode wouldn return behave argument manually construct null: 5
    • objects containing huge bytes What are the scenarios where marshaling _can't take it anymore_ or _bang against the wall_?. details
    • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json_encode() ...of course, you shouldn't/wouldn't do this, but you can.. details
    • This is a sampling of the worst JSON-to/from-Java libraries, right?. details
    • What's the trick here?I am using this map to make JSON object with json-simple and send it from server to client.. details
    • It just never sent it as UTF-8, no matter which tricks I tried on backend side.After changing to CODESNIPPET .. details
Summaries of the opinions about com.googlecode.json-simple using three algorithms (Textrank, Lexrank and Luhn) adopted from extractive summarization. Each algorithm was used once for the positive opinions and once for the negative opinions.
  • any library that can pretty print json in java, I'm using json simple ?.
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • JSON Simple is neat to with a very simple to use API .
  • In JSON simple, you would do: CODESNIPPET JAVA2 .
  • If you don't have a Java bean but want to create json use libraries like json simple .
  • any library that can pretty print json in java, I'm using json simple ?.
  • (The first case will sometimes have in it so I can't do index of and I'd like a cleaner way than just checking the first character .
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • Thanks for the help .
  • If you don't have a Java bean but want to create json use libraries like json simple .
  • Assuming you're using an vlet http HttpServlet html HttpServlet and a JSON library like json simple you could do something like this: CODESNIPPET JAVA1 .
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • I used the JSON simple library from here simple to read the JSON string to keep the order of keys and use JavaCSV library from here to convert to CSV format .
  • Have you checked with example 5(Stoppable SAX like content handler) in JSON official decoding tutorial]( simple wiki DecodingExamples)As I can see that the code is intended for single dictionary(Map) Array .
  • To prevent all the object creation, look at event driven xml and json handling like SAX for XML and Json Simple and or Jackson for JSON .
  • Assuming you're using an vlet http HttpServlet html HttpServlet and a JSON library like json simple you could do something like this: CODESNIPPET JAVA1 .
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • I used the JSON simple library from here simple to read the JSON string to keep the order of keys and use JavaCSV library from here to convert to CSV format .
  • Have you checked with example 5(Stoppable SAX like content handler) in JSON official decoding tutorial]( simple wiki DecodingExamples)As I can see that the code is intended for single dictionary(Map) Array .
  • To prevent all the object creation, look at event driven xml and json handling like SAX for XML and Json Simple and or Jackson for JSON .
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • I used the JSON simple library from here simple to read the JSON string to keep the order of keys and use JavaCSV library from here to convert to CSV format .
  • Have you checked with example 5(Stoppable SAX like content handler) in JSON official decoding tutorial]( simple wiki DecodingExamples)As I can see that the code is intended for single dictionary(Map) Array .
  • To prevent all the object creation, look at event driven xml and json handling like SAX for XML and Json Simple and or Jackson for JSON .
  • I just rewrote the application with json simple and it works great, you don't even have to escape() it, by default it treats string as string and not trying to parse it as JSON .
  • For instance, the json simple version of simple source browse trunk src main java org json simple JSONObject java JSONObject implements Map and simple source browse trunk src main java org json simple JSONArray java JSONArray implements List .
  • There are many JSON parsers I found json simple easy to implement A set of simple wiki DecodingExamples decoding examples show how to create an JSON Object out of String Here is a code snippet to read a JSON object from String .
  • I used the JSON simple library from here simple to read the JSON string to keep the order of keys and use JavaCSV library from here to convert to CSV format .
  • Have you checked with example 5(Stoppable SAX like content handler) in JSON official decoding tutorial]( simple wiki DecodingExamples)As I can see that the code is intended for single dictionary(Map) Array .
  • To prevent all the object creation, look at event driven xml and json handling like SAX for XML and Json Simple and or Jackson for JSON .
  • if your problem is because of the complicated class java has for actually parsing JSON, you may use JSON simple library .
  • When I try and change all of the "JSONObject"s in the readJsonFromUrl method to JSONArrays , an error occurs, saying that it is unable to cast a JSONObject to a JSONArray .
  • But I get an error message : CODESNIPPET JAVA3 .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
  • I'm just thinking out loud here to understand what could go wrong when using these kinds of frameworks as a backbone for my applications .
  • simple That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .
  • What's the trick here?I am using this map to make JSON object with json simple and send it from server to client .
  • if your problem is because of the complicated class java has for actually parsing JSON, you may use JSON simple library .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
  • I'm using Json Simple to write a config file using JSon Simple lib, but I'm having problems converting the json string to map .
  • As of this writing, there are these 20: org json org json me Jackson JSON Processor Json lib JSON Tools json simple Stringtree SOJO Restlet Jettison json taglib XStream JsonMarshaller Flexjson JON tools google gson Argo Pivot jsonij fastjson but of course the list can change .
  • According to my reading of both the code and comments of the JSONObject class ( simple source browse trunk src main java org json simple JSONObject java), it doesn't do anything to preserve the order of the keys .
  • The user facing service (using quick json ) prevents the user from making the backend (using json simple ) do bad stuff .
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json encode() of course, you shouldn't wouldn't do this, but you can .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
  • As of this writing, there are these 20: org json org json me Jackson JSON Processor Json lib JSON Tools json simple Stringtree SOJO Restlet Jettison json taglib XStream JsonMarshaller Flexjson JON tools google gson Argo Pivot jsonij fastjson but of course the list can change .
  • According to my reading of both the code and comments of the JSONObject class ( simple source browse trunk src main java org json simple JSONObject java), it doesn't do anything to preserve the order of the keys .
  • The user facing service (using quick json ) prevents the user from making the backend (using json simple ) do bad stuff .
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json encode() of course, you shouldn't wouldn't do this, but you can .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
  • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard .
  • As of this writing, there are these 20: org json org json me Jackson JSON Processor Json lib JSON Tools json simple Stringtree SOJO Restlet Jettison json taglib XStream JsonMarshaller Flexjson JON tools google gson Argo Pivot jsonij fastjson but of course the list can change .
  • According to my reading of both the code and comments of the JSONObject class ( simple source browse trunk src main java org json simple JSONObject java), it doesn't do anything to preserve the order of the keys .
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json encode() of course, you shouldn't wouldn't do this, but you can .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
  • As of this writing, there are these 20: org json org json me Jackson JSON Processor Json lib JSON Tools json simple Stringtree SOJO Restlet Jettison json taglib XStream JsonMarshaller Flexjson JON tools google gson Argo Pivot jsonij fastjson but of course the list can change .
  • According to my reading of both the code and comments of the JSONObject class ( simple source browse trunk src main java org json simple JSONObject java), it doesn't do anything to preserve the order of the keys .
  • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard .
  • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json encode() of course, you shouldn't wouldn't do this, but you can .
  • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose) .
Summaries of the opinions about com.googlecode.json-simple using Opinosis, an abstractive summarizer of opinions..
  • json simple library .
  • the simple library , you should be able to do something like this :/: codesnippet java1 and this :/: .
  • json simple ] (/( )/) which is , simple the name implies and simple .
  • json simple its a high performance library and its very easy to use :/: codesnippet java1 .
  • n't have a java bean but want to create json use libraries like json simple .
  • able to get the unmodified example , and the original authors have not explained their code .
  • json simple looks relatively easy to use (/( examples below )/) .
  • the string to keep the order of and use javacsv library from here to csv format .
  • your use case could be handled much better with a json processor like json simple (/( .
  • an json object out of string here is a code snippet to read a json object .
  • using json )/) prevents the user from the backend (/( using json )/) do bad and bad stuff .
  • this , the way it behaves you are able to manually construct parts of the json .
  • cmd ''/'' :/: ``/`` bad\u0020stuff ''/'' }/) , bad stuff happens :/: codesnippet java4 .
  • problem , and wonder why they run into problems later when they use a stricter implementation .
  • for the record (/( as per my deleted answer because the question was initially unclear )/) .
  • problem is the complicated class java has for actually parsing json , you may use json .
  • the source (/( in order to be able to read through and understand their purpose )/) .
  • problems is that there are too many classes in the library which are not properly documented .
  • number literals or boolean literals (/( )/) on their own but i suspect many parsers will .
  • little bug though which i think could be easily solved :/: i 'm using this anyway .
Summaries of the opinions about com.googlecode.json-simple using contrastive viewpoints. Each entry contains a pair of positive and negative sentences that are most likely discussing about similar API features.
    • Using the excellent json simple library, you should be able to do something like this: CODESNIPPET JAVA1 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • You can use json simple its a high performance library and its very easy to use : CODESNIPPET JAVA1 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • I like the json simple library for parsing the results .
    • if your problem is because of the complicated class java has for actually parsing JSON, you may use JSON simple library .
    • I'll be very grateful CODESNIPPET JAVA1 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • and sometimes getting return like this: CODESNIPPET JAVA2 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • In JSON simple, you would do: CODESNIPPET JAVA2 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • Using the excellent json simple library, you should be able to do something like this: CODESNIPPET JAVA1 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • You can use json simple its a high performance library and its very easy to use : CODESNIPPET JAVA1 .
    • But I get an error message : CODESNIPPET JAVA3 .
    • I like the json simple library for parsing the results .
    • if your problem is because of the complicated class java has for actually parsing JSON, you may use JSON simple library .
    • I'm making a Java game, where I want to save files to be in JSON and I'm using JSON simple library for that .
    • What stupid mistake am I making?.
Summaries of opinions about based on specific API aspects, such as, performance, usability, etc. The 'Overview' page provides an overview of the aspects detected in the opinions. The 'Trend' page shows the distribution of polarity over time for each aspect. The 'Positive Opinions' page groups positive opinions by the detected aspects. The 'Contrastive By Aspect' page shows paris of contrastive opinions under each aspect (where found).
Features:
  • I'll be very grateful CODESNIPPET_JAVA1 .
  • @SLaks: In UserFacingService, it returns bad\u0020stuff.
Documentation:
  • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .
  • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.
Legal:
  • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.
  • N/A
Community:
  • N/A
  • But then if the user sends CODETERM8 , bad stuff happens: CODESNIPPET_JAVA4 .
Onlysentiment:
  • Many thanks :).
  • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.
Performance:
  • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .
  • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.
Security:
  • more human readable for debugging.
  • N/A
Bug:
  • , fix the imports and it works for me.
  • Manually adding json-simple-1.1.1.jar to the Class-Path in the manifest.mf still creates the same error message.
Usability:
  • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( URL_https://code.google.com/p/json - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.
  • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.
  • Features: 10
    1. object: 2
      • Debugging I have found that parse method returns an object that is a Map!. details
      • Here's another discussion on the same topic that is useful: URL_http://stackoverflow.com/questions/8941768/how-to-add-an-url-in-a-json- object [how-to-add-an-URL-in-a-JSON-object] .. details
    2. return: 1
      • and sometimes getting return like this: CODESNIPPET_JAVA2 .. details
    3. service: 1
      • I am hitting a service and sometimes getting back something like this: CODESNIPPET_JAVA1 .. details
    4. general: 6
      • I'll be very grateful CODESNIPPET_JAVA1 .. details
      • How can I deal with the key with a special character CODETERM2 in it?. details
      • Any advice would be greatly appreciated.. details
      • Can someone please help?. details
      • hey hi i didnt find in it can you give me link.. details
      • hey hi i didnt find in it can you give me link.. details
  • Documentation: 24
    1. output: 1
      • I think you don't need an aditional libray, but use cutomized output of json- simple library.Check this example: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_6-1_-_Customize_JSON_outputs [json-simple :-Customize-JSON-outputs] .. details
    2. string: 4
      • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
      • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
      • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
      • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
    3. json-simple: 3
      • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
      • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
      • I haven't look at this issue in over a year, but if you're willing to modify the source code a bit, URL_http://code.google.com/p/json - simple/issues/detail?id=22 has some information on enhancing json-simple with pretty-printing.. details
    4. general: 16
      • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
      • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
      • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
      • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
      • I'm using the JSON.simple toolkit found URL_http://code.google.com/p/json- simple/ [here] Here's my code.. details
      • For reference, see "Example 1" on the URL_http://code.google.com/p/json- simple/wiki/DecodingExamples [json-simple-decoding-example] page.. details
      • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
      • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
      • As an option, you can check URL_http://code.google.com/p/json-simple/ [JSON- Simple] .. details
      • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
      • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
      • URL_http://code.google.com/p/json-simple/ [json-simple] was excellent: tiny, with a simple API that generates HashMap/ArrayList with a single call.. details
      • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .. details
      • I used a few of them and my favorite is, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] The library is very small so it's perfect for J2ME.. details
  • Legal: 2
    1. general: 2
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • Onlysentiment: 25
    1. general: 25
  • Performance: 3
    1. general: 3
      • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
      • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
      • A fast, simple, lightweight parser that I like is json-simple.. details
  • Security: 2
    1. general: 2
      • more human readable for debugging.. details
      • more human readable for debugging.. details
  • Bug: 4
    1. general: 4
      • , fix the imports and it works for me.. details
      • (The first case will sometimes have [] in it so I can't do index of and I'd like a cleaner way than just checking the first character.. details
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
  • Usability: 113
    1. pretty-print: 2
      • any library that can pretty-print json in java, I'm using URL_http://code.google.com/p/json-simple/ [json-simple] ?. details
      • any library that can pretty-print json in java, I'm using URL_http://code.google.com/p/json-simple/ [json-simple] ?. details
    2. javascript: 2
      • I'm not really an expert on Javascript so I bet there's a more elegant way to do it.... details
      • I haven't tried the Java snippet, but the Javascript code is awesome :).. details
    3. general: 70
      • Another library that would be great to traverse such JSON 'trees' is [JSON.Simple]( URL_https://code.google.com/p/json-simple/) .. details
      • You can use [json-simple]( URL_http://code.google.com/p/json-simple /) which is simple, as the name implies.. details
      • Reason you want to pretty print it?. details
      • This worked perfectly!!. details
      • , fix the imports and it works for me.. details
      • You can use [json-simple]( URL_http://code.google.com/p/json-simple /) which is simple, as the name implies.. details
      • Reason you want to pretty print it?. details
      • This worked perfectly!!. details
      • I'm making a Java game, where I want to save files to be in JSON and I'm using JSON.simple library for that.. details
      • I have found out, that JSONLib can save for example Float and afterwards, read it as a Float (that's basically what I want).. details
      • This code would be a good example of how not to do it.. details
      • REPLY I currently don't understand how i can get the array in [dropped], I did some of the easier example, but this is a first for me.. details
      • It seems like there a hierarchy but I don't know how to access it** .. details
      • That works as well.. details
      • As you can see, it works as intended: CODESNIPPET_JAVA2 .. details
      • That works as well.. details
      • As you can see, it works as intended: CODESNIPPET_JAVA2 .. details
      • I'm using JSON Simple libraries.. details
      • If my answer was helpful, feel free to upvote/accept.. details
      • In JSON simple, you would do: CODESNIPPET_JAVA2 .. details
      • Infact I was not able to get the unmodified example working either, and the original authors have not explained their code.. details
      • Infact I was not able to get the unmodified example working either, and the original authors have not explained their code.. details
      • (The first case will sometimes have [] in it so I can't do index of and I'd like a cleaner way than just checking the first character.. details
      • Json how to get value from key with special character - json-simple.. details
      • I cannot get a value from a key, because the key has a CODETERM1 in it.. details
      • Okay, I just tested it with Java (OpenJDK 1.6.0, using the libjson-simple-java library) and it worked fine.. details
      • JSON.Simple is neat to with a very simple to use API.. details
      • A fast, simple, lightweight parser that I like is json-simple.. details
      • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
      • URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .. details
      • But, you're in luck!. details
      • First, you may want to use the JSON simple library, I believe it doesn't automatically escape your strings like that.. details
      • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
      • Using the excellent URL_http://code.google.com/p/json-simple [json-simple] library, you should be able to do something like this: CODESNIPPET_JAVA1 .. details
      • I'm using the JSON.simple toolkit found URL_http://code.google.com/p/json- simple/ [here] Here's my code.. details
      • with about a dozen more artists, all distinguished individually by curly braces with commas in-between.. details
      • Wondering if there is a simpler way in simple-json itself or if there are other libraries that better.. details
      • For reference, see "Example 1" on the URL_http://code.google.com/p/json- simple/wiki/DecodingExamples [json-simple-decoding-example] page.. details
      • I hope somebody can help me with a code line which I am missing in my code.. details
      • It will work after all!.. details
      • If you don't have a Java bean but want to create json use libraries like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • If you don't have a Java bean but want to create json use libraries like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • Update: I just tried to implement it using JSON Simple, and it works out of the box very easily by the following code: CODESNIPPET_JAVA3 .. details
      • I use [json-simple]( URL_http://code.google.com/p/json-simple/) , which is as the name implies - simple :).. details
      • I use [json-simple]( URL_http://code.google.com/p/json-simple/) , which is as the name implies - simple :).. details
      • Ha nice.. details
      • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
      • Assuming you're using an URL_http://download.oracle.com/javaee/6/api/javax/ser vlet/http/HttpServlet.html [HttpServlet] and a JSON library like URL_http://code.google.com/p/json-simple/ [json-simple] you could do something like this: CODESNIPPET_JAVA1 .. details
      • As an option, you can check URL_http://code.google.com/p/json-simple/ [JSON- Simple] .. details
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
      • They have an open issue for this, no luck with a fix so far: URL_http://code.google.com/p/json-simple/issues/detail?id=8 [ URL_http://code.google.com/p/json-simple/issues/detail?id=8 ] I just hacked their source code.. details
      • Life is so much simple with json-simple.. details
      • more human readable for debugging.. details
      • more human readable for debugging.. details
      • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • I happen to like URL_http://code.google.com/p/json-simple/ [json-simple] .. details
      • Use JSON Simple, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] Which has a small foot-print, no dependencies so it's perfect for Android.. details
      • Use JSON Simple, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] Which has a small foot-print, no dependencies so it's perfect for Android.. details
      • Thanks MatthewI didnt realize it was that advanced.. details
      • Thanks MatthewI didnt realize it was that advanced.. details
      • It also has other features, like a URL_http://code.google.com/p/json-simple/wiki/DecodingExamples#Example_5_- _Stoppable_SAX-like_content_handler [SAX-style-API] .. details
      • I would recommend using URL_http://code.google.com/p/json-simple/ [json- simple] or one of the other JSON libraries for Java that have developed.. details
      • I would recommend using URL_http://code.google.com/p/json-simple/ [json- simple] or one of the other JSON libraries for Java that have developed.. details
      • It also has other features, like a URL_http://code.google.com/p/json-simple/wiki/DecodingExamples#Example_5_- _Stoppable_SAX-like_content_handler [SAX-style-API] .. details
      • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
      • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).. details
      • URL_http://code.google.com/p/json-simple/ [json-simple] was excellent: tiny, with a simple API that generates HashMap/ArrayList with a single call.. details
      • And perfect for J2ME?. details
      • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .. details
      • I used a few of them and my favorite is, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] The library is very small so it's perfect for J2ME.. details
    4. string: 8
      • It should be pretty simple to check if the string begins and ends with [].. details
      • There are many JSON parsers.I found URL_https://code.google.com/p/json-simple/ [json-simple] easy to implement.A set of URL_https://code.google.com/p/json- simple/wiki/DecodingExamples [decoding-examples] show how to create an JSON- Object out of String Here is a code-snippet to read a JSON object from String.. details
      • There are many JSON parsers.I found URL_https://code.google.com/p/json-simple/ [json-simple] easy to implement.A set of URL_https://code.google.com/p/json- simple/wiki/DecodingExamples [decoding-examples] show how to create an JSON- Object out of String Here is a code-snippet to read a JSON object from String.. details
      • I just rewrote the application with json-simple and it works great, you don't even have to escape() it, by default it treats string as string and not trying to parse it as JSON.. details
      • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
      • There are some libraries to parse json string into java objects: URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://www.json.org/java/ [ URL_http://www.json.org/java/ ] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://jackson.codehaus.org/ [jackson] This URL_http://stackoverflow.com/questions/338586/a-better-java-json-library [link] is very usefull!. details
      • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
      • I used the JSON.simple library from here URL_https://code.google.com/p/json- simple/ [ URL_https://code.google.com/p/json-simple/ ] to read the JSON string to keep the order of keys and use JavaCSV library from here URL_http://sourceforge.net/projects/javacsv/ [ URL_http://sourceforge.net/projects/javacsv/ ] to convert to CSV format.. details
    5. netbeans: 1
      • Running through Netbeans works perfectly.. details
    6. data: 1
      • The structure that JSON.simple deserialized into was a Map, where each entry key is a String, and each entry value is either a simple data type or another Map.. details
    7. object: 2
      • To prevent all the object creation, look at event driven xml and json handling like URL_http://www.saxproject.org/ [SAX] for XML and URL_http://code.google.com/p/json-simple/ [Json-Simple] and/or URL_http://jackson.codehaus.org/ [Jackson] for JSON.. details
      • To prevent all the object creation, look at event driven xml and json handling like URL_http://www.saxproject.org/ [SAX] for XML and URL_http://code.google.com/p/json-simple/ [Json-Simple] and/or URL_http://jackson.codehaus.org/ [Jackson] for JSON.. details
    8. parsing: 2
      • I like the URL_https://code.google.com/p/json-simple/ [json-simple] library for parsing the results.. details
      • I like the URL_https://code.google.com/p/json-simple/ [json-simple] library for parsing the results.. details
    9. streaming: 2
      • Use a JSON Streaming parser like URL_https://code.google.com/p/json-simple/ [json-simple] or URL_http://wiki.fasterxml.com/JacksonHome [Jackson] .. details
      • Use a JSON Streaming parser like URL_https://code.google.com/p/json-simple/ [json-simple] or URL_http://wiki.fasterxml.com/JacksonHome [Jackson] .. details
    10. jackson: 2
      • Jackson or json-simple from Google would be my recommendations: URL_http://code.google.com/p/json-simple/ .. details
      • Jackson or json-simple from Google would be my recommendations: URL_http://code.google.com/p/json-simple/ .. details
    11. json-simple: 11
      • Since I don't see anything like that in the json-simple examples I'm going to assume it doesn't support that.. details
      • I got a _date_ value (_19.11.2013_), but I don't know how to get child's values of _date_ and _time_.I'm using json-simple library.. details
      • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
      • 1 - For example, the nitwits that this poor developer was working for ... URL_http://stackoverflow.com/a/4515863/139985 [ URL_http://stackoverflow.com/a/4515863/139985 ] 2 - JSON-simple : URL_https://code.google.com/p/json-simple/ [ URL_https://code.google.com/p/json-simple/ ] .. details
      • Your use case could be handled much better with a free- form JSON processor like json-simple ( URL_http://code.google.com/p/json-simple) .. details
      • Your use case could be handled much better with a free- form JSON processor like json-simple ( URL_http://code.google.com/p/json-simple) .. details
      • Hmm... JSON-simple doesn't look like it will quite work.. details
      • I haven't look at this issue in over a year, but if you're willing to modify the source code a bit, URL_http://code.google.com/p/json - simple/issues/detail?id=22 has some information on enhancing json-simple with pretty-printing.. details
      • Did you find out how to get json-simple working with integrated pretty-print?. details
      • Otherwise, json-simple is much simpler to use and the JAR is much smaller (14k vs 43k).. details
      • For instance, the json-simple version of URL_https://code.google.com/p/json- simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java [JSONObject] implements Map and URL_https://code.google.com/p/json- simple/source/browse/trunk/src/main/java/org/json/simple/JSONArray.java [JSONArray] implements List.. details
    12. output: 1
      • I think you don't need an aditional libray, but use cutomized output of json- simple library.Check this example: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_6-1_-_Customize_JSON_outputs [json-simple :-Customize-JSON-outputs] .. details
    13. interface: 1
      • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json-simple/ ] Stoppable SAX-like interface for streaming input of JSON text 2.. details
    14. performance: 2
      • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
      • You can use URL_https://code.google.com/p/json-simple/ [json-simple] its a high performance library and its very easy to use : CODESNIPPET_JAVA1 .. details
    15. decoding: 2
      • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( URL_https://code.google.com/p/json - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.. details
      • Have you checked with example 5(Stoppable SAX-like content handler) in [JSON official decoding tutorial]( URL_https://code.google.com/p/json - simple/wiki/DecodingExamples)As I can see that the code is intended for single dictionary(Map)/Array.. details
    16. root: 2
      • Just think of it like XML - you can't have a valid XML document without a root node.. details
      • Just think of it like XML - you can't have a valid XML document without a root node.. details
    17. gson: 2
      • @mabuzer Gave up...just using Gson (for pretty-print) + json-simple for everything else.. details
      • I've been thinking for these two JSON library: Google Gson JSON.Simple XStream Google Gson is pretty awesome, it can serialize class object that have no-args constructor.. details
  • Features: 9
    1. general: 9
      • @SLaks: In UserFacingService, it returns bad\u0020stuff.. details
      • @SLaks: In UserFacingService, it returns bad\u0020stuff.. details
      • Sending CODETERM7 should cause the user facing service to reject the command: CODESNIPPET_JAVA3 .. details
      • Sending CODETERM7 should cause the user facing service to reject the command: CODESNIPPET_JAVA3 .. details
      • ): My bad... details
      • This also did the trick.. details
      • This also did the trick.. details
      • objects containing huge bytes What are the scenarios where marshaling _can't take it anymore_ or _bang against the wall_?. details
      • It just never sent it as UTF-8, no matter which tricks I tried on backend side.After changing to CODESNIPPET_JAVA3 .. details
  • Documentation: 8
    1. general: 8
      • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
      • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
      • It should be possible, but i think you hold it the wrong way around:parse will PARSE json-text content, and provide you with an Java-equivalent ("decoding") look at the sample on the homepage: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_1-3_-_Encode_a_JSON_object_-_Using_Map [ URL_http://code.google.com/p/json-simple/wiki/EncodingExamples Example_1-3_ _Encode_a_JSON_object_-_Using_Map] .. details
      • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .. details
      • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
      • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • Community: 2
    1. general: 2
      • But then if the user sends CODETERM8 , bad stuff happens: CODESNIPPET_JAVA4 .. details
      • But then if the user sends CODETERM8 , bad stuff happens: CODESNIPPET_JAVA4 .. details
  • Onlysentiment: 5
    1. general: 5
      • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.. details
      • -1: completely wrong.. details
      • What stupid mistake am I making?. details
      • Sorry!.. details
      • How do I avoid this?. details
  • Performance: 2
    1. general: 2
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
  • Bug: 15
    1. exception: 3
      • on the second case I get an exception CODESNIPPET_JAVA4 .. details
      • But I get the following exception: Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject at javaapplication1.JavaApplication1.main(JavaApplication1.java:24) Can somebody tell me what I am doing wrong?. details
      • This throw a exception Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray What is the problem in this code ?. details
    2. general: 12
      • Yeah it was an error on the server side.. details
      • Yeah it was an error on the server side.. details
      • Manually adding json-simple-1.1.1.jar to the Class-Path in the manifest.mf still creates the same error message.. details
      • Even "java -cp json-simple-1.1.1.jar -jar still give the same error.. details
      • When I try running it through the command line "java -jar " I get the following error.. details
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
      • But I get an error message : CODESNIPPET_JAVA3 .. details
      • When I try and change all of the "JSONObject"s in the CODETERM10 method to CODETERM11 , an error occurs, saying that it is unable to cast a CODETERM12 to a CODETERM13 .. details
      • You get that error on what line??. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
  • Usability: 47
    1. extract: 1
      • The problem is, I want to be able to, say, extract all dozen or so artists from the search result.. details
    2. string: 4
      • classes within classes, and the like Very long String values in classes within classes and those sort of things Size of object, i.e.. details
      • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json_encode() ...of course, you shouldn't/wouldn't do this, but you can.. details
      • There is an argument that it should return NULL instead in this situation, but with the way it behaves you are able to manually construct parts of the JSON string yourself, and get other parts from json_encode() ...of course, you shouldn't/wouldn't do this, but you can.. details
      • I'm using Json-Simple to write a config file using JSon-Simple lib, but I'm having problems converting the json string to map.. details
    3. service: 2
      • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
      • The user facing service (using URL_https://code.google.com/p/quick-json/ [quick-json] ) prevents the user from making the backend (using URL_https://code.google.com/p/json-simple/ [json-simple] ) do bad stuff.. details
    4. encoding: 1
      • Hi dsh, As you pointed out it is problem with the character encoding of my IDE which is set by default to the encoding of native operating system.. details
    5. jsonobject: 1
      • As you can see in the code I posted, it is a static method of the JSONObject class.. details
    6. list: 2
      • As of this writing, there are these 20: URL_http://www.JSON.org/java/index.html [org.json] URL_https://github.com/upictec/org.json.me/ [org.json.me] URL_http://jackson.codehaus.org/ [Jackson-JSON-Processor] URL_http://json-lib.sourceforge.net/ [Json-lib] URL_http://developer.berlios.de/projects/jsontools/ [JSON-Tools] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://www.stringtree.org/stringtree-json.html [Stringtree] URL_http://sojo.sourceforge.net/ [SOJO] URL_http://www.restlet.org/ [Restlet] URL_http://jettison.codehaus.org/ [Jettison] URL_http://json-taglib.sourceforge.net/ [json-taglib] URL_http://xstream.codehaus.org/ [XStream] URL_http://code.google.com/p/jsonmarshaller/ [JsonMarshaller] URL_http://flexjson.sourceforge.net/ [Flexjson] URL_http://sourceforge.net/projects/jontools/ [JON-tools] URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://argo.sourceforge.net/ [Argo] URL_http://pivot.apache.org/ [Pivot] URL_http://jwm.slavitica.net/p/projects/jsonij [jsonij] URL_http://sourceforge.net/projects/fastjson/ [fastjson] ...but of course the list can change.. details
      • As of this writing, there are these 20: URL_http://www.JSON.org/java/index.html [org.json] URL_https://github.com/upictec/org.json.me/ [org.json.me] URL_http://jackson.codehaus.org/ [Jackson-JSON-Processor] URL_http://json-lib.sourceforge.net/ [Json-lib] URL_http://developer.berlios.de/projects/jsontools/ [JSON-Tools] URL_http://code.google.com/p/json-simple/ [json-simple] URL_http://www.stringtree.org/stringtree-json.html [Stringtree] URL_http://sojo.sourceforge.net/ [SOJO] URL_http://www.restlet.org/ [Restlet] URL_http://jettison.codehaus.org/ [Jettison] URL_http://json-taglib.sourceforge.net/ [json-taglib] URL_http://xstream.codehaus.org/ [XStream] URL_http://code.google.com/p/jsonmarshaller/ [JsonMarshaller] URL_http://flexjson.sourceforge.net/ [Flexjson] URL_http://sourceforge.net/projects/jontools/ [JON-tools] URL_http://code.google.com/p/google-gson/ [google-gson] URL_http://argo.sourceforge.net/ [Argo] URL_http://pivot.apache.org/ [Pivot] URL_http://jwm.slavitica.net/p/projects/jsonij [jsonij] URL_http://sourceforge.net/projects/fastjson/ [fastjson] ...but of course the list can change.. details
    7. spec: 2
      • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own - but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard.. details
      • Anything that follows the spec strictly shouldn't accept just "string" or number literals or boolean literals (scalar values) on their own - but I suspect many parsers will, as often parsers are designed to forgive small deviations from the standard.. details
    8. parsing: 3
      • JSON parsing using JSON-Simple not working.. details
      • if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.. details
      • if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.. details
    9. exception: 2
      • But I get the following exception: Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject at javaapplication1.JavaApplication1.main(JavaApplication1.java:24) Can somebody tell me what I am doing wrong?. details
      • This throw a exception Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray What is the problem in this code ?. details
    10. json-simple: 4
      • The problem with GSON, it's complicated, json-simple is far easier.. details
      • Thanks :) currently looking at Gson, I'm using this json-simple lib, which I suspect is lacking a few good feature I need.. details
      • JSON-Simple by default probably uses a HashMap under the hood and intentionally does not preserve the order of the keys in the original JSON.. details
      • What's the trick here?I am using this map to make JSON object with json-simple and send it from server to client.. details
    11. general: 21
      • This makes code look very ugly and hard to read.. details
      • What am I doing wrongly?I am using json-simple-1.1.1 .. details
      • Consequently, I am struggling to understand how to use a lot of these classes.. details
      • Consequently, I am struggling to understand how to use a lot of these classes.. details
      • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose).. details
      • One of my problems is that there are too many classes in the library which are not properly documented, and for which I do not have the source (in order to be able to read through and understand their purpose).. details
      • I'm just thinking out loud here to understand what could go wrong when using these kinds of frameworks as a backbone for my applications.. details
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
      • Which is annoying, because it means people then deviate from the standard without a problem, and wonder why they run into problems later when they use a stricter implementation.. details
      • It should be possible, but i think you hold it the wrong way around:parse will PARSE json-text content, and provide you with an Java-equivalent ("decoding") look at the sample on the homepage: URL_http://code.google.com/p/json- simple/wiki/EncodingExamples#Example_1-3_-_Encode_a_JSON_object_-_Using_Map [ URL_http://code.google.com/p/json-simple/wiki/EncodingExamples Example_1-3_ _Encode_a_JSON_object_-_Using_Map] .. details
      • When I try and change all of the "JSONObject"s in the CODETERM10 method to CODETERM11 , an error occurs, saying that it is unable to cast a CODETERM12 to a CODETERM13 .. details
      • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .. details
      • Having dug around in the JSON.simple's repo I found their .java source files, which we can use with their IDEs.. details
      • This is a sampling of the worst JSON-to/from-Java libraries, right?. details
      • From URL_http://www.json.org [ URL_http://www.json.org ] , under the Java section: URL_http://www.json.org/java/index.html [ URL_http://www.json.org/java/index.html ] URL_http://json-lib.sourceforge.net/ [ URL_http://json-lib.sourceforge.net/ ] URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json-simple/ ] URL_http://code.google.com/p/jjson/ [ URL_http://code.google.com/p/jjson/ ] Pick your poison .. details
      • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
      • For the record (as per my deleted answer because the question was initially unclear), OP is using [json-simple]( URL_http://code.google.com/p/json-simple /) and want to prevent JS-escaping.. details
      • I really doubt there is such a library that is built to handle this.. details
      • I really doubt there is such a library that is built to handle this.. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
      • JSON- Simple have a little bug though which I think could be easily solved: URL_http://code.google.com/p/json-simple/issues/detail?id=18 I'm using this anyway, thanks for the link.. details
    12. data: 2
      • They are both designed for representing vectors and complex structures, the assumption being that if you have simple/scalar data to transmit, you can just pass it directly.. details
      • They are both designed for representing vectors and complex structures, the assumption being that if you have simple/scalar data to transmit, you can just pass it directly.. details
    13. class: 2
      • According to my reading of both the code and comments of the JSONObject class ( URL_https://code.google.com/p/json - simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java), it doesn't do anything to preserve the order of the keys.. details
      • According to my reading of both the code and comments of the JSONObject class ( URL_https://code.google.com/p/json - simple/source/browse/trunk/src/main/java/org/json/simple/JSONObject.java), it doesn't do anything to preserve the order of the keys.. details
  • Documentation
    1. URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .
      • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .
    2. URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .
      • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .
  • Usability
    1. You can use [json-simple]( URL_http://code.google.com/p/json-simple /) which is simple, as the name implies.
      • if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.
    2. URL_http://code.google.com/p/json- simple/ [ URL_http://code.google.com/p/json-simple/ ] .
      • URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .
    3. URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] That's a really simple json library ( pun intended ) I think the easiest to get started with , let us know if you have any trouble with it .
      • This is my favorite, URL_http://code.google.com/p/json-simple/ [ URL_http://code.google.com/p/json - simple/] .
    4. if your problem is because of the complicated class java has for actually parsing JSON, you may use URL_http://code.google.com/p/json-simple [JSON.simple] library.
      • URL_http://code.google.com/p/json-simple/ [JSON-Simple] looks relatively easy to use (examples below).