yas icon indicating copy to clipboard operation
yas copied to clipboard

[request] Add pretty json support

Open masbug opened this issue 1 year ago • 4 comments

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

masbug avatar Sep 26 '24 07:09 masbug

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

ambitslix avatar Sep 26 '24 08:09 ambitslix

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 ;)

masbug avatar Sep 26 '24 09:09 masbug

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?

ambitslix avatar Sep 26 '24 10:09 ambitslix

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.

masbug avatar Sep 26 '24 10:09 masbug