mirror of
https://github.com/json-iterator/go.git
synced 2025-01-29 19:14:05 +02:00
#57 copy bytes
This commit is contained in:
parent
952a42af6c
commit
3c8bd9ef54
@ -153,7 +153,7 @@ func (cfg *frozenConfig) MarshalToString(v interface{}) (string, error) {
|
||||
defer cfg.returnStream(stream)
|
||||
stream.WriteVal(v)
|
||||
if stream.Error != nil {
|
||||
return nil, stream.Error
|
||||
return "", stream.Error
|
||||
}
|
||||
return string(stream.Buffer()), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user