[
https://issues.apache.org/jira/browse/FREEMARKER-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17107015#comment-17107015
]
Dániel Dékány commented on FREEMARKER-143:
------------------------------------------
There's no JSON support in FreeMarker itself (for now). I guess you are using
some custom JSON-to-\{{TemplateModel}} converter, or a custom
{{ObjectWrapper}}. So, I don't know what that can do. You should check its
documentation. The error message is like in the core XML wrapper, so maybe it
has something like {{someJsonNode.@@markup}}.
> Parsing complex json
> --------------------
>
> Key: FREEMARKER-143
> URL: https://issues.apache.org/jira/browse/FREEMARKER-143
> Project: Apache Freemarker
> Issue Type: Wish
> Reporter: Rupa
> Priority: Major
>
> Hi Team,
> Is there any way to parse or extract complex json and print the same in
> freemarker.
> We have the below json structure, we are trying to print child1. so when we
> print the value of child1 as ${json.parent.children.child1} we are getting
> the error
> "Only elements with no child elements can be processed as text."
> Could you please suggest some other workaround where we can print the complex
> json values.
>
> For Ex: Consider the below json
> parent :{
> children:{
> child1:{
> "a": "value",
> "b" : {
> "c" : "value",
> "d" : "value"
> } ,
> "e" : "value"
> }
> }
> }
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)