Skip to content

Marshal goccy #2373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Marshal goccy #2373

wants to merge 3 commits into from

Conversation

LarsStegman
Copy link

We have a project in which we parse a YAML file to a Goccy AST, then use yq (embedded in the yaml file) to transform the AST. The step we are missing is to be able to marshal from the yq CandidateNode back to a the Goccy AST. If there is a better way to do this, I am open to it :)

@mikefarah
Copy link
Owner

That is very interesting - I'm looking to replace the YAML library with goccy - and it seems like this a closer step towards that👍🏼 I'll have to have a closer when I get some time. The test isn't to standard - but let me first think on whether I want this merged 🤔

@LarsStegman
Copy link
Author

Of course, this works for our use case, but I am open to any changes to make it more generally usable. What should I do to improve the test?

One of the downsides of the library is that the encoding of the AST back to YAML is dependent on information from the parsing stage. I know goccy is working on improving that though :)

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