This is an interesting idea and could be a way to provide quickly an
initial implementation of the JSON format. However the scripting API is
only available in Java 6, and Commons Configuration 2.0 targets Java 5
(Commons Configuration 1.x is stuck with the Java 1.3 compatibility). In
the end we'll have to write our own parser to support a wide range of
systems (Mac OS X doesn't have a final release of Java 6 yet).
Instead of the standard scripting API we may use the Rhino API directly,
but this is a heavy dependency (700k) for such a simple format.
Emmanuel Bourg
Hao Zheng a écrit :
hi all configuration devs,
I have a simple and straightforward idea on JSON format. Since Java 6
suppports scripting in Java, it include the Mozilla Rhino engine for
the JavaScript programming language. JSON is a subset of Javascript,
so we can use a simple call "eval()" to parse the configuration file.
Then we can access the structure in Java, as described in
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/
. In this way, no parser is needed. Do you think it could be a
possible way?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]