Patrick Boettcher
57f7809532
tests: add draft4-tests from json-schema-test-suite to this repo
2018-04-18 11:49:36 +02:00
Patrick Boettcher
7daba70db3
cmake: use relative path to source-file
...
If this project is used via `add_subdirectory()` the
json-schema-test.cpp was not found.
2018-04-17 23:11:10 +02:00
Patrick Boettcher
c552c7c02a
tests: add some issue-regression-tests
2018-03-30 12:26:52 +02:00
Patrick Boettcher
a5521b4b02
numbers: do not use (unsigned) int for numbers but always double
...
fixes #27
2018-03-30 11:25:44 +02:00
Patrick Boettcher
5f199477d4
Fix #22 : update undefined-schema set after child-schema-insertation
...
It can well be that a child schema is including a grand-child-schema which
is considered undefined by a parent schema. Before this fix, this failed
because when the parent schema tried to insert the child-child-schema as
child-schema it was already present. Now this is fixed by updating
the undefined references after each schema insertion.
2018-03-07 19:30:54 +01:00
Ian Bell
7e8737e85d
Fix preprocessor branches for dllimport
2018-03-01 13:28:22 +01:00
Patrick Boettcher
2a1f77d084
cmake: allow the building of shared or static libraries
...
Alternative for #15
2018-02-27 11:19:06 +01:00
Patrick Boettcher
6f69d01b58
use #include <nlohmann/json.hpp> to avoid filename clashes
...
alternative for #20
2018-02-27 11:11:55 +01:00
Ian Bell
95e07469ae
Add a runnable and useful exampe
2018-02-24 09:33:05 +01:00
Patrick Boettcher
ad9e9923ab
fix message if value is too low (minimum)
...
A value is rather "below" a minimum than "exceeding" it
2018-02-09 10:25:08 +01:00
Patrick Boettcher
0d50c716b6
deprecated: fix deprecated warning
2018-01-19 09:48:09 +01:00
Patrick Boettcher
990855cded
cmake: make NLOHMANN_JSON_DIR a cache-variable for visibility
2018-01-19 09:39:33 +01:00
Patrick Boettcher
b1b5cb891c
comment: fix comment regarding gcc 4.8/4.9
2018-01-19 09:39:07 +01:00
Patrick Boettcher
dda72a0023
compatibility: now it works with 3.x-release of nlohmann::json
...
The name conflict of json_pointer was fixed by renaming the one
from here to local_json_pointer. Ugly, but better fixes take time.
2018-01-19 09:38:50 +01:00
Ryan Ham
378105024e
Change error message for "minItems".
...
The error message for "minItems" was the same as "maxItems". Change it to use the same verbiage as "minProperties".
2017-11-21 08:05:55 +01:00
Patrick Boettcher
81c8bc2190
include "iostream" in programs
2017-08-08 15:51:16 +02:00
Patrick Boettcher
bea8b399d0
cli: print stdin-offset when parsing (or validating) fails
2017-08-08 15:36:59 +02:00
Patrick Boettcher
a3a4cd2d56
schema-test: simplify filename resolution of test-suite
2017-08-08 15:36:59 +02:00
Patrick Boettcher
322d2751de
cmake: better handling of how to find json.hpp
2017-08-08 15:36:59 +02:00
Gert Van Hoey
42b32c500c
Build as shared library on Windows using Visual Studio compiler ( #10 )
...
* Build on Windows using Visual Studio and export symbols from DLL
* Fix two warnings on raised by Visual Studio 2015 compiler + disable -Wall and -Wextra when using Visual Studio compiler
* Fix indentation (TAB instead of spaces)
2017-08-07 13:35:35 +02:00
Antoine Havron
0de3d164d7
C++11 argument added in CmakeLists.txt
2017-04-11 08:16:30 +02:00
Patrick Boettcher
e327885992
cmake: if GCC-version is less than 4.9 print a status not a warning
2017-03-08 22:46:48 +01:00
Patrick Boettcher
dd2d95cf0a
gcc-4.8: if less than 4.9 use boost::regex, if detected
2017-03-06 10:44:20 +01:00
Patrick Boettcher
46bafd05b8
regex: on gcc < 4.9 do not use std::regex
...
This makes that patternProperties always succeed now if gcc < 4.9
2017-02-18 13:05:45 +01:00
Patrick Boettcher
3de9c6c0b7
cmake: build a shared library
2017-02-18 13:04:29 +01:00
Patrick Boettcher
a013354bc6
cmake: only install json-schema.hpp if not a subdir
...
(install rule needs more work, however)
2017-02-18 08:15:43 +01:00
Patrick Boettcher
d957c9f667
compiler-warnings: use size_t as explicit type for comparisons with size_t
2017-02-01 23:41:09 +01:00
ronen barzel
e666f9f7ba
add const to validate() parameter
...
…and propogate it everywhere
2017-02-01 11:39:39 +01:00
ronen barzel
64ca27518e
Accept integer as a number in a list of types
2017-02-01 11:37:23 +01:00
ronen barzel
a071c8bdc6
use bool rather than json(bool) to avoid compiler ambiguity errors
...
the second value of the tuple returned by std::set.insert() is a native bool, not a json(bool).
2017-02-01 11:36:20 +01:00
ronen barzel
6cacbf197e
use explicit json.get<type>() to avoid compiler ambiguity errors
2017-02-01 11:36:20 +01:00
Patrick Boettcher
d0781a8a45
be clearer on type-validation-errors
2017-01-27 10:39:24 +01:00
Patrick Boettcher
881be19ca7
validator: use url for undefined-references
...
Instead of url + path. The was leading to a
schema-already-loaded-bug before
2017-01-27 10:08:20 +01:00
Patrick Boettcher
781fd1cebb
app: be more precise for error messages
2017-01-27 10:08:20 +01:00
Patrick Boettcher
280fea2560
style: update some comments and indentation
2017-01-27 10:08:20 +01:00
Patrick Boettcher
6680e9d8f8
comment: add some explaining comments wrt to the refernce-creation
2017-01-17 23:23:29 +01:00
JustCameToHelp
ee3de923f9
Documentation - Fixed file name in Code section
...
The .hpp file name is `json-schema.hpp`
2017-01-17 17:08:20 +01:00
Patrick Boettcher
c78ca226a8
code cleanup and comment for a FIXME
2017-01-12 16:18:40 +01:00
Patrick Boettcher
ec4d260f9c
type-validation: better error message when type-check has failed
2017-01-12 16:18:40 +01:00
Patrick Boettcher
8971651d2d
namespace: gcc-4.5 does not accept multiple namespaces-definitions
2017-01-10 11:03:04 +01:00
Patrick Boettcher
0212887677
compiler-quirk: false is interpreted as nullptr with gcc 4.5
2017-01-10 11:02:21 +01:00
Patrick Boettcher
0e5a5d9b56
validator: check utf-8 string-length
2016-12-29 08:50:06 +01:00
Patrick Boettcher
ce68fba2d3
error-messages: fixed typo
2016-12-29 07:58:47 +01:00
Patrick Boettcher
4c184bed77
validator: add error-messages of sub-schemas in combined-logic-checker
2016-12-28 16:46:03 +01:00
Patrick Boettcher
8b69330804
app: add a default format-checker - which is always happy
2016-12-28 16:46:03 +01:00
Patrick Boettcher
d50401a562
validator: print limits of min/max-values in error messages
2016-12-28 16:46:03 +01:00
Patrick Boettcher
4f874d317a
license: license-filename changed
2016-12-28 16:08:41 +01:00
Patrick Boettcher
fd300592c7
README: update compliance-section
2016-12-28 13:50:55 +01:00
Patrick Boettcher
2ee354a43d
test: format regex for new optional test (doens't work)
2016-12-28 13:48:22 +01:00
Patrick Boettcher
202700ada0
code: fix indentation
2016-12-28 13:47:59 +01:00