src/cpp-common: add bt2c::bt2ValueFromJsonVal() function
This patch adds the bt2c::bt2ValueFromJsonVal() function which
converts a JSON value object (`bt2c::JsonVal`) to a Babeltrace 2
value object (`bt2::Value::Shared`, wrapping a shared `bt_value *`).
The JSON value classes are a superset of the Babeltrace 2 value ones:
there's a dedicated `bt2c::JsonNullVal` class, whereas
libbabeltrace2 uses a null value singleton, and `bt2c::JsonVal`
has a text location member.
This is part of an effort to support CTF2‑SPEC‑2.0 [1]. This function
will be useful to convert JSON user attributes to Babeltrace 2 values
directly (this step doesn't need validation).
[1]: https://diamon.org/ctf/CTF2-SPEC-2.0.html
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: If3f0859202aa2ef329048ca5775883059e2b6e50
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7486
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12686
This page took 0.024065 seconds and 4 git commands to generate.