marshal

package
v0.17.1-202404231708-w... Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duplicate

func Duplicate(data interface{}, duplicatedData interface{}) error

func FingerprintObject

func FingerprintObject(data interface{}) (*[]byte, error)

func FromBase64

func FromBase64(data string) ([]byte, error)

func FromBase64URL

func FromBase64URL(data string) ([]byte, error)

func FromJSON

func FromJSON(jsonString string, object interface{}) error

func FromJSONBytes

func FromJSONBytes(jsonBytes []byte, object interface{}) error

func FromJSONFile

func FromJSONFile(path string, object interface{}) error

func FromYAMLBytes

func FromYAMLBytes(yamlData []byte, object interface{}) error

func FromYAMLFile

func FromYAMLFile(path string, object interface{}) error

func FromYAMLString

func FromYAMLString(yamlString string, object interface{}) error

func ToBase64

func ToBase64(data string) string

func ToBase64URL

func ToBase64URL(data string) string

func ToCSV

func ToCSV(data interface{}) (string, error)

func ToCSVBytes

func ToCSVBytes(data interface{}) ([]byte, error)

func ToJSON

func ToJSON(data interface{}) (string, error)

func ToJSONBytes

func ToJSONBytes(data interface{}) ([]byte, error)

func ToJSONFile

func ToJSONFile(data interface{}, path string) error

ToJSONFile writes the data to path in YAML format

func ToPrettyPrintedJSONBytes added in v0.10.6

func ToPrettyPrintedJSONBytes(data interface{}) ([]byte, error)

func ToString

func ToString(data interface{}) string

func ToTSV

func ToTSV(data interface{}) (string, error)

func ToTSVBytes

func ToTSVBytes(data interface{}) ([]byte, error)

func ToUnescapedJSONBytes

func ToUnescapedJSONBytes(data interface{}) ([]byte, error)

json.Marshal writes some characters (e.g. '<') as unicode. This stops that to make logsa easier to read.

func ToYAML

func ToYAML(data interface{}) (string, error)

func ToYAMLBytes

func ToYAMLBytes(data interface{}) ([]byte, error)

func ToYAMLFile

func ToYAMLFile(data interface{}, path string) error

ToYAMLFile writes the data to path in YAML format

Types

This section is empty.

Jump to

Keyboard shortcuts

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