Re: [json-lib-user] First impressions
Brought to you by:
aalmiray
From: Andres A. <aal...@ya...> - 2009-05-19 15:28:31
|
Hi Tim, Thank you for checking out Json-lib, we hope it proves to be helpful to you. Now answers to your questions: "JSONObject uses a HashMap for its properties representation because the order of its properties is not important." - this is no longer true, as a matter of fact JSONObject uses a LinkedHashMap to preserver insertion order, the FAQ must be updated. Have in mind that the JSON semantics still declare a JSONObject to be a Bag, per the spec. " What is the relationship to json.org?" - Json-lib was born from the code found at json.org and evolved from there. "It looks like you have stopped using Maven to actually build the artefacts, I am new to the list and would like to know why." - this is due to the current jdk3/jdk5 setup, given that maven is unable to handle several source paths that may contain "duplicate" class definitions. We tried using maven's ant plugin but it didn't quite work, nor maven's profile option. These days the Ant build does all the work, but still uses the pom file for dependency management "Oh, I forgot, the main problem, which prompted me to join the list, is that the optional setting on the xom jar caused me to have a runtime error reported by a user. " - an optional dependency means you don't need to download it in order to use the library, however you must download it in order to compile one part of the library (xml support). Cheers, Andres ------------------------------------------- http://jroller.com/aalmiray http://www.linkedin.com/in/aalmiray -- What goes up, must come down. Ask any system administrator. There are 10 types of people in the world: Those who understand binary, and those who don't. To understand recursion, we must first understand recursion. ________________________________ From: Tim Pizey <tim...@ou...> To: jso...@li... Sent: Tuesday, May 19, 2009 2:58:08 AM Subject: [json-lib-user] First impressions Hi, I am just starting with json-lib, and thought you might like to see where I bump into the furniture: I came to json-lib as a replacement for org.json in the hope of getting junit testing facilities, which I have got, thank you. I would be interested in more about FAQ 1, as I cannot see any situation in which a Bag is the right choice: the population order is of interest and should be preserved. To do otherwise is to throw information away. The bald statement "JSONObject uses a HashMap for its properties representation because the order of its properties is not important." is a bit strong for me. Whilst I am sure that it is correct I would like to know what would happen if this assumption were not so central. I like to round trip in unit tests, the throwing away of information, ie the deliberate removal of ordering means that I am unable to do this with ease, am not able to use string comparision for equality and have had to put in a lot of work. Would it not have been possible to preserve the ordering? Would the performance hot have been so bad? FAQ What is the relationship to json.org? It looks like you have stopped using Maven to actually build the artefacts, I am new to the list and would like to know why. When I checkout and type mvn install I get test failure (Kubuntu/sun java6/AMD64) cheers Tim [INFO] Surefire report directory: /dist/json-lib/target/surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantiate POJO 'class net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor'; nested exception is java.lang.InstantiationException: net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: Unable to instantiate POJO 'class net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor'; nested exception is java.lang.InstantiationException: net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor org.apache.maven.surefire.testset.TestSetFailedException: Unable to instantiate POJO 'class net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor'; nested exception is java.lang.InstantiationException: net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor java.lang.InstantiationException: net.sf.json.TestJSONObject$PrefixerPropertyNameProcessor at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ json-lib-user mailing list jso...@li... https://lists.sourceforge.net/lists/listinfo/json-lib-user |