Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func YAMLToJSON ¶
YAMLToJSON converts a YAML node to JSON using a custom JSON writer that preserves formatting. This approach is particularly useful when the YAML nodes already represent JSON input (since the yaml decoder can parse JSON), and we want to preserve the original JSON formatting.
func YAMLToJSONWithConfig ¶ added in v1.11.0
func YAMLToJSONWithConfig(node *yaml.Node, indent string, indentCount int, trailingNewline bool, buffer io.Writer) error
YAMLToJSONWithConfig converts YAML to JSON with full control over formatting. When the input nodes already have JSON-style formatting (from JSON input), this preserves it by analyzing Line and Column metadata to recreate the original formatting.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.