-
Notifications
You must be signed in to change notification settings - Fork 56
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
Special case JSONPB instances for Google.Protobuf.Wrappers #103
Comments
There is a similar issue with Would it be possible to add such module directly to |
@TristanCacqueray: I think it would be fine to add support for those standard types in |
This change adds a new Google.Protobuf.Timestamp module to handle the custom RFC3339 encoding used for JSON. Related awakesecurity#103
This change adds a new Google.Protobuf.Timestamp module to handle the custom RFC3339 encoding used for JSON. Related #103
(From @j6carey)
The proto3 specification says:
"Wrappers use the same representation in JSON as the wrapped primitive type, except that null is allowed and preserved during data conversion and transfer."
and gives these examples:
However, our Haskell implementation does not yet provide such special cases:
In order to match the specification, the result should be just
Bool True
.Though we could provide
Google.Protobuf.Wrappers
precompiled in our library,it might be simpler to special case the code generator to spot the wrapper types
and emit custom code for their JSON-related instances.
The text was updated successfully, but these errors were encountered: