Skip to content
Open
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go
sudo: false
go:
- 1.4
- 1.9
- tip

script:
Expand Down
4 changes: 3 additions & 1 deletion hal.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
package hal

import (
"encoding/json"
"github.com/json-iterator/go"
"reflect"
"strings"
)

var json = jsoniter.ConfigCompatibleWithStandardLibrary

type (
Entry map[string]interface{}

Expand Down
28 changes: 14 additions & 14 deletions hal_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hal

import (
"encoding/json"
"fmt"
"testing"
)

Expand Down Expand Up @@ -54,7 +54,7 @@ func TestResourceMarshal(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -81,7 +81,7 @@ func TestResourceMarshallWithMapper(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand Down Expand Up @@ -130,7 +130,7 @@ func TestRegisterCurie(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -149,7 +149,7 @@ func TestRegisterMultipleCuries(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand Down Expand Up @@ -191,7 +191,7 @@ func TestAddNewLink(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -210,7 +210,7 @@ func TestAddNewLinkTwice(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -228,7 +228,7 @@ func TestAddLinkCollection(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -247,7 +247,7 @@ func TestAddLinkCollectionToLink(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -268,7 +268,7 @@ func TestEmbed(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -291,7 +291,7 @@ func TestEmbedTwice(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -313,7 +313,7 @@ func TestAddResourceCollection(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -338,7 +338,7 @@ func TestAddResourceCollectionToResource(t *testing.T) {
}

if string(jr) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, jr, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), jr, expected)
}
}

Expand All @@ -353,6 +353,6 @@ func TestOmitEmptyReflection(t *testing.T) {
t.Errorf("%s", err)
}
if string(res) != expected {
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", r, res, expected)
t.Errorf("Wrong Resource struct: %s\n- Given: %s\n- Expected: %s", fmt.Sprint(r), res, expected)
}
}
3 changes: 3 additions & 0 deletions vendor/github.com/json-iterator/go/.codecov.yml

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

4 changes: 4 additions & 0 deletions vendor/github.com/json-iterator/go/.gitignore

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

14 changes: 14 additions & 0 deletions vendor/github.com/json-iterator/go/.travis.yml

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

21 changes: 21 additions & 0 deletions vendor/github.com/json-iterator/go/Gopkg.lock

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

26 changes: 26 additions & 0 deletions vendor/github.com/json-iterator/go/Gopkg.toml

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

21 changes: 21 additions & 0 deletions vendor/github.com/json-iterator/go/LICENSE

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

91 changes: 91 additions & 0 deletions vendor/github.com/json-iterator/go/README.md

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

Loading