mirror of
https://github.com/boostorg/json.git
synced 2026-01-24 18:02:22 +00:00
When building outside of boost, boost_json now supports the install option of cmake. This patch produces a full, correct install which obeys CMAKE_INSTALL_PREFIX and creates the correct config.cmake files in order to construct the target Boost::json This config will automatically find Boost::system using the standard cmake find_package command
14 lines
408 B
C++
14 lines
408 B
C++
// Copyright 2018 Peter Dimov
|
|
// Copyright 2020 Richard Hodges
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
|
|
|
#include <boost/json.hpp>
|
|
#include <cstdio>
|
|
|
|
int main()
|
|
{
|
|
const boost::json::value value = boost::json::parse("{ \"test\": true }");
|
|
std::puts(boost::json::to_string(value).c_str());
|
|
}
|