Skip to content

Commit 58bdc34

Browse files
authored
Update README.md
Fix for typos.
1 parent ea41091 commit 58bdc34

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1633,9 +1633,7 @@ struct my_int_reader_writer
16331633

16341634
void write(const int & v, ...) const {...} // Custom write procedure for int.
16351635
};
1636-
16371636
...
1638-
16391637
struct my_data
16401638
{
16411639
int field_;
@@ -1652,9 +1650,9 @@ struct my_data
16521650

16531651
In that case a reference to an `int` will be passed to `my_int_reader_writer`'s `read` and `write` methods.
16541652

1655-
But if `my_data` isn't `int` but a `std::vector<int>` then a reference to `std::vector<int>` instance will be passed to `read`/`write`. And there will be a compiler error because `read`/`write` expects a reference to an `int`.
1653+
In the case when `my_data` isn't `int` but a `std::vector<int>` then a reference to `std::vector<int>` instance will be passed to `read`/`write`. And there will be a compiler error because `read`/`write` expects a reference to an `int`.
16561654

1657-
If we want to apply our custom Reader_Writer be applied for every member of a container then `json_dto::apply_to_content_t` proxy should be used as Reader_Writer type:
1655+
If we want our custom Reader_Writer to be applied for every member of a container then `json_dto::apply_to_content_t` proxy should be used as Reader_Writer type:
16581656

16591657
```cpp
16601658
struct my_complex_data
@@ -1736,13 +1734,13 @@ struct my_complex_data {
17361734
17371735
### Overloading of read_json_value/write_json_value for const_map_key_t/mutable_map_key_t
17381736
1739-
Since v.0.2.11 json_dto (de)serializes keys of map-like containers (like `std::map`, `std::multimap`, `std::unordered_map` and so on) by using new proxy types `const_map_key_t` and `mutable_map_key_t`.
1737+
Since v.0.2.11 json_dto (de)serializes keys of map-like containers (`std::map`, `std::multimap`, `std::unordered_map` and so on) by using new proxy types `const_map_key_t` and `mutable_map_key_t`.
17401738
17411739
A new type `const_map_key_t<T>` is used for serializing a key of type T.
17421740
17431741
A new type `mutable_map_key_t<T>` is used for deserializing a key of type T.
17441742
1745-
It means that if someone wants to make overloads of `read_json_value` and `write_json_value` for types that used as keys in map-like structures, then such overloads should be placed into `json_dto` namespace and should have the following prototypes:
1743+
It means that if someone wants to make overloads of `read_json_value` and `write_json_value` for types that are used as keys in map-like structures, then such overloads should be placed into `json_dto` namespace and should have the following prototypes:
17461744
17471745
```cpp
17481746
namespace json_dto {

0 commit comments

Comments
 (0)