Version: v2.1.0 Latest Latest

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

Go to latest
Published: Jun 8, 2021 License: ISC Imports: 1 Imported by: 0




View Source
const Null = -1

Null is the value used to represent JSON null. It should never be used as a value, as it won't get serialized as such.


This section is empty.


func ToJSON

func ToJSON(i Enum) []byte

Int8ToJSON converts the passed Enum to a byte slice with it's JSON representation.


type Enum

type Enum int8

Enum is a nullable version of a uint8. Enum values should only consist of positive values, as negative values are reserved for internal constants, such as Null. This also mean that only 7 of the 8 Bit will be available for storage.

func FromJSON

func FromJSON(b []byte) (Enum, error)

Int8FromJSON decodes the Enum stored as JSON src the passed byte slice.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL