NRP Core
1.4.1
json_converter.h
Go to the documentation of this file.
1
//
2
// NRP Core - Backend infrastructure to synchronize simulations
3
//
4
// Copyright 2020-2023 NRP Team
5
//
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
// http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17
//
18
// This project has received funding from the European Union’s Horizon 2020
19
// Framework Programme for Research and Innovation under the Specific Grant
20
// Agreement No. 945539 (Human Brain Project SGA3).
21
//
22
23
#include <boost/python.hpp>
24
#include <boost/python/numpy.hpp>
25
#include <nlohmann/json.hpp>
26
27
#ifndef ENGINE_JSON_JSON_CONVERTER_H
28
#define ENGINE_JSON_JSON_CONVERTER_H
29
30
namespace
json_converter
31
{
32
40
void
initNumpy
();
41
45
PyObject *
convertJsonToPyObject
(
const
nlohmann::json
&
json
);
46
47
51
nlohmann::json
convertPyObjectToJson
(PyObject* value);
52
53
}
// namespace json_converter
54
55
#endif // ENGINE_JSON_JSON_CONVERTER_H
56
57
// EOF
json_converter
Definition:
json_converter.cpp:34
json_converter::convertJsonToPyObject
PyObject * convertJsonToPyObject(const nlohmann::json &json)
Converts given JSON object into a python object.
Definition:
json_converter.cpp:75
json_converter::convertPyObjectToJson
nlohmann::json convertPyObjectToJson(PyObject *value)
Converts given python object into a JSON object.
Definition:
json_converter.cpp:208
json_converter::initNumpy
void initNumpy()
Initializes numpy array API for this module.
Definition:
json_converter.cpp:241
json
nlohmann::json json
Definition:
engine_json_server.cpp:31
nrp_general_library
nrp_general_library
utils
json_converter.h
Generated by
1.8.17