> Let's try to work on how to make it useable for both Java and JavaScript. > > First, I think we should concentrate on defining the kind of data > structure the getProperty() mechanism should be able to return.
Agreed. > I am putting a first draft in this mail. > > My understanding is: > - The getProperty() method could return an "Object" or an ordered array > of "Object". Agreed > - An "Object" itself is simply an unordered collection of "Property". I think that "Property" can be an instance of java.util.Properties > - A "Property" is the combination of a "Property Name" and a "Property > Value". > - A "Property Name" is a string. > - A "Property Value" can be of several kinds: string, integer, floating > point, boolean, (are there others ?), For Java I think these would be String, Integer, Double, and Boolean. I think that Double is more appropriate than Float for external usage by a client program. No others > "Object" I am somewhat hesitant to allow an "Object" in this case. I am concerned about the data structures becoming too deep. > or even an ordered array > of one of the previous types. > and that's all. > > After writing it, it seems quite simple. > Am I wrong ? What have I overlooked ? > Don't hesitate to add comment, say I am wrong, ... I think that is correct. > If I am not too far off, that should be easy to implement the > getProperty() method to return a Java object, and the getJsonProperty() > method to convert this Java object into a JSON string. Yes. I agree that it should be straightforward. > What do you think ? I think it sounds right. However, I think that there may be another piece. I think that we may need to have a mechanism to have a 'reference' to an internal object without having the object itself. This fits in with my concern about having nested "Objects". But this is a good step as an extension of Bob's work. 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
