Bringing this old topic back up, as I noted something in the new
json.org library that might be useful: the JSONTokener [1] now allows
for passing a Reader, and not only a String. I think this is far more
efficient, especially when you want to handle possibly larger JSON
from request bodies, eg. for SLING-1172 [2].

Also, I noticed that those sources from json.org include stuff for
mapping HTTP headers to JSON and back, same for XML. I highly doubt
that this is useful as a base json lib. Therefore an update to the
newest json org should include:

a) introducing our changes wrt order of properties (LinkedHashMap
instead of HashMap) and deep recursion
b) only keep the 7 base sources, namely JSON* with * = [Object,
String, Array, Stringer, Writer, Tokener, Exception]

Because of only 7 files, I don't think it is actually hard to
re-introduce our small changes.

[1] http://www.JSON.org/java/org/json/JSONTokener.java
[2] https://issues.apache.org/jira/browse/SLING-1172

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to