Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseJSON ¶ added in v0.0.18
func ParseJSON(s string, plafLb PlatformLinebreakType, interop InteropType) (interface{}, error)
src: Loose JSON
plafLb: Platform-dependent line break. (`Linebreak_Lf` | `Linebreak_CrLf` | `Linebreak_Cr`) Line break codes in multi-line string are replaced by this specified line break. (Excluding line breaks by escape sequences)
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, plafLb PlatformLinebreakType, interop InteropType) (interface{}, error)
src: Loose TOML
plafLb: Platform-dependent line break. (`Linebreak_Lf` | `Linebreak_CrLf` | `Linebreak_Cr`) Line break codes in multi-line string are replaced by this specified line break. (Excluding line breaks by escape sequences)
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 )
type PlatformLinebreakType ¶ added in v0.0.18
type PlatformLinebreakType int
const ( Linebreak_Lf PlatformLinebreakType = iota Linebreak_CrLf Linebreak_Cr )