diff --git a/example/jsontest/CMakeLists.txt b/example/jsontest/CMakeLists.txt new file mode 100644 index 000000000..e3eafe9f1 --- /dev/null +++ b/example/jsontest/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.8.3) +project(jsontest) + +add_compile_options(-std=c++11) + +find_package(catkin REQUIRED COMPONENTS) + +find_package(jsoncpp REQUIRED) + +catkin_package( + INCLUDE_DIRS include + LIBRARIES + CATKIN_DEPENDS + DEPENDS jsoncpp +) + +include_directories( + include + ${catkin_INCLUDE_DIRS} +) + +add_executable(${PROJECT_NAME}_node src/jsontest_node.cpp) + + target_link_libraries(${PROJECT_NAME}_node + ${catkin_LIBRARIES} + jsoncpp +) + diff --git a/example/jsontest/package.xml.out b/example/jsontest/package.xml.out new file mode 100644 index 000000000..ab12713b1 --- /dev/null +++ b/example/jsontest/package.xml.out @@ -0,0 +1,62 @@ + + + jsontest + 0.0.0 + The jsontest package + + + + + cn + + + + + + TODO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + catkin + jsoncpp + jsoncpp + jsoncpp + + + + + + + + diff --git a/example/jsontest/src/jsontest_node.cpp b/example/jsontest/src/jsontest_node.cpp new file mode 100644 index 000000000..1a8bfcf5e --- /dev/null +++ b/example/jsontest/src/jsontest_node.cpp @@ -0,0 +1,10 @@ +#include +#include +#include + +int main() { + Json::Value root; + std::ifstream file("test.json"); + file >> root; + std::cout << root; +} diff --git a/example/jsontest/src/test.json b/example/jsontest/src/test.json new file mode 100644 index 000000000..8dacf8c60 --- /dev/null +++ b/example/jsontest/src/test.json @@ -0,0 +1,11 @@ +{ + "stocks": [ + {"symbol": "AAPL", + "amount": 1.03213, + "last_price": 1.20}, + {"symbol": "MSFT", + "amount": 2.31039}, + {"symbol": "F", + "amount": 0.543589} + ] +} diff --git a/include/json/version.h b/include/json/version.h index 027f73173..06c61870f 100644 --- a/include/json/version.h +++ b/include/json/version.h @@ -1,16 +1,14 @@ // DO NOT EDIT. This file (and "version") is generated by CMake. // Run CMake configure step to update it. #ifndef JSON_VERSION_H_INCLUDED -#define JSON_VERSION_H_INCLUDED +# define JSON_VERSION_H_INCLUDED -#define JSONCPP_VERSION_STRING "1.8.4" -#define JSONCPP_VERSION_MAJOR 1 -#define JSONCPP_VERSION_MINOR 8 -#define JSONCPP_VERSION_PATCH 4 -#define JSONCPP_VERSION_QUALIFIER -#define JSONCPP_VERSION_HEXA \ - ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \ - (JSONCPP_VERSION_PATCH << 8)) +# define JSONCPP_VERSION_STRING "1.8.4" +# define JSONCPP_VERSION_MAJOR 1 +# define JSONCPP_VERSION_MINOR 8 +# define JSONCPP_VERSION_PATCH 4 +# define JSONCPP_VERSION_QUALIFIER +# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) #ifdef JSONCPP_USING_SECURE_MEMORY #undef JSONCPP_USING_SECURE_MEMORY diff --git a/install_manifest.txt b/install_manifest.txt new file mode 100644 index 000000000..bbd53f47b --- /dev/null +++ b/install_manifest.txt @@ -0,0 +1,15 @@ +/usr/local/lib/pkgconfig/jsoncpp.pc +/usr/local/lib/cmake/jsoncpp/jsoncppConfig.cmake +/usr/local/lib/cmake/jsoncpp/jsoncppConfig-release.cmake +/usr/local/lib/libjsoncpp.a +/usr/local/include/json/allocator.h +/usr/local/include/json/assertions.h +/usr/local/include/json/autolink.h +/usr/local/include/json/config.h +/usr/local/include/json/features.h +/usr/local/include/json/forwards.h +/usr/local/include/json/json.h +/usr/local/include/json/reader.h +/usr/local/include/json/value.h +/usr/local/include/json/version.h +/usr/local/include/json/writer.h \ No newline at end of file