Hi, I just downloaded the Java implementation and I plan to start using it
on a real project.
If you don't mind, I would like to reorganize the package structure and I'm
happy to contribute with the TODOs.
I'll let you know how it goes.
Cheers!
I tried to run Test.java using the attached file and I got the following
Exception:
EXCEPTION: EvaluationError
jsontemplate.EvaluationError: pushSection called when current cursor value
is not a map (is:
{ "url-base": "http://example.com/music/", "playlist-name": "Epic
Playlist", "songs": [
{ "url": "1.mp3", "artist": "Grayceon", "title": "Sounds
Like Thunder" },
{ "url": "2.mp3", "artist": "Thou", "title": "Their
Hooves Carve Craters in the Earth" } ] })
at jsontemplate.ScopedContext.pushSection(ScopedContext.java:22)
at jsontemplate.SectionStatement.execute(SectionStatement.java:14)
at jsontemplate.TemplateExecutor.execute(TemplateExecutor.java:10)
at jsontemplate.Template.render(Template.java:52)
at jsontemplate.Template.expand(Template.java:65)
at jsontemplate_test.Test.main(Test.java:65)
The contents of the template and the dictionary are exactly what is shown
as example in the intro page.
Can you give me a hint on what I am doing wrong?
Thanks!
Attachments:
songs.json 729 bytes
Hi Matias, the dictionary's value is supposed to be an actual dictionary,
not a string representation of a dictionary, so:
"dictionary": {"url-base": "...", "playlist-name": "...", "songs": [ {...}
] }
that should work.
Hope this helps,
William