protobuf-go/encoding/prototext
Oliver Newman 6352deccdb prototext: Fix parsing of unknown repeated message fields
If `DiscardUnknown` was enabled, previously this syntax was rejected
with an error "unexpected token: ]":

  unknown_field: [
    {}
  ]

This is because the parser short-circuited after parsing the {}, and
didn't handle the closing square brace. Now it no longer short-circuits.

Change-Id: I6230b56766632752a5cc8822b17ed8262873d6cc
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/530616
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
2023-09-27 16:15:44 +00:00
..
decode_test.go prototext: Fix parsing of unknown repeated message fields 2023-09-27 16:15:44 +00:00
decode.go prototext: Fix parsing of unknown repeated message fields 2023-09-27 16:15:44 +00:00
doc.go
encode_test.go encoding: add MarshalAppend to protojson and prototext 2023-05-01 15:10:15 +00:00
encode.go all: modernize documentation 2023-09-05 14:55:28 +00:00
other_test.go all: remove shorthand import aliases 2022-05-24 20:05:50 +00:00