From d97f5db769b8a0c5996a786cc00d762dad69d7a3 Mon Sep 17 00:00:00 2001 From: nifei Date: Mon, 5 Jun 2017 19:11:16 +0800 Subject: [PATCH] Marshal comment --- .idea/libraries/Go_SDK.xml | 10 ++++++++++ feature_adapter.go | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 .idea/libraries/Go_SDK.xml diff --git a/.idea/libraries/Go_SDK.xml b/.idea/libraries/Go_SDK.xml new file mode 100644 index 0000000..22c27bf --- /dev/null +++ b/.idea/libraries/Go_SDK.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/feature_adapter.go b/feature_adapter.go index f65038f..e70fa6b 100644 --- a/feature_adapter.go +++ b/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)