jsonx

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MPL-2.0 Imports: 6 Imported by: 55

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