Go to file
Richard Clamp 2ac5d96852 Fix compatibility with boost 1.56+
In boost 1.56 the optional library is no longer happy with the implicit
conversion from boost::optional<std::string> to bool, so we get the following
errors:

    valijson/include/valijson/schema.hpp:177:16: error: no viable conversion from 'const boost::optional<std::string>' to 'bool'
            return id;
                   ^~

    valijson/include/valijson/schema.hpp:188:16: error: no viable conversion from 'const boost::optional<std::string>' to 'bool'
                    return title;
                           ^~~~~
    2 errors generated.

Here we explicitly test against boost::none instead.
2014-11-26 13:54:05 +00:00
doc Initial commit. 2013-10-30 07:51:11 +11:00
examples Improve contexts for error reporting, and fix unicode bug. 2014-06-15 22:09:38 +10:00
include/valijson Fix compatibility with boost 1.56+ 2014-11-26 13:54:05 +00:00
tests Improve contexts for error reporting, and fix unicode bug. 2014-06-15 22:09:38 +10:00
thirdparty Make min/max length constraints unicode-aware so that strings containing non-ASCII characters are handled correctly. 2014-06-15 13:35:16 +10:00
xcode/valijson.xcodeproj Improve contexts for error reporting, and fix unicode bug. 2014-06-15 22:09:38 +10:00
.gitignore Update CMake build to include external_schema example, and add usage info to external_schema.cpp. 2014-06-15 15:24:26 +10:00
.travis.yml Attempt to fix Travis CI apt-get issue. 2014-06-15 14:22:12 +10:00
CMakeLists.txt Update CMake build to include external_schema example, and add usage info to external_schema.cpp. 2014-06-15 15:24:26 +10:00
Doxyfile Initial commit. 2013-10-30 07:51:11 +11:00
LICENSE Initial commit. 2013-10-30 07:51:11 +11:00
README.md Add CMake and travis configuration files for automated builds. 2014-04-17 10:58:51 +10:00

Valijson Build Status

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.