Skip to content

Commit 1e473fe

Browse files
committed
fixing comments
1 parent 0b06807 commit 1e473fe

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

include/behaviortree_cpp/json_export.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,31 @@ class JsonExporter
8080
template <typename T>
8181
Expected<T> fromJson(const nlohmann::json& source) const;
8282

83-
/// Register new JSON converters with addConverter<Foo>().
84-
/// You should have used first the macro BT_JSON_CONVERTER
83+
/**
84+
* @brief Register new JSON converters with addConverter<Foo>().
85+
* You should used first the macro BT_JSON_CONVERTER.
86+
* The convertions from/to vector<T> are automatically registered.
87+
*/
8588
template <typename T>
8689
void addConverter();
8790

8891
/**
8992
* @brief addConverter register a to_json function that converts a json to a type T.
93+
* The convertion to std:vector<T> is automatically registered.
9094
*
9195
* @param to_json the function with signature void(const T&, nlohmann::json&)
9296
* @param add_type if true, add a field called [__type] with the name ofthe type.
93-
* */
97+
*/
9498
template <typename T>
9599
void addConverter(std::function<void(const T&, nlohmann::json&)> to_json,
96100
bool add_type = true);
97101

98-
/// Register custom from_json converter directly.
102+
/**
103+
* @brief addConverter register a from_json function that converts a json to a type T.
104+
* The convertions from std::vector<T> is automatically registered.
105+
*
106+
* @param from_json the function with signature void(const nlohmann::json&, T&)
107+
*/
99108
template <typename T>
100109
void addConverter(std::function<void(const nlohmann::json&, T&)> from_json);
101110

0 commit comments

Comments
 (0)