HAL
hal::JsonConverter Namespace Reference

Functions

std::unordered_map< std::string, std::string > stringToDictionary (const std::string &json_string)
 
std::string dictionaryToString (const std::unordered_map< std::string, std::string > &key_values)
 

Function Documentation

◆ dictionaryToString()

std::string hal::JsonConverter::dictionaryToString ( const std::unordered_map< std::string, std::string > &  key_values)

Convert key->value map (aka dictionary) to JSON string

Parameters
key_valueskey->value map of std::string
Returns
the JSON string

Definition at line 254 of file json_write_document.cpp.

Referenced by hal::KeyValueTable::toJson().

◆ stringToDictionary()

std::unordered_map< std::string, std::string > hal::JsonConverter::stringToDictionary ( const std::string &  json_string)

Convert JSON string to key->value map (aka dictionary)

Parameters
[in]json_stringString in JSON format
Returns
the dictionary

Definition at line 239 of file json_write_document.cpp.

Referenced by hal::KeyValueTable::setJson().