yaml – sigs.k8s.io/yaml Index | Files

package yaml

import "sigs.k8s.io/yaml"

Copyright 2013 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Functions

func JSONToYAML

func JSONToYAML(j []byte) ([]byte, error)

Convert JSON to YAML.

func Marshal

func Marshal(o interface{}) ([]byte, error)

Marshals the object into JSON then converts JSON to YAML and returns the YAML.

func Unmarshal

func Unmarshal(y []byte, o interface{}) error

Converts YAML to JSON then uses JSON to unmarshal into an object.

func YAMLToJSON

func YAMLToJSON(y []byte) ([]byte, error)

Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through this method should be a no-op.

Things YAML can do that are not supported by JSON:

Source Files

fields.go yaml.go

Version
v1.0.0
Published
Mar 27, 2017
Platform
linux/amd64
Imports
12 packages
Last checked
7 hours ago

Tools for package owners.