Documentation
¶
Overview ¶
Package json2yaml implements a converter from JSON to YAML.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert reads JSON from r and writes YAML to w.
Example ¶
package main
import (
"fmt"
"log"
"strings"
"github.com/itchyny/json2yaml"
)
func main() {
input := strings.NewReader(`{"Hello": "world!"}`)
var output strings.Builder
if err := json2yaml.Convert(&output, input); err != nil {
log.Fatalln(err)
}
fmt.Print(output.String())
}
Output: Hello: world!
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.