文件名称:pybind11_json:使用nlohmann
文件大小:13KB
文件格式:ZIP
更新时间:2024-05-25 09:24:30
C++
pybind11_json pybind11_json是nlohmann::json到pybind11桥梁,它可以让你自动转换nlohmann::json到py::object和周围的其他方式。 只需包含标头,即可启用自动转换。 C ++ API: nlohmann::json和pybind11 Python对象之间的自动转换 # include " pybind11_json/pybind11_json.hpp " # include " nlohmann/json.hpp " # include " pybind11/pybind11.h " namespace py = pybind11; namespace nl = nlohmann; using namespace pybind11 ::literals ; py::dict obj = py::dict( " number
【文件预览】:
pybind11_json-master
----.gitignore(8B)
----pybind11_jsonConfig.cmake.in(1KB)
----LICENSE(1KB)
----.github()
--------workflows()
----README.md(4KB)
----include()
--------pybind11_json()
----test()
--------test_pybind11_json.cpp(11KB)
--------downloadGTest.cmake.in(1008B)
--------copyGTest.cmake.in(950B)
--------CMakeLists.txt(3KB)
----CMakeLists.txt(5KB)