From a95388b02bc2674af7a28d5057b12fa9881b1ead Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 22 Jun 2018 14:09:23 +1000 Subject: [PATCH] json-schema: print the validated schema The validation process may modify the supplied JSON and it's useful for debugging purposes to visualise any defaulted values. --- tools/json-schema.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/json-schema.cpp b/tools/json-schema.cpp index 6e19fe9e..4d06dddc 100644 --- a/tools/json-schema.cpp +++ b/tools/json-schema.cpp @@ -54,6 +54,8 @@ main (int argc, char **argv) { auto input = json::tree::parse (util::view{input_src} .cast()); json::schema::validate (*input, schema->as_object ()); + + std::cout << *input << '\n'; } catch (const json::error &e) { std::cerr << "error: " << e.what () << '\n'; return EXIT_FAILURE;