You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-07-03 23:30:41 +02:00
feature #384: Specify custom map key sort function
This commit is contained in:
@ -4,11 +4,10 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"github.com/json-iterator/go"
|
||||
"testing"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
||||
type Foo struct {
|
||||
Bar interface{}
|
||||
}
|
||||
@ -19,11 +18,10 @@ func (f Foo) MarshalJSON() ([]byte, error) {
|
||||
return buf.Bytes(), err
|
||||
}
|
||||
|
||||
|
||||
// Standard Encoder has trailing newline.
|
||||
func TestEncodeMarshalJSON(t *testing.T) {
|
||||
|
||||
foo := Foo {
|
||||
foo := Foo{
|
||||
Bar: 123,
|
||||
}
|
||||
should := require.New(t)
|
||||
|
Reference in New Issue
Block a user