go
go copied to clipboard
added fuzzy decoding for booleans, added ability to decode numeric keyed objects as arrays with fizzy decoder
rel https://github.com/json-iterator/go/issues/486
- decode the followings as boolean:
"true","false",0,1,"0","1". - allow unmarshalling numeric keyed objects with strictly increasing keys as array, eg:
{"0": "a", "2": "b"}
The later is neccessary because of the "unset" php method, eg:
<?php
$a = ["a", "b", "c"];
echo json_encode($a); // prints ["a","b","c"]
unset($a[1]);
echo json_encode($a); // prints {"0":"a","2":"c"}
@taowen @AllenX2018 can some1 take a look at this please?
@AllenX2018 Could you check this out? Would be nice to see these changes in one of the following releases.
@taowen Would you have time to look into this?