jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Installation and integration

Requirements

To build, install and use the library you must have CMake installed, version 3.8 or later.

Supported compilers

jmespath.cpp needs a compiler that supports at least the c++14 standard. The currently supported and tested compilers are:

Library dependencies

Install from source

Build and install

To get the source code of the library either clone it from github

git clone https://github.com/robertmrk/jmespath.cpp.git

or download the latest release and extract it.

In the terminal change the current directory to the location of the source code

cd <path_to_source>/jmespath.cpp

Generate the project or makefiles for the build system of your choice with CMake, then build and install the library:

mkdir build
cd build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DJMESPATH_BUILD_TESTS=OFF
sudo cmake --build . --target install

Integration

To use the library in your CMake project you should find the library with "find_package" and link your target with "jmespath::jmespath":

cmake_minimum_required(VERSION 3.0)
project(example)
find_package(jmespath 0.1.0 CONFIG REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} jmespath::jmespath)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)

Install with Conan

If you are using Conan to manage your dependencies, then add jmespath.cpp/x.y.z@robertmrk/stable to your conanfile.py's requires, where x.y.z is the release version you want to use. Please file issues here if you experience problems with the packages.