De: "Miguel" <[EMAIL PROTECTED]> >> I was thinking that maybe it could be done by separating the JSON encoding >> from the gathering of properties: >> - have a getProperty() method that would return Java objects > >What is the type of the Java objects ... Hashtable?
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 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 The above are only first thoughts, they need to be examined and discussed more in depth >> - 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 Nico ------------------------------------------------------- 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
