protobuf-go/encoding
Joe Tsai 0fd4f3a506 encoding/protojson: restrict valid values for google.protobuf.Value.number_value
The purpose of struct.proto is to be an exact mapping of JSON in protobufs.
Since JSON doesn't support NaN and Inf, we should reject serialization
of such values. Prior to this CL, they would be serialzed as a JSON string,
which would change the interpretation of the value when round-tripped.

Fixes golang/protobuf#1182

Change-Id: I6dba9973b1c24d99e5688b509611c0a952c00022
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/247737
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Herbie Ong <herbie@google.com>
2020-09-04 00:11:24 +00:00
..
protojson encoding/protojson: restrict valid values for google.protobuf.Value.number_value 2020-09-04 00:11:24 +00:00
prototext reflect/protoreflect: add FieldDescriptor.TextName 2020-07-08 23:23:57 +00:00
protowire encoding/protowire: make package publicly available 2020-03-20 07:42:18 +00:00
bench_test.go encoding: remove unused benchV1 flag 2020-02-25 21:50:06 +00:00