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

Support Explicit JSON null #73

Closed
rise0chen opened this issue Sep 30, 2022 · 6 comments · Fixed by #74
Closed

Support Explicit JSON null #73

rise0chen opened this issue Sep 30, 2022 · 6 comments · Fixed by #74
Assignees

Comments

@rise0chen
Copy link
Contributor

Failed to deserialize when google::protobuf::*Value is null

@rise0chen
Copy link
Contributor Author

I can't impl Deserialize for Optiongoogle::protobuf::*Value

@tustvold
Copy link
Contributor

I'm not sure I understand the problem? Could you perhaps provide an example of some JSON that behaves incorrectly?

@rise0chen
Copy link
Contributor Author

message KitchenSink {
  google.protobuf.UInt64Value uint64_value = 56;
}
{"uint64Value": null}

@tustvold
Copy link
Contributor

tustvold commented Sep 30, 2022

Does this work?

message Other {}

message KitchenSink {
    Other other = 1;
}
{"other": null}

I'm not seeing why UInt64Value would be any different from a normal message, and wonder if there is a more general issue here with how we handle nulls when deserializing?

@rise0chen
Copy link
Contributor Author

not work

@tustvold
Copy link
Contributor

Ok I'll have a play, I have some ideas of what is going on

@tustvold tustvold self-assigned this Sep 30, 2022
@tustvold tustvold changed the title Failed to deserialize null Support Explicit JSON null Sep 30, 2022
kodiakhq bot added a commit that referenced this issue Oct 26, 2022
feat: support deserializing explicit nulls (#73)
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 a pull request may close this issue.

2 participants