-
Notifications
You must be signed in to change notification settings - Fork 466
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
Conformance failure: proto2 + JSON + extension #993
Comments
I sent some email looking for more info on proto2 extension support in JSON. |
Let me know what you find. I just pushed up a draft PR #1002 which is based on the design for TextFormat and the contents of the new conformance test. It still needs a little work before I'm happy merging it, but it's enough to at least pass that test. |
So far what I've been able to piece together: Python has some support and tests that include extensions:
And Go seems to (didn't hunt down their impl, just found a reference to the test): |
Thanks, Thomas! Those seem to verify what I guessed from the conformance test. Extensions are handled essentially the same as in TextFormat: The key name is surrounded by I think that's enough detail to finish up #1002 and get this landed. |
Fixed via #1002 |
This popped up on a CI bot:
CONFORMANCE TEST BEGIN ====================================
ERROR, test=Recommended.Proto2.JsonInput.FieldNameExtension.Validator: Expected JSON payload but got type 1. request=json_payload: "{\n "[protobuf_test_messages.proto2.extension_int32]": 1\n }" requested_output_format: JSON message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: JSON_TEST, response=parse_error: "JSON failed to parse: unknownField("[protobuf_test_messages.proto2.extension_int32]")"
The text was updated successfully, but these errors were encountered: