From 046f6da82f6e1d439b049f97ed4cb7cc5e0bf989 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Wed, 18 Jan 2017 11:43:14 -0800 Subject: [PATCH] Fix documentation error Move comparison before "j.clear()" function call, such that the intended return value "true" is actually correct. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6182a2df..902cdaad 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,9 @@ const std::string tmp = j[0]; j[1] = 42; bool foo = j.at(2); +// comparison +j == "[\"foo\", 1, true]"_json; // true + // other stuff j.size(); // 3 entries j.empty(); // false @@ -277,9 +280,6 @@ j.is_object(); j.is_array(); j.is_string(); -// comparison -j == "[\"foo\", 1, true]"_json; // true - // create an object json o; o["foo"] = 23;