Skip to content
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

YAML Support #39

Open
DylanYoung opened this issue Oct 8, 2019 · 5 comments
Open

YAML Support #39

DylanYoung opened this issue Oct 8, 2019 · 5 comments

Comments

@DylanYoung
Copy link

Do we have YAMl support? Do you want it? I'd be happy to implement, at least on the input side.

@wolverdude
Copy link
Owner

Thanks for the suggestion! Sorry for the slow response. I was on vacation, and then I moved.

I hadn't intended to build this in since it would require adding a dependency, but I suppose that shouldn't be a big deal. As it is, you can easily wrap the output in YAML:

yaml.dumps(builder.to_schema())

But I'm assuming you want to use it with the executable, in which case YAML would have to be built in. If that's the case, feel free to submit a PR and I'll take a look. I'd also happily take suggestions for other formats people might want (xml? ini?).

@DylanYoung
Copy link
Author

DylanYoung commented Dec 22, 2019

@wolverdude

Actually, I think that's fine for my use case. I was actually looking for yaml input (to generate a json schema for our yaml changelog to work with vs code), but I see now that I can just parse the yaml into python dicts, feed GenSON that way, and output however I want.

Works for me! You can close this if there's no other interest. I could do a PR to support Yaml if you're interested. It wouldn't be too much work and I do appreciate your helpful response :)

Thanks!

@wolverdude
Copy link
Owner

I'll leave the Issue up for a while to see if there's more interest before closing. Anyone who wants to see other serialization formats besides JSON supported natively, please mention here.

@ssbarnea
Copy link

I almost never use JSON but I use YAML a lot and it would be extreamly useful to have native support for YAML and avoid the intermediary conversion. Please make it happen!

@DylanYoung
Copy link
Author

DylanYoung commented Jan 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants