[Seaside] JSON encoding help.

Paul DeBruicker pdebruic at gmail.com
Sun Jun 20 16:22:17 UTC 2010


Hi -

I'm trying to generate a JSON array and can't figure out how to get rid 
of the escaped double quote characters.

When I do this:

renderContentOn: html
|event1 events|

event1:=Dictionary new.
event1 at: 'title' put:'event1'.
event1 at:'start' put:'2010-06-20'.
  events:= String streamContents: [:stream | event1 jsonOn: stream].

html div
     id:'calendar';
     script: (html jQuery this fullCalendar theme:true).
     html script:( (html jQuery id:'calendar') fullCalendar 
events:(Array with:events) )


in the web page I get:

$("#calendar").fullCalendar("{\"events\":[\"{\\\"title\\\":\\\"event1\\\",\\\"start\\\":\\\"2010-06-20\\\"}\"]}")


but what I seem to need to get the jQuery  FullCalendar 
(http://arshaw.com/fullcalendar/)  plug-in to work is this:

$("#calendar").fullCalendar({events:[{title:"event1",start:"2010-06-20"}]})


Thanks for any guidance you can provide...


Paul DeBruicker


More information about the seaside mailing list