WIP: Implement full support for Google well-known types #428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a work in progress to implement support for automatically parsing and serialising arbitrary JSON into the Google well-known types around https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct and https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#value.
Changes made to make this work:
special
type meta field, while changing the respective type hints to something akin to JSON (which can be improved once Python has proper recursive type support)optional
handling to facilitateNullValue
There are still some bugs to sort out before this would be ready:
Struct
s are not serialised correctly, they are 0 bytesStruct
s is broken (see test failures)Value
and a lot of other things seems to generally work.If someone wants to pick this up and finish it, be my guest. I am submitting this because I do not currently intent on finishing it.