-
Notifications
You must be signed in to change notification settings - Fork 35
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
How to encode object that contains meta #27
Comments
Hi @jcavar, thanks for the report! This seems similar to #10 What we can do here is to check if object has We didn't want to automatically encode Handling |
Could you give an example of this? I thought, when present, |
Not necessarily, I mean encoding JSON objects to JSON:API objects is not defined by any specification nor standard. So handling For example:
it is unclear should we treat That's why we are considering using flags to let user choose the behavior |
Hmm, I see. Yes, that makes sense. |
Hi @jcavar , We've also added |
Very nice, thank you! |
This is released with 2.2.0, closing, thanks for the input @jcavar ! |
It might be due to my limited knowledge of this library, but I can't seem to find a way to encode object with
meta
field.If I add meta property to object, it is encoded as attribute (i would say expectedly).
I can workaround this by manually inserting meta dictionary to encoded version of the object. But this is not very elegant.
I am using Codable extension.
The text was updated successfully, but these errors were encountered: