Skip to content

Adds MarshalYAML for marshaling yaml#387

Open
cskeeters wants to merge 4 commits intoshopspring:masterfrom
cskeeters:master
Open

Adds MarshalYAML for marshaling yaml#387
cskeeters wants to merge 4 commits intoshopspring:masterfrom
cskeeters:master

Conversation

@cskeeters
Copy link
Copy Markdown

When marshaling with go-yaml/yaml, numbers are output as double quoted strings. This adds a custom marshaller (MarshalYAML) that respects a new variable MarshalYAMLWithoutQuotes.

If you decide that you don't want this, I'm happy for it to just live here as a closed PR for anyone else looking for how to do this on their own.

Adds MarshalYAMLWithoutQuotes for marshaling Decimal without quotes
Comment thread decimal.go Outdated
Comment thread decimal.go Outdated
Copy link
Copy Markdown

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing

Comment thread decimal.go
Adds line of space before yaml.3 import

Co-authored-by: ccoVeille <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants