Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Overriding to_json in a class causes associated objects to over-quote and over-escape #16

@solnic

Description

@solnic

Any suggestions for a clearer title for this ticket would be very much appreciated ;)

If you override to_json in a class Foo, and class Bar has n foos, calling @bar.foos.to_json in an instance of Bar will emit bad JSON which has too many quotes and backslash escapes.

I created a toy project that demonstrates this at http://github.com/xxx/dm10-association_to_json .

Maybe there's just a different way to do this now.


Created by mpd - 2009-10-03 19:06:22 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1075

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions