Closed ghost closed 3 years ago
I'm developing a C++ application that uses nlohmann::json API. Link here: https://github.com/nlohmann/json
nlohmann::json
I would like to call a Fortran function passing a JSON as a input argument.
extern "C" { void my_fortran_fun(nlohmann::json myJson); } int main() { ... my_fortran_fun(my_json); --- }
Is it possible?
JSON-Fortran isn't going to understand the C++ structure (and C++ isn't going to understand the Fortran structure). Probably you could do it by serializing the JSON to a string?
See also #371 and #429.
I'm developing a C++ application that uses
nlohmann::json
API. Link here: https://github.com/nlohmann/jsonI would like to call a Fortran function passing a JSON as a input argument.
Is it possible?