Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "0.2.1"
Version is the module version, injected at release by `make publish-go`.
Variables ¶
This section is empty.
Functions ¶
func MakeJsonic ¶
func MakeJsonic(opts ...YamlOptions) *jsonic.Jsonic
MakeJsonic creates a jsonic instance configured for YAML parsing. If a YamlOptions is passed, its fields are propagated to the plugin.
Types ¶
type DocMeta ¶
type DocMeta struct {
Directives []string `json:"directives"`
Explicit bool `json:"explicit"`
Ended bool `json:"ended"`
}
DocMeta holds per-document metadata captured by the stream rule.
type MetaResult ¶
MetaResult is the return shape when YamlOptions.Meta is true. Meta is either a *DocMeta (single doc) or []*DocMeta (multi-doc). Content is either the doc value (single) or []any (multi-doc).
type YamlOptions ¶
type YamlOptions struct {
// When true, Parse returns a struct {Meta, Content} instead of bare
// content. Mirrors the TypeScript `meta` option.
Meta bool
}
YamlOptions configures the YAML parser plugin. Currently empty — reserved for future extension.
Click to show internal directories.
Click to hide internal directories.