Documentation
¶
Index ¶
- Constants
- Variables
- func Decode(code string, format string, all bool) (ard.Value, error)
- func DecodeAllYAML(code string) (ard.List, error)
- func DecodeCompatibleJSON(code string) (ard.Value, error)
- func DecodeJSON(code string) (ard.Value, error)
- func DecodeYAML(code string) (ard.Value, error)
- func DecodeYAMLStringMaps(code string) ([]ard.StringMap, error)
- func DecodeYAMLTemplate(code string, data interface{}) (ard.StringMap, error)
- func Encode(data interface{}, format string, strict bool) (string, error)
- func EncodeCompatibleJSON(data interface{}, indent string) (string, error)
- func EncodeJSON(data interface{}, indent string) (string, error)
- func EncodeXML(data interface{}, indent string) (string, error)
- func EncodeYAML(data interface{}, indent string, strict bool) (string, error)
- func Normalize(data interface{}) (interface{}, error)
- func OpenFileForWrite(path string) (*os.File, error)
- func Print(data interface{}, format string, writer io.Writer, strict bool, pretty bool) error
- func PrintCompatibleJSON(data interface{}, writer io.Writer, pretty bool) error
- func PrintJSON(data interface{}, writer io.Writer, pretty bool) error
- func PrintXML(data interface{}, writer io.Writer, pretty bool) error
- func PrintXMLDocument(xmlDocument *etree.Document, writer io.Writer, pretty bool) error
- func PrintYAML(data interface{}, writer io.Writer, strict bool, pretty bool) error
- func Read(reader io.Reader, format string) (ard.Value, error)
- func ReadAllYAML(reader io.Reader) (ard.List, error)
- func ReadCompatibleJSON(reader io.Reader) (ard.Value, error)
- func ReadJSON(reader io.Reader) (ard.Value, error)
- func ReadYAML(reader io.Reader) (ard.Value, error)
- func ToCompatibleJSON(value ard.Value) ard.Value
- func ToXMLWritable(data interface{}) interface{}
- func Validate(code string, format string) error
- func ValidateJSON(code string) error
- func ValidateXML(code string) error
- func ValidateYAML(code string) error
- func Write(data interface{}, format string, indent string, strict bool, writer io.Writer) error
- func WriteCompatibleJSON(data interface{}, writer io.Writer, indent string) error
- func WriteJSON(data interface{}, writer io.Writer, indent string) error
- func WriteOrPrint(data interface{}, format string, writer io.Writer, strict bool, pretty bool, ...) error
- func WriteXML(data interface{}, writer io.Writer, indent string) error
- func WriteXMLDocument(xmlDocument *etree.Document, writer io.Writer, indent string) error
- func WriteYAML(data interface{}, writer io.Writer, indent string, strict bool) error
- func WriteYAMLNode(writer io.Writer, node *yaml.Node, indent int)
- func WriteYAMLNodes(writer io.Writer, node *yaml.Node)
- type XMLMap
- type XMLMapEntry
Constants ¶
View Source
const DIRECTORY_WRITE_PERMISSIONS = 0700
View Source
const FILE_WRITE_PERMISSIONS = 0600
Variables ¶
View Source
var XMLKeyStart = xml.StartElement{Name: xml.Name{Local: "key"}}
View Source
var XMLMapEntryStart = xml.StartElement{Name: xml.Name{Local: "entry"}}
View Source
var XMLMapStartElement = xml.StartElement{Name: xml.Name{Local: "map"}}
View Source
var XMLValueStart = xml.StartElement{Name: xml.Name{Local: "value"}}
View Source
var YAMLNodeKinds = map[yaml.Kind]string{
yaml.DocumentNode: "Document",
yaml.SequenceNode: "Sequence",
yaml.MappingNode: "Mapping",
yaml.ScalarNode: "Scalar",
yaml.AliasNode: "Alias",
}
Functions ¶
func DecodeCompatibleJSON ¶ added in v0.1.15
func DecodeYAMLTemplate ¶
func EncodeCompatibleJSON ¶ added in v0.1.15
func EncodeJSON ¶
func PrintCompatibleJSON ¶ added in v0.1.15
func PrintXMLDocument ¶
func ReadCompatibleJSON ¶ added in v0.1.15
func ToXMLWritable ¶
func ToXMLWritable(data interface{}) interface{}
func ValidateJSON ¶
func ValidateXML ¶
func ValidateYAML ¶
func WriteCompatibleJSON ¶ added in v0.1.15
func WriteOrPrint ¶
func WriteXMLDocument ¶
func WriteYAMLNode ¶
func WriteYAMLNodes ¶
Types ¶
type XMLMap ¶
type XMLMap struct {
Entries []XMLMapEntry
}
func (XMLMap) MarshalXML ¶
xml.Marshaler interface
type XMLMapEntry ¶
type XMLMapEntry struct { Key interface{} Value interface{} }
func (XMLMapEntry) MarshalXML ¶
func (self XMLMapEntry) MarshalXML(encoder *xml.Encoder, start xml.StartElement) error
xml.Marshaler interface
Click to show internal directories.
Click to hide internal directories.