You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-30 23:23:49 +02:00
Marshal comment
This commit is contained in:
10
.idea/libraries/Go_SDK.xml
generated
Normal file
10
.idea/libraries/Go_SDK.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="Go SDK">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file:///usr/local/go/src" />
|
||||||
|
</CLASSES>
|
||||||
|
<SOURCES>
|
||||||
|
<root url="file:///usr/local/go/src" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
@ -81,6 +81,10 @@ func UnmarshalAnyFromString(str string) (Any, error) {
|
|||||||
return nil, iter.Error
|
return nil, iter.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// jsoniterator.Marshal is an adapter to json.Marshal
|
||||||
|
|
||||||
|
// Marshal returns the JSON encoding of v, adapts to json/encoding API
|
||||||
|
|
||||||
func Marshal(v interface{}) ([]byte, error) {
|
func Marshal(v interface{}) ([]byte, error) {
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
stream := NewStream(buf, 512)
|
stream := NewStream(buf, 512)
|
||||||
|
Reference in New Issue
Block a user