You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I was reading the code of the package, I noticed the sortKeys function that is created based on the map key type to encode, and saw that you sort on the reflect.Value value rather than the string representation of the key.
I was perplex to find that as an optin functionality, since the package aims to be compliant with the standard library, unless I misunderstood the README.
@achille-roussel Hello,
As I was reading the code of the package, I noticed the
sortKeys
function that is created based on the map key type to encode, and saw that you sort on thereflect.Value
value rather than the string representation of the key.I was perplex to find that as an optin functionality, since the package aims to be compliant with the standard library, unless I misunderstood the README.
The following example shows that the output is different when using a map with keys of type
int
: https://play.golang.org/p/1ddbUssdbafThe only reference to a map with keys of signed/unsigned-integer kind I could find in the tests is at
encoding/json/json_test.go
Line 190 in bc545e9
The text was updated successfully, but these errors were encountered: