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
4 changes: 2 additions & 2 deletions simplejson.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
)

// returns the current implementation version
// Version returns the current implementation version
func Version() string {
return "0.5.0"
}
Expand Down Expand Up @@ -48,7 +48,7 @@ func (j *Json) EncodePretty() ([]byte, error) {
return json.MarshalIndent(&j.data, "", " ")
}

// Implements the json.Marshaler interface.
// MarshalJSON: Implements the json.Marshaler interface.
func (j *Json) MarshalJSON() ([]byte, error) {
return json.Marshal(&j.data)
}
Expand Down
2 changes: 1 addition & 1 deletion simplejson_go10.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewFromReader(r io.Reader) (*Json, error) {
return j, err
}

// Implements the json.Unmarshaler interface.
// UnmarshalJSON: Implements the json.Unmarshaler interface.
func (j *Json) UnmarshalJSON(p []byte) error {
return json.Unmarshal(p, &j.data)
}
Expand Down
2 changes: 1 addition & 1 deletion simplejson_go11.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strconv"
)

// Implements the json.Unmarshaler interface.
// UnmarshalJSON: Implements the json.Unmarshaler interface.
func (j *Json) UnmarshalJSON(p []byte) error {
dec := json.NewDecoder(bytes.NewBuffer(p))
dec.UseNumber()
Expand Down