Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the difference between ref and id? #228

Open
allthesignals opened this issue Mar 29, 2020 · 2 comments
Open

What is the difference between ref and id? #228

allthesignals opened this issue Mar 29, 2020 · 2 comments

Comments

@allthesignals
Copy link

The serialization docs say the following:

ref: If present, it's considered as a relationships.
id: Configurable identifier field for the resource. Default: id.

I don't understand what one is doing over the other? What if I specify a ref but no id, and there is no id field?

Happy to contribute to clarify docs once I understand the difference.

Thanks.

@jrandolf
Copy link

So support for this library has been down. I've been recently going around the other serializers checking for people who are looking for a better serializer. Over the past few days I've designed a resource-recursive, typescript/javascript library for serializing the entire JSON:API spec. Our API is far more fluent than the one here (and every other serializer I have seen/used). If this serialize doesn't fit your need, you might want to check it out :) Development is active.

Link: https://github.com/jun-sheaf/ts-japi

@allthesignals
Copy link
Author

@jun-sheaf oh WOW, thank you! I rely heavily on this serializer. I'll take a look. Happy to contribute as wel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants