Documentation ¶
Overview ¶
Package json provide a library for working with JSON.
This is an extension to standard "encoding/json" package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Escape ¶
Escape the following character: `"` (quotation mark), `\` (reverse solidus), `/` (solidus), `\b` (backspace), `\f` (formfeed), `\n` (newline), `\r` (carriage return`), `\t` (horizontal tab), and control character from 0 - 31.
References:
func EscapeString ¶
EscapeString escape the following character: `"` (quotation mark), `\` (reverse solidus), `/` (solidus), `\b` (backspace), `\f` (formfeed), `\n` (newline), `\r` (carriage return`), `\t` (horizontal tab), and control character from 0 - 31.
References ¶
func ToMapStringFloat64 ¶
ToMapStringFloat64 convert the map of string-interface{} into map of string-float64. This function convert the map's key to lower-cases and ignore zero value in interface{}. The interface{} value only accept basic numeric types and slice of byte.
func Unescape ¶
Unescape JSON bytes, reversing what Escape function do.
If strict is true, any unknown control character will be returned as error. For example, in string "\x", "x" is not valid control character, and the function will return empty string and error. If strict is false, it will return "x".
func UnescapeString ¶
UnescapeString unescape JSON string, reversing what EscapeString do.
If strict is true, any unknown control character will be returned as error. For example, in string "\x", "x" is not valid control character, and the function will return empty string and error. If strict is false, it will return "x".
Types ¶
This section is empty.