json

package
v0.94.0-pre Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package json provides various JSON serialization/deserialization routines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJSON

func FromJSON(data []byte) interface{}

FromJSON deserializes value from json. It uses `System.Json.Deserialize` syscall. It performs deserialization as follows: strings -> []byte (string) from base64 integers -> (u)int* types null -> interface{}(nil) arrays -> []interface{} maps -> map[string]interface{}

func ToJSON

func ToJSON(item interface{}) []byte

ToJSON serializes value to json. It uses `System.Json.Serialize` syscall. Serialization format is the following: []byte -> base64 string bool -> json boolean nil -> Null string -> base64 encoded sequence of underlying bytes (u)int* -> integer, only value in -2^53..2^53 are allowed []interface{} -> json array map[type1]type2 -> json object with string keys marshaled as strings (not base64).

Types

This section is empty.

Jump to

Keyboard shortcuts

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