On Jun 2, 2009, at 10:21 AM, Pascal Voitot wrote:
On Tue, Jun 2, 2009 at 9:23 AM, Vincent Massol
<vincent(a)massol.net>
wrote:
On Jun 2, 2009, at 9:12 AM, Pascal Voitot wrote:
On Tue, Jun 2, 2009 at 9:01 AM, Vincent Massol
<vincent(a)massol.net>
wrote:
Ok I see!
And has anyone tried to hook the text renderer or at least chosen
the URL?
:)
(?xpage=text)
(?xpage=plaintext)
or simply replace (?xpage=plain)
see
http://markmail.org/thread/bao6nn5qgmo7w45j
It is quite strange to speak with someone quoting Jira :)
That was a mail thread, not jira. I'm sorry but I don't have the time
to copy paste all past discussions just for your pleasure or not
having to read an email thread... ;)
Ok Mr. Jira and do you confirm that nobody coded this
part which
routes the
renderer to the plain text renderer when syntax is 2.0?
Hmm... why don't you look at the jira issue? There's a field named
"status" which shows if the issue has been implemented or not...
Hint: it says "open". So yes it's not been done...
Thanks
-Vincent
>>> On Jun 2, 2009, at 12:37 AM, Pascal Voitot
wrote:
>>>
>>>> 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/>.{ "field" : "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