|
| std::string | sen::toJson (const Var &var, int indent=2) |
| | Converts a variant into its Json representation. See https://www.Json.org/Json-en.html for details.
|
| Var | sen::fromJson (const std::string &str) |
| | Inverse as toJson.
|
| std::vector< std::uint8_t > | sen::toBson (const Var &var) |
| | Converts a variant into its bson (Binary JSON) representation. See https://bsonspec.org/ for details.
|
| Var | sen::fromBson (const std::vector< std::uint8_t > &bson) |
| | Inverse as toBson.
|
| std::vector< std::uint8_t > | sen::toCbor (const Var &var) |
| | Converts a variant into its MessagePack representation. See https://msgpack.org/ for details.
|
| Var | sen::fromCbor (const std::vector< std::uint8_t > &cbor) |
| | Inverse as toCbor.
|
| std::vector< std::uint8_t > | sen::toMsgpack (const Var &var) |
| | Converts a variant into its msgpack representation. See https://cbor.io/ for details.
|
| Var | sen::fromMsgpack (const std::vector< std::uint8_t > &msgpack) |
| | Inverse as toMsgpack.
|
| std::vector< std::uint8_t > | sen::toUbjson (const Var &var) |
| | Converts a variant into its UBJSON (Universal Binary JSON Specification) representation. See https://ubjson.org/ for details.
|
| Var | sen::fromUbjson (const std::vector< std::uint8_t > &ubson) |
| | Inverse as toUbjson.
|
| Duration | sen::stringToDuration (const std::string &str) |
| | Converts a string to a duration.
|
| template<typename To, bool checkedConversion = false> |
| To | sen::getCopyAs (const Var &var) |
| | Tries to transform the stored value to T. For expensive types, like strings, maps or lists is better use:
|
| const Var & | sen::findElement (const VarMap &map, const std::string &key, const std::string &errorMessage) |
| | Finds an element in a map or throws std::exception containing the provided string otherwise.
|
| template<typename T> |
| T | sen::findElementAs (const VarMap &map, const std::string &key, const std::string &errorMessage) |
| | Finds an element in a map or throws std::exception containing the provided string otherwise.
|