You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Examples.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -904,7 +904,7 @@ The output for (2), (3) and (4) is the same.
904
904
905
905
#### Serialize non-mandatory std::optional values using the convenience macros
906
906
907
-
The jsoncons library includes a `json_type_traits` specialization for
907
+
The jsoncons library includes a [json_type_traits](ref/json_type_traits.md) specialization for
908
908
`jsoncons::optional<T>` if `T` is also specialized. `jsoncons::optional<T>` is aliased to
909
909
[std::optional<T>](https://en.cppreference.com/w/cpp/utility/optional) if
910
910
jsoncons detects the presence of C++17, or if `JSONCONS_HAS_STD_OPTIONAL` is defined.
@@ -1008,7 +1008,7 @@ Output:
1008
1008
1009
1009
#### An example with std::shared_ptr and std::unique_ptr
1010
1010
1011
-
The jsoncons library includes `json_type_traits` specializations for
1011
+
The jsoncons library includes [json_type_traits](ref/json_type_traits.md) specializations for
1012
1012
`std::shared_ptr<T>` and `std::unique_ptr<T>` if `T` is not a [polymorphic class](https://en.cppreference.com/w/cpp/language/object#Polymorphic_objects),
1013
1013
i.e., does not have any virtual functions, and if `T` is also specialized. In addition, users can specialize `json_type_traits`
1014
1014
for polymorphic classes using the convenience macro `JSONCONS_POLYMORPHIC_TRAITS`, or by specializing `json_type_traits` explicitly.
@@ -1328,7 +1328,7 @@ Key 'ssn' not found
1328
1328
1329
1329
This example makes use of the convenience macros `JSONCONS_ENUM_TRAITS`
1330
1330
and `JSONCONS_ALL_GETTER_CTOR_TRAITS` to specialize the
1331
-
[json_type_traits](doc/ref/json_type_traits.md) for the enum type
1331
+
[json_type_traits](ref/json_type_traits.md) for the enum type
1332
1332
`ns::hiking_experience` and the classes `ns::hiking_reputon` and
1333
1333
`ns::hiking_reputation`.
1334
1334
The macro `JSONCONS_ENUM_TRAITS` generates the code from
@@ -1443,7 +1443,7 @@ Output:
1443
1443
#### Serialize a polymorphic type based on the presence of members
1444
1444
1445
1445
This example uses the convenience macro `JSONCONS_N_GETTER_CTOR_TRAITS`
1446
-
to generate the `json_type_traits` boilerplate for the `HourlyEmployee` and `CommissionedEmployee`
1446
+
to generate the [json_type_traits](ref/json_type_traits.md) boilerplate for the `HourlyEmployee` and `CommissionedEmployee`
1447
1447
derived classes, and `JSONCONS_POLYMORPHIC_TRAITS` to generate the `json_type_traits` boilerplate
1448
1448
for `std::shared_ptr<Employee>` and `std::unique_ptr<Employee>`. The type selection strategy is based
1449
1449
on the presence of mandatory members, in particular, to the `firstName`, `lastName`, and `wage` members of an
0 commit comments