Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into logo
Browse files Browse the repository at this point in the history
  • Loading branch information
antonholmquist committed Dec 5, 2014
2 parents 987e2b1 + be417c4 commit fa30c14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: go

go:
- 1.0
- 1.1
- 1.2
- 1.3
- tip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# JSON Library for Go

[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/antonholmquist/jason) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/antonholmquist/jason/master/LICENSE)
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/antonholmquist/jason) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/antonholmquist/jason/master/LICENSE) [![Build Status](https://travis-ci.org/antonholmquist/jason.svg?branch=master)](https://travis-ci.org/antonholmquist/jason)



Expand Down
18 changes: 8 additions & 10 deletions jason.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,15 @@ func NewValueFromBytes(b []byte) (*Value, error) {
func objectFromValue(v *Value, err error) (*Object, error) {
if err != nil {
return nil, err
} else {

o, err := v.AsObject()
}

if err != nil {
return nil, err
} else {
return o, nil
}
o, err := v.AsObject()

if err != nil {
return nil, err
}

return o, nil
}

func NewObjectFromBytes(b []byte) (*Object, error) {
Expand Down Expand Up @@ -526,7 +524,7 @@ func (v *Value) String() string {
f, err := json.Marshal(v.data)
if err != nil {
return err.Error()
} else {
return string(f)
}

return string(f)
}

0 comments on commit fa30c14

Please sign in to comment.