Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToJSON ¶
Example ¶
package main import ( "fmt" "os" "strings" "github.com/frioux/leatherman/internal/tool/allpurpose/yaml" ) func main() { r := strings.NewReader("---\n - foo: 1\n - bar: 2\n---\nx: 1\n") err := yaml.ToJSON(nil, r) if err != nil { fmt.Fprintf(os.Stderr, "Couldn't ToJSON: %s\n", err) os.Exit(1) } }
Output: [{"foo":1},{"bar":2}] {"x":1}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.