When the link http://localhost:3000/calendar.json, the result become [{"id":2,"start":"2012-02-07T20:11:00+08:00","end":"2012-02-07T22:11:00+08:00","allDay":false}] I don''t know how to remove quotation mark. Below the json I want: [{id:2,start:"2012-02-07T20:11:00+08:00",end:"2012-02-07T22:11:00+08:00",allDay:false}] Bro/Sis, any suggestion for me?? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Feb 7, 2012 at 1:28 PM, Joachim Cheng <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> When the link http://localhost:3000/calendar.json, the result become > > [{"id":2,"start":"2012-02-07T20:11:00+08:00","end":"2012-02-07T22:11:00+08:00","allDay":false}] > > I don''t know how to remove quotation mark. Below the json I want: > > [{id:2,start:"2012-02-07T20:11:00+08:00",end:"2012-02-07T22:11:00+08:00",allDay:false}] > > Bro/Sis, any suggestion for me??Is there any reason why? ... because you have to use that data in a lot of ways... its just... data Javier Q -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Joachim Cheng wrote in post #1044574:> When the link http://localhost:3000/calendar.json, the result become >[{"id":2,"start":"2012-02-07T20:11:00+08:00","end":"2012-02-07T22:11:00+08:00","allDay":false}]> > I don''t know how to remove quotation mark. Below the json I want: >[{id:2,start:"2012-02-07T20:11:00+08:00",end:"2012-02-07T22:11:00+08:00",allDay:false}] Your JSON "below" (what you say you want) is invalid JSON. http://json.org/ All keys defining an object in JSON are strings. String are quoted with double quotes. Read the spec for yourself. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker wrote in post #1044580:> Joachim Cheng wrote in post #1044574: >> When the link http://localhost:3000/calendar.json, the result become >> >[{"id":2,"start":"2012-02-07T20:11:00+08:00","end":"2012-02-07T22:11:00+08:00","allDay":false}]>> >> I don''t know how to remove quotation mark. Below the json I want: >> >[{id:2,start:"2012-02-07T20:11:00+08:00",end:"2012-02-07T22:11:00+08:00",allDay:false}]> > Your JSON "below" (what you say you want) is invalid JSON. > http://json.org/ > > All keys defining an object in JSON are strings. String are quoted with > double quotes. Read the spec for yourself.Hi Robert, you are right. All must have double quotes except the boolean. I just have solved my calender project already. Thank you for provide me the information. This information really useful and easy understand. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.