Browse Source

Marshal comment

nifei 8 năm trước cách đây
mục cha
commit
d97f5db769
2 tập tin đã thay đổi với 14 bổ sung0 xóa
  1. 10 0
      .idea/libraries/Go_SDK.xml
  2. 4 0
      feature_adapter.go

+ 10 - 0
.idea/libraries/Go_SDK.xml

@@ -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>

+ 4 - 0
feature_adapter.go

@@ -81,6 +81,10 @@ func UnmarshalAnyFromString(str string) (Any, 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) {
 	buf := &bytes.Buffer{}
 	stream := NewStream(buf, 512)