marshal

package
v0.0.0-...-71c6276 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONField

func JSONField(objMap map[string]json.RawMessage, field string, target interface{})

JSONField tries to marshall field from json object - useful for custom unmarshalling (ex. TryUnmarshallField)

func ToRawJSONMap

func ToRawJSONMap(bytes []byte) (result map[string]json.RawMessage, resultErr error)

ToRawJSONMap unmarshal bytes to Raw JSON map

func TryJSON

func TryJSON(in interface{}) (result []byte)

TryJSON tries to marshal into JSON, if fails, then fails silently

func TryJSONPretty

func TryJSONPretty(in interface{}) (result []byte)

TryJSONPretty tries to marshal into JSON - the pretty way, if fails, then fails silently

Types

This section is empty.

Jump to

Keyboard shortcuts

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