jsonapi-serializer icon indicating copy to clipboard operation
jsonapi-serializer copied to clipboard

Ability to prefix 'meta' and 'links' key on deserialization

Open aggrhm opened this issue 4 years ago • 1 comments
trafficstars

First off, thanks for this library, it works great. One issue I've ran into is that I'd like to prefix the meta and links keys when they are added to the deserialized record. This is to prevent any confusion from them being attributes (many of our records also have a metadata attribute, so there ends up being metadata and meta). I'm currently using a transform to rename them to resource_meta and resource_links, but by then, they would have already overwritten the meta and links attributes if they existed. Thanks!

aggrhm avatar Jan 30 '21 17:01 aggrhm

Or maybe even just put meta and links inside of a resource object on the deserialize record.

aggrhm avatar Jan 30 '21 19:01 aggrhm