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

Add synchronous deserialization method

Open tobilen opened this issue 4 years ago • 0 comments

Fixes https://github.com/SeyZ/jsonapi-serializer/issues/138

The promise wrapping of the deserializer is causing major headaches for us, especially when preparing static test data off of api mocks.

This PR adds a deserializeSync method to the deserializer. It has feature parity with the existing deserialize method, except for the fact that you won't be able to pass promises to the valueForRelationship option. If you try, you will get an error telling you as much.

tobilen avatar Aug 30 '21 12:08 tobilen