You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-12-05 22:56:06 +02:00
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.
1.2 KiB
1.2 KiB