ae4127d530
In boost 1.57 the + and - operations are no longer overloaded on the iterator constants by default causing the following error: .../include/valijson/validation_visitor.hpp:930:76: error: no match for ‘operator-’ (operand types are ‘const const_iterator {aka const valijson::adapters::RapidJsonArrayValueIterator}’ and ‘int’) const typename AdapterType::Array::const_iterator secondLast = end - 1; The ++ operator is still valid, so here we rework in terms of it. |
||
---|---|---|
doc | ||
examples | ||
include/valijson | ||
tests | ||
thirdparty | ||
xcode/valijson.xcodeproj | ||
.gitignore | ||
.travis.yml | ||
CMakeLists.txt | ||
Doxyfile | ||
LICENSE | ||
README.md |
Valijson
Overview
Valijson is a header-only JSON Schema Validation library for C++.
Valijson provides a simple validation API that allows you load JSON Schemas, and validate documents loaded by one of several supported parser libraries.
License
Valijson is licensed under the Simplified BSD License. See the LICENSE file for more information.
Dependencies
Required:
- boost 1.54
Valijson supports JSON documents loaded using JsonCpp, RapidJson and Boost Property Tree. It has been tested against the following versions of these libraries:
Other versions of these libraries may work, but have not been tested.
JSON Schema Support
Valijson supports most of the constraints defined in Draft 3 and Draft 4 of the JSON Schema specification.
The exceptions for Draft 3 are:
- disallow
- divisibleBy
- extends
- format (optional)
- readonly
- ref
- refRemote
The exceptions for Draft 4 are:
- definitions
- format (optional)
- multipleOf
- ref
- refRemote
Support for JSON References is in development.
Build instructions
A rudimentary Makefile has been included. Running 'make examples' will build the example programs in the 'examples' directory. Running 'make check' will build and run the test suite. Executables will be placed in 'bin'.
An Xcode 5 project has also been provided, in the 'xcode' directory. Note that in order to run the test suite, you may need to configure the working directory for the 'test_suite' scheme.
The Xcode project has been configured so that /usr/local/include is in the include path, and /usr/local/lib is in the library path. These are the locations that homebrew installed Boost on my test system.
Doxygen documentation can be built by running 'doxygen' from the project root directory. Generated documentation will be placed in 'doc/html'. Other relevant documentation such as schemas and specifications have been included in the 'doc' directory.