ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.86k stars 295 forks source link

Proof of concept: decode lists/arrays into arrays instead of slices #171

Closed cvermilion closed 8 years ago

cvermilion commented 8 years ago

Fixes #170.

This breaks usages where the length of the array isn't known initially; the broken tests are commented out -- the RPC tests and a cbor test.

To accommodate cases like this, and also not take the performance hit if this feature isn't wanted, decoding into array vs slice should be configurable (like the map type is configurable). That's still to-do.

ugorji commented 8 years ago

incorporated fix in as 5099b68ed379e9b07d62052b23e326a7e95dbf75