Documentation
¶
Overview ¶
Package encoding provides Decoding implementations.
Decode decodes HTTP responses:
resp, _ := http.Get("http://api.example.com/")
...
var data map[string]interface{}
err := JSONDecoder(resp.Body, &data)
Index ¶
Constants ¶
View Source
const JSON = "json"
JSON is the key for the json encoding
View Source
const RSS = "rss"
RSS is the key for the rss encoding
View Source
const XML = "xml"
XML is the key for the xml encoding
Variables ¶
This section is empty.
Functions ¶
func JSONCollectionDecoder ¶
JSONCollectionDecoder implements the Decoder interface over a collection
func JSONDecoder ¶
JSONDecoder implements the Decoder interface
func XMLCollectionDecoder ¶
XMLCollectionDecoder implements the Decoder interface over a collection
Types ¶
type Decoder ¶
A Decoder is a function that reads from the reader and decodes it into an map of interfaces
func NewJSONDecoder ¶
NewJSONDecoder return the right JSON decoder
func NewXMLDecoder ¶
NewXMLDecoder return the right XML decoder
Click to show internal directories.
Click to hide internal directories.