Stiffstream / json_dto

A small header-only library for converting data between json representation and c++ structs
BSD 3-Clause "New" or "Revised" License
149 stars 18 forks source link

Allow to outputJSON in a pretty way #13

Closed sandercox closed 3 years ago

sandercox commented 3 years ago

I was trying to write readable JSON using json_dto but found that the output was fixed to be non pretty printed version.

Added a method to use the rapidjson PrettyWriter and pass the options thru a struct.

eao197 commented 3 years ago

Hi! Thanks for PR. We'll review it as soon as we have time for that.

eao197 commented 3 years ago

Hi!

I took your code as a base and made version 0.2.13 with a new overload for json_dto::to_json: https://github.com/Stiffstream/json_dto/releases/tag/v.0.2.13

Thanks for your PR!