[json-lib-user] First impressions
Brought to you by:
aalmiray
From: Tim P. <tim...@ou...> - 2009-05-19 09:58:26
|
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) |