1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-23 11:37:32 +02:00

Marshal comment

This commit is contained in:
nifei 2017-06-05 19:19:46 +08:00
parent 4406ed9e62
commit 95e03f2937

View File

@ -95,6 +95,7 @@ func Marshal(v interface{}) ([]byte, error) {
return buf.Bytes(), nil
}
// notbeginwithfuncname MarshalToString does not show in doc
func MarshalToString(v interface{}) (string, error) {
buf, err := Marshal(v)
if err != nil {
@ -103,6 +104,7 @@ func MarshalToString(v interface{}) (string, error) {
return string(buf), nil
}
// NewDecoder show in doc
func NewDecoder(reader io.Reader) *AdaptedDecoder {
iter := Parse(reader, 512)
return &AdaptedDecoder{iter}