Documentation ¶
Index ¶
- Constants
- func Marshal(v interface{}) ([]byte, error)
- func MarshalIndent(v interface{}, indent string) ([]byte, error)
- func Unmarshal(data []byte, v interface{}) error
- type Decoder
- type Encoder
- type MarshalFunc
- type Marshaler
- type UnmarshalTypeError
- type Unmarshaler
- type UnsupportedTypeError
- type UnsupportedValueError
Constants ¶
const ( Invalid plistKind = iota Dictionary Array String Integer Real Boolean Data Date )
Variables ¶
This section is empty.
Functions ¶
func MarshalIndent ¶
MarshalIndent ...
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder reads and decodes Apple plist objects from an input stream. The plists can be in XML or binary format.
func NewBinaryDecoder ¶
func NewBinaryDecoder(r io.ReadSeeker) *Decoder
NewBinaryDecoder returns a new decoder that reads a binary plist from r. No error checking is done to make sure that r is actually a binary plist.
func NewDecoder ¶
NewDecoder returns a new XML plist decoder. DEPRECATED: Please use NewXMLDecoder instead.
func NewXMLDecoder ¶
NewXMLDecoder returns a new decoder that reads an XML plist from r.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder ...
func NewEncoder ¶
NewEncoder returns a new encoder that writes to w.
type MarshalFunc ¶
type MarshalFunc func(interface{}) error
MarshalFunc is a function used to Unmarshal custom plist types.
type UnmarshalTypeError ¶
type UnmarshalTypeError struct { Value string // description of plist value - "true", "string", "date" Type reflect.Type }
An UnmarshalTypeError describes a plist value that was not appropriate for a value of a specific Go type.
func (UnmarshalTypeError) Error ¶
func (e UnmarshalTypeError) Error() string
type Unmarshaler ¶
type UnsupportedTypeError ¶
An UnsupportedTypeError is returned by Marshal when attempting to encode an unsupported value type.
func (*UnsupportedTypeError) Error ¶
func (e *UnsupportedTypeError) Error() string
type UnsupportedValueError ¶
UnsupportedValueError ...
func (*UnsupportedValueError) Error ¶
func (e *UnsupportedValueError) Error() string