MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / BT_JSON_CONVERTER

Function BT_JSON_CONVERTER

examples/t12_default_ports.cpp:26–30  ·  view source on GitHub ↗

Allow bi-directional conversion to JSON

Source from the content-addressed store, hash-verified

24
25// Allow bi-directional conversion to JSON
26BT_JSON_CONVERTER(Point2D, point)
27{
28 add_field("x", &point.x);
29 add_field("y", &point.y);
30}
31
32// We can extend the traditional BT::convertFromString<Point2D>()
33// to support the JSON format too (see port with name "pointE")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected