Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(s string, interop InteropType) (interface{}, error)
src: Loose JSON
interop: If Interop_JSON is set, replace NaN, Infinity, complex number by `{nan:true}`, `{inf:+/-1}`, `{re:re,im:im}`. If Interop_TOML is set, replace complex number by `{re:re,im:im}`. If Interop_JSON_AsNull is set, replace NaN, Infinity, complex number by null. If Interop_TOML_AsNull is set, replace complex number by null.
parsed: nil | []any | map[string]any | float64 | int64 | uint64 | complex128 | string | bool | time.Time
func ParseTOML ¶ added in v0.0.6
func ParseTOML(s string, interop InteropType) (interface{}, error)
src: Loose TOML
interop: If Interop_JSON is set, replace NaN, Infinity, complex number by `{nan:true}`, `{inf:+/-1}`, `{re:re,im:im}`. If Interop_TOML is set, replace complex number by `{re:re,im:im}`. If Interop_JSON_AsNull is set, replace NaN, Infinity, complex number by null. If Interop_TOML_AsNull is set, replace complex number by null.
parsed: nil | []any | map[string]any | float64 | int64 | uint64 | complex128 | string | bool | time.Time
Types ¶
type InteropType ¶ added in v0.0.12
type InteropType int
const ( Interop_None InteropType = iota Interop_JSON Interop_TOML Interop_JSON_AsNull Interop_TOML_AsNull )