前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Go 语言每日package解析】 package json

【Go 语言每日package解析】 package json

作者头像
李海彬
发布2018-03-19 16:19:48
8510
发布2018-03-19 16:19:48
举报

Go 语言 开发包大全: http://www.goserver.club/discuz/ ... =12&from=portal 注:在开发包大全中找 json . package json

import "encoding/json"

json包实现了json对象的编解码,参见RFC 4627。Json对象和go类型的映射关系请参见Marshal和Unmarshal函数的文档。

参见"JSON and Go"获取本包的一个介绍:http://golang.org/doc/articles/json_and_go.html

Index

  • type InvalidUTF8Error
    • func (e *InvalidUTF8Error) Error() string
  • type InvalidUnmarshalError
    • func (e *InvalidUnmarshalError) Error() string
  • type SyntaxError
    • func (e *SyntaxError) Error() string
  • type UnmarshalFieldError
    • func (e *UnmarshalFieldError) Error() string
  • type UnmarshalTypeError
    • func (e *UnmarshalTypeError) Error() string
  • type UnsupportedTypeError
    • func (e *UnsupportedTypeError) Error() string
  • type UnsupportedValueError
    • func (e *UnsupportedValueError) Error() string
  • type MarshalerError
    • func (e *MarshalerError) Error() string
  • type Number
    • func (n Number) Int64() (int64, error)
    • func (n Number) Float64() (float64, error)
    • func (n Number) String() string
  • type RawMessage
    • func (m *RawMessage) MarshalJSON() ([]byte, error)
    • func (m *RawMessage) UnmarshalJSON(data []byte) error
  • type Marshaler
  • type Unmarshaler
  • func Compact(dst *bytes.Buffer, src []byte) error
  • func HTMLEscape(dst *bytes.Buffer, src []byte)
  • func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error
  • func Marshal(v interface{}) ([]byte, error)
  • func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
  • func Unmarshal(data []byte, v interface{}) error
  • type Decoder
    • func NewDecoder(r io.Reader) *Decoder
    • func (dec *Decoder) Buffered() io.Reader
    • func (dec *Decoder) UseNumber()
    • func (dec *Decoder) Decode(v interface{}) error
  • type Encoder
    • func NewEncoder(w io.Writer) *Encoder
    • func (enc *Encoder) Encode(v interface{}) error
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2015-12-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Golang语言社区 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档