Reputation: 4342
CLDR releases 23 through 24 include a tool for converting the XML data to JSON. The documentation on these tools is pretty much non-existant. I need to convert all of the XML data to JSON. How can I do that?
What I have tried so far:
tools.zip
from http://unicode.org/Public/cldr/23.1/, extracted it, opened Terminal at the tools/java
directory. Then I read the instructions in tools/java/readme.txt
.ant clean all
I tried to run the JSON tool using: java org.unicode.cldr.json.Ldml2JsonConverter
- but that results in an error being thrown:
Exception in thread "main" java.lang.NoClassDefFoundError: org/unicode/cldr/json/Ldml2JsonConverter
Caused by: java.lang.ClassNotFoundException: org.unicode.cldr.json.Ldml2JsonConverter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Perhaps I am just doing something totally wrong, because I don't know much anything about Java. I need to get the JSON for my node.js project.
Upvotes: 0
Views: 824
Reputation: 4350
probably a better Q for the cldr list.. you will need to start with
ant jar
java -DCLDR_DIR=/path/to/cldr -jar cldr.jar org.unicode.cldr.json.Ldml2JsonConverter -h
the "-h" will give options to the tool and /path/to/cldr shold be a path containing common and main
Upvotes: 0