18 timestamp = ts.
value().get<
double>();
26 std::function<void(const std::string&, const nlohmann::json&)> flatten;
47 for (
const auto& element :
value.items())
49 flatten(
fmt::format(
"{}/{}", prefix, element.key()), element.value());
55 double numeric_value = 0;
56 if (
value.is_boolean())
58 numeric_value =
value.get<
bool>();
60 else if (
value.is_number())
62 numeric_value =
value.get<
double>();
70 plot_data->pushBack({ timestamp, numeric_value });
bool parseMessageImpl(double ×tamp)
iterator end() noexcept
returns an iterator to one past the last element
array (ordered collection of values)
span_CONFIG_SIZE_TYPE size_t
a class to store JSON values
bool parseMessage(const MessageRef msg, double ×tamp) override
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(InputType &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
bool parseMessage(const MessageRef msg, double ×tamp) override
object (unordered set of name/value pairs)
iterator find(KeyT &&key)
find an element in a JSON object
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in BSON format
bool parseMessage(const MessageRef msg, double ×tamp) override
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json parse(InputType &&i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)
deserialize from a compatible input
bool parseMessage(const MessageRef msg, double ×tamp) override
const uint8_t * data() const
std::string _stamp_fieldname
PlotData & getSeries(const std::string &key)
reference value() const
return the value of an iterator
std::basic_string< Char > format(const text_style &ts, const S &format_str, const Args &... args)