Functions | |
PyObject * | convertJsonToPyObject (const nlohmann::json &json) |
Converts given JSON object into a python object. More... | |
nlohmann::json | convertNumpyArrayToJson (PyObject *value) |
nlohmann::json | convertPyObjectToJson (PyObject *value) |
Converts given python object into a JSON object. More... | |
void | initNumpy () |
Initializes numpy array API for this module. More... | |
PyObject * json_converter::convertJsonToPyObject | ( | const nlohmann::json & | json | ) |
Converts given JSON object into a python object.
nlohmann::json json_converter::convertNumpyArrayToJson | ( | PyObject * | value | ) |
nlohmann::json json_converter::convertPyObjectToJson | ( | PyObject * | value | ) |
Converts given python object into a JSON object.
void json_converter::initNumpy | ( | ) |
Initializes numpy array API for this module.
The function must be called before using the module. If it's not done, some of the other functions in the module may fail with an exception. The function must be called after Py_Initialize().