Documentation ¶
Index ¶
- Constants
- Variables
- func GetSubobjectBytes(data []byte, key string) ([]byte, error)
- func JSONParserGetArrayIntOneOnly(data []byte, key string) (int, error)
- func JSONParserGetArrayString(data []byte, key string) ([]string, error)
- func JSONParserGetArrayStringOneOnly(data []byte, key string) (string, error)
- func MarshalBase64(i interface{}) (string, error)
- func MarshalSimple(v interface{}, prefix, indent string) ([]byte, error)
- func MustGetSubobjectBytes(data []byte, key string) []byte
- func MustMarshal(i interface{}, embedError bool) []byte
- func MustMarshalIndent(i interface{}, prefix, indent string, embedError bool) []byte
- func MustMarshalSimple(v interface{}, prefix, indent string) []byte
- func MustMarshalString(i interface{}, embedError bool) string
- func PointerCondense(s string) string
- func PointerSubEscapeAll(format string, vars ...interface{}) string
- func PrettyPrint(b []byte, prefix, indent string) []byte
- func PrettyPrintReader(r io.Reader, prefix, indent string) ([]byte, error)
- func PropertyNameEscape(s string) string
- func PropertyNameUnescape(s string) string
- func ReadFile(filename string, v interface{}) ([]byte, error)
- func UnmarshalMSI(data map[string]interface{}, v interface{}) error
- func UnmarshalReader(r io.Reader, v interface{}) ([]byte, error)
- func WriteFile(filename string, v interface{}, prefix, indent string, perm fs.FileMode) error
- type Bool
- type Int64
Constants ¶
View Source
const ( EscapedTilde = "~0" EscapedSlash = "~1" )
Variables ¶
View Source
var ( MarshalPrefix = "" MarshalIndent = " " )
Functions ¶
func JSONParserGetArrayIntOneOnly ¶ added in v0.37.0
func JSONParserGetArrayString ¶ added in v0.37.0
func JSONParserGetArrayStringOneOnly ¶ added in v0.37.0
func MarshalBase64 ¶
func MarshalSimple ¶
func MustGetSubobjectBytes ¶
func MustMarshal ¶
func MustMarshalIndent ¶
func MustMarshalSimple ¶
func MustMarshalString ¶
func PointerCondense ¶
PointerCondense removes duplicate slashes.
func PointerSubEscapeAll ¶
PointerSubEscapeAll will substitute vars using `fmt.Sprintf()` All strings are escaped.
func PrettyPrint ¶
PrettyPrint converts a JSON byte array into a prettified byte array.
func PropertyNameEscape ¶
PropertyNameEscape escapes JSON property name using JSON Schema rules.
func PropertyNameUnescape ¶
PropertyNameUnescape unescapes JSON property name using JSON Schema rules.
func UnmarshalMSI ¶
Types ¶
type Bool ¶
type Bool bool
Bool implements a tolerant reader for `bool` type.
func (*Bool) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.