jsonapi-serializer
jsonapi-serializer copied to clipboard
Add synchronous deserialization method
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.