Skip to content

Commit 7fce92c

Browse files
committed
Version 0.2.13 is described in README.
1 parent 76120a3 commit 7fce92c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Table of Contents
44
* [Table of Contents](#table-of-contents)
55
* [What Is json_dto?](#what-is-json_dto)
66
* [What's new?](#whats-new)
7+
* [v.0.2.13](#v0213)
78
* [v.0.2.12](#v0212)
89
* [v.0.2.11](#v0211)
910
* [v.0.2.10](#v0210)
@@ -65,6 +66,24 @@ working with JSON in various projects.
6566

6667
# What's new?
6768

69+
## v.0.2.13
70+
71+
A new overload `to_json` added that receives an instance of `pretty_writer_params_t` with parameters for RapidJSON's PrettyWriter:
72+
73+
```cpp
74+
my_data my_obj;
75+
...
76+
// Make default serialization, without pretty-writer:
77+
std::string my_obj_image = json_dto::to_json(my_obj);
78+
79+
// Make serialization with pretty-writer:
80+
std::string my_obj_pretty_image = json_dto::to_json(my_obj,
81+
json_dto::pretty_writer_params_t{}
82+
.indent_char(' ')
83+
.indent_char_count(3u)
84+
.format_options(rapidjson::kFormatSingleLineArray));
85+
```
86+
6887
## v.0.2.12
6988

7089
Functions `mandatory`, `optional`, `optional_no_default`, and `optional_null` now accepts const- and rvalue references. That can be useful for types that have to be only serializable. For example:

0 commit comments

Comments
 (0)