Skip to content

ensure fields are JSON encoded correctly #1407

Closed
@vchudnov-g

Description

@vchudnov-g

The best way of verifying correct behavior is probably to implement integration tests against the Showcase compliance suite, which test various data types.

Context: boolean fields seem to be not serialized correctly. I assigned True to a proto.Field as a kwarg in the message constructor:

request = showcase_v1beta1.EnumRequest(unknown_enum = True)

and the Showcase server returns with an error. The Showcase server logs read:

error reading query params: terminal field "unknownEnum" of field path "unknownEnum" is of type "bool" with value string "True", which could not be parsed: could not parse "True" as a bool

which is mostly due to True being sent capitalized rather than lower-cased, as the JSON spec requires.

This is a blocker for launching REGAPIC.

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions