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

allow null as well as '{}' for empty objects in json #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kryton
Copy link

@kryton kryton commented Jun 11, 2020

certain json parsers (serde_json in rust) convert no-field empty structs as null, instead of '{}'.
This patch allows for both ways to seen as valid.
(for example)
["get_status_request_v0",null]
as well as
["get_status_request_v0",{}]

@kryton
Copy link
Author

kryton commented Jun 11, 2020

NB:.. serde_json still won't fully work with variants.
as it converts 'enums' as objects, not arrays..
eg
{"get_status_request_v0":null}
is what it would generate
that's a non-compatible change .. so won't be submitting a PR for that bit

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

Successfully merging this pull request may close these issues.

1 participant