safejson

package
v0.0.0-...-c7fba9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paragraph

type Paragraph struct {
	// contains filtered or unexported fields
}

Paragraph accepts any valid JSON string. Its Clean method will remove characters that aren't expected in a long descriptive text. I.e.: Cc (except for \n), Co, Cf, Cs, noncharacters, and � (U+FFFD, the replacement character) are removed.

func (Paragraph) Clean

func (par Paragraph) Clean() string

Clean returns the string, with Cc minus \n, Co, Cf, Cs, noncharacters, and � (U+FFFD) removed.

func (*Paragraph) UnmarshalJSON

func (par *Paragraph) UnmarshalJSON(in []byte) (err error)

type String

type String struct {
	// contains filtered or unexported fields
}

String accepts any valid JSON string. Its Clean method will remove characters that aren't expected in a short descriptive text. I.e.: Cc, Co, Cf, Cs, noncharacters, and � (U+FFFD, the replacement character) are removed.

func (String) Clean

func (str String) Clean() string

Clean returns the string, with Cc, Co, Cf, Cs, noncharacters, and � (U+FFFD) removed.

func (*String) UnmarshalJSON

func (str *String) UnmarshalJSON(in []byte) (err error)

Jump to

Keyboard shortcuts

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