protobuf-go/internal/encoding
Herbie Ong d3f8f2d412 internal/encoding/json: rewrite to a token-based encoder and decoder
Previous decoder decodes a JSON number into a float64, which lacks
64-bit integer precision.

I attempted to retrofit it with storing the raw bytes and parsed out
number parts, see golang.org/cl/164377.  While that is possible, the
encoding logic for Value is not symmetrical with the decoding logic and
can be confusing since both utilizes the same Value struct.

Joe and I decided that it would be better to rewrite the JSON encoder
and decoder to be token-based instead, removing the need for sharing a
model type plus making it more efficient.

Change-Id: Ic0601428a824be4e20141623409ab4d92b6167c7
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/165677
Reviewed-by: Damien Neil <dneil@google.com>
2019-03-11 21:53:21 +00:00
..
defval internal/encoding/defval: unify logic for handling default values 2018-12-07 22:40:20 +00:00
json internal/encoding/json: rewrite to a token-based encoder and decoder 2019-03-11 21:53:21 +00:00
jsonx internal/encoding/jsonx: copy internal/encoding/json 2019-03-02 00:23:28 +00:00
pack internal/encoding/pack: don't depend on exact math.NaN bits 2019-02-12 21:38:35 +00:00
tag internal/encoding/defval: unify logic for handling default values 2018-12-07 22:40:20 +00:00
text internal/encoding/text: format using 32 bitsize when encoding float32 2019-01-18 17:54:23 +00:00
wire go.mod: rename google.golang.org/proto as github.com/golang/protobuf/v2 2018-09-24 16:11:50 +00:00