Documentation
¶
Overview ¶
Package yaml converts JSON to YAML. Borrowed from https://github.com/itchyny/json2yaml v0.1.5 Copyright (c) 2022 itchyny, MIT licensed.
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"
json2yaml "github.com/MeGaNeKoS/neoma/yaml"
)
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.