jsonx

package
v0.0.0-...-52b58a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2022 License: Apache-2.0, MPL-2.0 Imports: 6 Imported by: 0

README

JSONx

GoDoc

A Go (Golang) library to transform an object or existing JSON bytes into JSONx. Because sometimes your luck runs out.

This follows the "standard" except for the handling of special and escaped characters. Names and values are properly XML-escaped but there is no special handling of values already escaped in JSON if they are valid in XML.

Documentation

Index

Constants

View Source
const (
	XMLHeader = `<?xml version="1.0" encoding="UTF-8"?>`
	Header    = `` /* 190-byte string literal not displayed */
	Footer    = `</json:object>`
)

Variables

This section is empty.

Functions

func EncodeJSONBytes

func EncodeJSONBytes(input []byte) ([]byte, error)

EncodeJSONBytes encodes JSON-formatted bytes into JSONx. It is designed to be used for multiple entries so does not prepend the JSONx header tag or append the JSONx footer tag. You can use jsonx.Header and jsonx.Footer to easily add these when necessary.

func Marshal

func Marshal(input interface{}) (string, error)

Marshal marshals the input data into JSONx.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL