Documentation
¶
Overview ¶
Package yaml 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"
json2yaml "github.com/booleanism/huma/v2/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.