-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Stringify null values #462
Comments
You can already do that with the |
good point, but i find is not very intuitive to use and feels like a bit of a overhead. |
Given that it's a pretty uncommon use case (you're the first to ask afaik) I don't think it's worth the complexity of an additional option. Can you elaborate on your use case? |
i use it for a library (rapiq) which builds & parses an extended JSON-API Query String format and i plan to do a bigger refactoring & cleanup in the near feature and also want to reach |
Wouldn't there be a lot more things you'd need to handle to make query strings compatible with JSONAPI, such that you'd need the encoder/decoder anyways? |
properly, yes. |
then what would be the benefit of the option, when it’s trivial to handle it in a decoder? |
@ljharb can you please provide an example?
And parse in this way
But debugging the decoder, the string that I receive as value is always |
@teobmg In other words, you have to encode |
It would be really great, if
null
values could be stringified via an option as a null string instead of an empty string. If that is fine for you @ljharb i would create a pull request for that.Greetings
Peter
The text was updated successfully, but these errors were encountered: