decode

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJSON

func FromJSON(v interface{}, reader io.Reader) error

FromJSON reads an AsyncAPI document from input in a JSON format and stores it in the value. If the operation fails, the function returns an error.

See InvalidProperty, InvalidDocument, UnsupportedAsyncapiVersion in pkg/error.

func FromJSONWithYamlFallback

func FromJSONWithYamlFallback(out interface{}, reader io.Reader) error

FromJSONWithYamlFallback reads an AsyncAPI document from input in the JSON format. If the operation fails, the function tries to read the AsyncAPI document in the YAML format. If any of the decoding attempts succeeds, the result is stored in the value. If both decoding attempts fail, the function returns an error.

See InvalidProperty, InvalidDocument, UnsupportedAsyncapiVersion in pkg/error.

func FromYaml

func FromYaml(v interface{}, reader io.Reader) error

FromYaml reads an AsyncAPI document from input in the YAML format and stores it in the value. If the operation fails, the function returns an error.

See InvalidProperty, InvalidDocument, UnsupportedAsyncapiVersion in pkg/error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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