Commit Graph

318 Commits

Author SHA1 Message Date
Tristan Penman
1ea6c9b185 Implement draft 3 divisibleBy constraint based on draft 4 multipleOf constraint 2015-04-02 06:32:06 +11:00
Tristan Penman
04cebebcfd Add char* constructor to RapidJsonFrozenValue to further remove ambiguity 2015-03-23 17:37:21 +11:00
Tristan Penman
f647e75557 Make construction of frozen value from rapidjson::Value explicit to remove ambiguity 2015-03-23 17:28:45 +11:00
Tristan Penman
9cd913a5cd Update RapidJsonAdapter to be compatible with both embedded and latest versions of RapidJSON 2015-03-23 17:01:10 +11:00
Tristan Penman
d538c698c9 Update Doxygen configuration to include README and fix misplaced @deprecated tag 2015-03-23 14:28:19 +11:00
Tristan Penman
88d9edc136 Remove invalid @todos 2015-03-22 22:31:22 +11:00
Tristan Penman
2f332e4223 Use remainder from cmath instead of numeric (which is only defined for C++11) 2015-03-22 22:23:39 +11:00
Tristan Penman
b377609efa Implement multipleOf constraint using std::remainder 2015-03-22 22:10:19 +11:00
Tristan Penman
7a6d22ebeb Suppress warning about implicit unsigned long to int conversion in boost::property_tree 2015-03-17 13:17:23 +11:00
Richard Clamp
ae4127d530 Fixup for compilation on boost 1.57
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.
2015-02-04 13:00:32 +00:00
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
Tristan Penman
467368d022 Improve contexts for error reporting, and fix unicode bug. 2014-06-15 22:09:38 +10:00
Tristan Penman
031ca48079 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
Tristan Penman
f604f11ada Fix memory corruption issue in schema parser. 2014-04-17 23:06:48 +00:00
Tristan Penman
11af5466f0 Fix Ubuntu 12.04 build issues. 2014-04-17 21:31:18 +00:00
Tristan Penman
68d0ebf866 Update gtest to version 1.7.0 and fix xcode build errors. 2014-04-17 10:58:06 +10:00
Tristan Penman
5b29f915a1 Cleanup whitespace. 2014-03-01 09:03:39 +11:00
Tristan Penman
4c9864de73 Initial commit.
This commit contains the third major design of a C++ library for JSON Schema validation.

It is definitely not what I would consider production-ready, but I do think that the overall design of the library is robust.
2013-10-30 07:51:11 +11:00