mirror of
https://github.com/netbirdio/easyjson.git
synced 2026-05-22 18:44:42 -07:00
Merge pull request #120 from bluele/fix/unmarshal-doc
fix doc for unmarshal method
This commit is contained in:
@@ -57,7 +57,7 @@ func (v *Bool) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Bool) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Float32) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Float32) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Float64) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Float64) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Int) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Int) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Int16) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Int16) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Int32) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Int32) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Int64) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Int64) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Int8) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Int8) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *String) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *String) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Uint) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Uint) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Uint16) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Uint16) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Uint32) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Uint32) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Uint64) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Uint64) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (v *Uint8) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Uint8) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ func (v *Optional) MarshalJSON() ([]byte, error) {
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalJSON implements a standard json marshaler interface.
|
||||
// UnmarshalJSON implements a standard json unmarshaler interface.
|
||||
func (v *Optional) UnmarshalJSON(data []byte) error {
|
||||
l := jlexer.Lexer{}
|
||||
v.UnmarshalEasyJSON(&l)
|
||||
|
||||
Reference in New Issue
Block a user