> I haven't the time to check what kind of structure was currently returned > in the JSON string, but yes, my first idea was to use basic Java Objects: > - Object arrays to store arrays, > - HashTable to store properties, > - Integer, String, Boolean, ... (and probably arrays also) to store > property value
Yes, that sounds right to me. > An other solution would be to use JSON classes (JSONObject and JSONArray): > see http://www.crockford.com/JSON/java/index.html > > With the JSON classes, the getProperty could return a JSONObject or a > JSONArray, that could be: > - easily converted to a JSON string in the getJSONProperty() method for > the applet > - browsed from other Java methodes for example to extend the povray export > function I don't really like this. I think that there should be a Java interface which returns the restricted set of Java objects that you described above. Then, we can build a generic JSON converter that will convert the objects. > The above are only first thoughts, they need to be examined and discussed > more in depth Agreed. >>> - have a getJSONProperty() method that would use getProperty() to get >>> the >>> data and then convert the data to the JSON format. >>> >>> What do you think ? >> >>I think that I would lean towards something like that. > > > Good :) > > Before extendind the number of properties that are currently available, we > need to agree and decide on the basics Yes. We should agree on the mechanism and then we will have a framework where we can plug in the different properties. Miguel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
