1
0
mirror of https://github.com/json-iterator/go.git synced 2025-12-05 22:56:06 +02:00
Files
json-iterator/jsoniter_fixed_array_test.go
Matt Good ba3857729b Fix encoding 0-length arrays
The array encoder assumed that arrays had at least one value, so it
would serialize them with a zero-value for the array, such as `[0]`.

This adds a test to reproduce the issue, and updates the encoder to
write an empty array if the length is 0.
2018-01-16 11:02:03 -08:00

1.2 KiB