1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-04 21:34:16 +02:00

4 Commits

Author SHA1 Message Date
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
Tao Wen
b74ffb2e03 import github.com/stretchr/testify/require 2017-07-07 09:13:25 +08:00
Tao Wen
f5edf564c8 gofmt 2017-06-19 23:43:53 +08:00
Tao Wen
c3f5a2c536 #64 support fixed array 2017-06-19 23:43:28 +08:00