From 5b6a6d0331c6985b28366f7a0cde568ce57e71b5 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher
Date: Tue, 3 Dec 2019 16:31:32 +0100
Subject: [PATCH] replace tabs with spaces in README
---
README.md | 82 +++++++++++++++++++++++++++----------------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/README.md b/README.md
index 1894af4..8b39746 100644
--- a/README.md
+++ b/README.md
@@ -148,56 +148,56 @@ static json good_person = {{"name", "Albert"}, {"age", 42}};
int main()
{
- /* json-parse the schema */
+ /* json-parse the schema */
- json_validator validator; // create validator
+ json_validator validator; // create validator
- try {
- validator.set_root_schema(person_schema); // insert root-schema
- } catch (const std::exception &e) {
- std::cerr << "Validation of schema failed, here is why: " << e.what() << "\n";
- return EXIT_FAILURE;
- }
+ try {
+ validator.set_root_schema(person_schema); // insert root-schema
+ } catch (const std::exception &e) {
+ std::cerr << "Validation of schema failed, here is why: " << e.what() << "\n";
+ return EXIT_FAILURE;
+ }
- /* json-parse the people - API of 1.0.0, default throwing error handler */
+ /* json-parse the people - API of 1.0.0, default throwing error handler */
- for (auto &person : {bad_person, good_person}) {
- std::cout << "About to validate this person:\n"
- << std::setw(2) << person << std::endl;
- try {
- validator.validate(person); // validate the document - uses the default throwing error-handler
- std::cout << "Validation succeeded\n";
- } catch (const std::exception &e) {
- std::cerr << "Validation failed, here is why: " << e.what() << "\n";
- }
- }
+ for (auto &person : {bad_person, good_person}) {
+ std::cout << "About to validate this person:\n"
+ << std::setw(2) << person << std::endl;
+ try {
+ validator.validate(person); // validate the document - uses the default throwing error-handler
+ std::cout << "Validation succeeded\n";
+ } catch (const std::exception &e) {
+ std::cerr << "Validation failed, here is why: " << e.what() << "\n";
+ }
+ }
- /* json-parse the people - with custom error handler */
- class custom_error_handler : public nlohmann::json_schema::basic_error_handler
- {
- void error(const nlohmann::json_pointer