Documentation
¶
Overview ¶
Package jsonconv provides functions to encode and decode JSON string literals
Index ¶
- func AppendQuote(dest []byte, s string) []byte
- func AppendQuoteBytes(dest, s []byte) []byte
- func AppendQuoteBytesEscapeHTML(dest, s []byte) []byte
- func AppendQuoteEscapeHTML(dest []byte, s string) []byte
- func IsValidNumber(s string) bool
- func IsValidNumberBytes(s []byte) bool
- func Quote(s string) []byte
- func QuoteBytes(s []byte) []byte
- func QuoteBytesEscapeHTML(s []byte) []byte
- func QuoteEscapeHTML(s string) []byte
- func Unquote(s []byte) (t string, ok bool)
- func UnquoteBytes(s []byte) (t []byte, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendQuote ¶
AppendQuote appends the double-quoted JSON string literal representing s, to dest and returns the extended buffer
func AppendQuoteBytes ¶
AppendQuoteBytes appends the double-quoted JSON string literal representing s, to dest and returns the extended buffer
func AppendQuoteBytesEscapeHTML ¶
AppendQuoteBytesEscapeHTML behaves as AppendQuoteBytes but also escapes <, >, and &
func AppendQuoteEscapeHTML ¶
AppendQuoteEscapeHTML behaves as AppendQuote but also escapes <, >, and &
func IsValidNumber ¶
IsValidNumber reports whether s is a valid JSON number literal.
func IsValidNumberBytes ¶
IsValidNumberBytes reports whether s is a valid JSON number literal.
func QuoteBytes ¶ added in v0.2.0
QuoteBytes returns the double-quoted JSON string literal representing s
func QuoteBytesEscapeHTML ¶ added in v0.2.0
QuoteBytesEscapeHTML behaves as QuoteBytes, but also escapes <, >, and &
func QuoteEscapeHTML ¶ added in v0.2.0
QuoteEscapeHTML behaves as Quote, but also escapes <, >, and &
func UnquoteBytes ¶
UnquoteBytes converts a double-quoted JSON string literal s to the unquoted and unescaped form
Types ¶
This section is empty.