Hello,
I try to create a page in XWiki/2.0 generating some JSON data but I have
some problems and I have to go back to XWiki/1.0...

* when you write this in a page MySpace.MyPage:
[
  { "field" : "value" }
]

you call MySpace.MyPage?xpage=plain and you get some HTML code:
<p><br/>.{&nbsp;"field"&nbsp:&nbsp"value"...<br/></p>

this is not good for the JSON parser...

* So I try using the verbatim {{{}}}
{{{
[
  { "field" : "value" }
]
}}}

and I call again MySpace.MyPage?xpage=plain and I get:
<pre>
[
  { "field" : "value" }
]
</pre>

Ok for the JSON data but the <pre></pre> is not good also for JSON parser...

* If I write some velocity inside:
{{velocity}}
#doit()
[
  { "field" : "${value}" }
]
{{/velocity}

I get some <!-- velocity-macros --> comments or something like that before
my json encoded into HTML...

not good for the JSON parser also...

What's the solution in XWiki/2.0 to make a page generate JSON?
For the time being, I use XWiki/1.0 but this is not a viable solution.

thanks
Pascal
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to