Documentation ¶
Overview ¶
Package gparser provides convenient API for accessing/converting variable and JSON/XML/YAML/TOML.
Index ¶
- func VarToIni(value interface{}) ([]byte, error)
- func VarToJson(value interface{}) ([]byte, error)
- func VarToJsonIndent(value interface{}) ([]byte, error)
- func VarToJsonIndentString(value interface{}) (string, error)
- func VarToJsonString(value interface{}) (string, error)
- func VarToToml(value interface{}) ([]byte, error)
- func VarToXml(value interface{}, rootTag ...string) ([]byte, error)
- func VarToXmlIndent(value interface{}, rootTag ...string) ([]byte, error)
- func VarToYaml(value interface{}) ([]byte, error)
- type Parser
- func Load(path string, safe ...bool) (*Parser, error)
- func LoadContent(data interface{}, safe ...bool) (*Parser, error)
- func LoadIni(data interface{}, safe ...bool) (*Parser, error)
- func LoadJson(data interface{}, safe ...bool) (*Parser, error)
- func LoadToml(data interface{}, safe ...bool) (*Parser, error)
- func LoadXml(data interface{}, safe ...bool) (*Parser, error)
- func LoadYaml(data interface{}, safe ...bool) (*Parser, error)
- func New(value interface{}, safe ...bool) *Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VarToJsonIndent ¶
func VarToJsonIndentString ¶
func VarToJsonString ¶
func VarToXmlIndent ¶
Types ¶
type Parser ¶
Parser is actually alias of gjson.Json.
func Load ¶
Load loads content from specified file <path>, and creates a Parser object from its content.
func LoadContent ¶
LoadContent creates a Parser object from given content, it checks the data type of <content> automatically, supporting JSON, XML, YAML and TOML types of data.
Click to show internal directories.
Click to hide internal directories.