[Nitro] Ruby library for serialization

George Moschovitis george.moschovitis at gmail.com
Wed Feb 14 13:20:36 EST 2007


Thanks for the quick reply, when you are finished, can you send me the new
version of json.rb/xoxo.rb ?

-g.



On 2/14/07, transfire at gmail.com <transfire at gmail.com> wrote:
>
>
>
> On Feb 14, 11:35 am, "George Moschovitis"
> <george.moschovi... at gmail.com> wrote:
> > as i demonstrated to_json does not work as expected...
>
> sorry. i didn't read carfully enough. and you are right. to_json only
> works with specific types that account for it. but i have a solution.
> since YAML is a superset of JSON:
>
>   class Object
>     def to_json(*)
>       str = to_yaml
>       str.sub!(/^---.*?$/, '---')
>       YAML.load(str).to_json
>     end
>   end
>
> I'll make this change to Facets.
>
> (Also fixed to_xoxo, so it will now work too).
>
> Thanks,
> T.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070214/9976c725/attachment.html 


More information about the Nitro-general mailing list