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

[request] Add pretty json support #156

Open
masbug opened this issue Sep 26, 2024 · 4 comments
Open

[request] Add pretty json support #156

masbug opened this issue Sep 26, 2024 · 4 comments

Comments

@masbug
Copy link

masbug commented Sep 26, 2024

For debugging etc. it's really usefull to have pretty printed json.

@ambitslix
Copy link

You can use rapidjson. I think it's outside the scope of yas.

@masbug
Copy link
Author

masbug commented Sep 26, 2024

I'm pretty sure it's not. I really like YAS because it is very fast and easy to add to the code. I would hate to use another json lib just to add pretty printing.
To add printing a "size_t level" would need to be added to the serializer template...after that it's easy ;)

@ambitslix
Copy link

I would agree but if you need json anything you will need a c++ library. You are not just going to use yas for your c++ json business? How are you going to parse json for example?

@masbug
Copy link
Author

masbug commented Sep 26, 2024

I parse json with YAS. I use it for already defined structures not for free-formed json.
It's sort of a way faster alternative to protobuf and less cumbersome to use.

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

No branches or pull requests

2 participants