Skip to content

serialize to plain object? #13

@jamesdixon

Description

@jamesdixon

Hi,

In my other issue, I mentioned that my fork was customized to add another serialize() method that would serialize the contents of the store to plain javascript objects that could be then used to pass into my ORM. I know it may be an edge case, but wanted to see if there was any interest in supporting such a thing? Essentially, I'm just creating a plain javascript object that contains attributes and relationships and can then be passed almost directly into my ORM (Bookshelf). The reason for doing this was because the JsonApiDataStoreModel contained a handful of methods and properties that were clogging things up a bit when I passed it around, which means I would have to rip those out before passing them in.

If this is something that you can see to be valuable, more than willing to create a PR with the code I created.

Best,
James

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions