Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try goccy/go-json #14

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion date.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package jsonschema

import (
"encoding"
"encoding/json"
"time"

json "github.com/goccy/go-json"
)

// DateLayout describes date format.
Expand Down
3 changes: 2 additions & 1 deletion entities.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion entities_extra_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package jsonschema_test

import (
"encoding/json"
"io/ioutil"
"testing"

json "github.com/goccy/go-json"
"github.com/stretchr/testify/require"
"github.com/swaggest/assertjson"
"github.com/swaggest/jsonschema-go"
Expand Down
2 changes: 1 addition & 1 deletion entities_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package jsonschema_test

import (
"encoding/json"
"fmt"
"log"

json "github.com/goccy/go-json"
"github.com/swaggest/assertjson"
"github.com/swaggest/jsonschema-go"
)
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.13

require (
github.com/bool64/dev v0.1.17
github.com/goccy/go-json v0.4.5
github.com/stretchr/testify v1.4.0
github.com/swaggest/assertjson v1.6.3
github.com/swaggest/refl v0.1.7
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/goccy/go-json v0.4.5 h1:klgIvY1/47zUQrMDYk1Feaqk6PHrcLSQ+sK70wDJHRY=
github.com/goccy/go-json v0.4.5/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down
3 changes: 2 additions & 1 deletion helper.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package jsonschema

import (
"encoding/json"
"reflect"

json "github.com/goccy/go-json"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion helper_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package jsonschema_test

import (
"encoding/json"
"strings"
"testing"

json "github.com/goccy/go-json"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/swaggest/jsonschema-go"
Expand Down
2 changes: 1 addition & 1 deletion reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package jsonschema

import (
"encoding"
"encoding/json"
"fmt"
"path"
"reflect"
"strconv"
"strings"
"time"

json "github.com/goccy/go-json"
"github.com/swaggest/refl"
)

Expand Down
2 changes: 1 addition & 1 deletion reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package jsonschema_test

import (
"encoding"
"encoding/json"
"testing"
"time"

json "github.com/goccy/go-json"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/swaggest/assertjson"
Expand Down