Discussion:
Issue 6 in json-template: Java version available
j***@public.gmane.org
2011-01-19 11:22:17 UTC
Permalink
Comment #6 on issue 6 by matias...-***@public.gmane.org: Java version available
http://code.google.com/p/json-template/issues/detail?id=6

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!
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
j***@public.gmane.org
2011-01-19 12:25:53 UTC
Permalink
Comment #7 on issue 6 by matias...-***@public.gmane.org: Java version available
http://code.google.com/p/json-template/issues/detail?id=6

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
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
j***@public.gmane.org
2011-01-24 06:49:32 UTC
Permalink
Comment #8 on issue 6 by william....-***@public.gmane.org: Java version available
http://code.google.com/p/json-template/issues/detail?id=6

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
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
Loading...