HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
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)
 

Detailed Description

Contains the conversions between HAL data types and their JSON representation.

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().