From 2cbc591c9df271c86d38190261dee4faee9f18a2 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 17 Jun 2020 16:17:17 -0400 Subject: [PATCH] Fixing issue 678 --- include/simdjson/dom/object.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/simdjson/dom/object.h b/include/simdjson/dom/object.h index 332183bc6..03f3aaa9b 100644 --- a/include/simdjson/dom/object.h +++ b/include/simdjson/dom/object.h @@ -101,6 +101,8 @@ public: * parser.parse(R"({ "a\n": 1 })")["a\n"].get().value == 1 * parser.parse(R"({ "a\n": 1 })")["a\\n"].get().error == NO_SUCH_FIELD * + * This function has linear-time complexity: the keys are checked one by one. + * * @return The value associated with this field, or: * - NO_SUCH_FIELD if the field does not exist in the object * - INCORRECT_TYPE if this is not an object @@ -116,6 +118,8 @@ public: * parser.parse(R"({ "a\n": 1 })")["a\n"].get().value == 1 * parser.parse(R"({ "a\n": 1 })")["a\\n"].get().error == NO_SUCH_FIELD * + * This function has linear-time complexity: the keys are checked one by one. + * * @return The value associated with this field, or: * - NO_SUCH_FIELD if the field does not exist in the object * - INCORRECT_TYPE if this is not an object @@ -147,6 +151,8 @@ public: * parser.parse(R"({ "a\n": 1 })")["a\n"].get().value == 1 * parser.parse(R"({ "a\n": 1 })")["a\\n"].get().error == NO_SUCH_FIELD * + * This function has linear-time complexity: the keys are checked one by one. + * * @return The value associated with this field, or: * - NO_SUCH_FIELD if the field does not exist in the object */ @@ -158,6 +164,8 @@ public: * * Note: The key will be matched against **unescaped** JSON. * + * This function has linear-time complexity: the keys are checked one by one. + * * @return The value associated with this field, or: * - NO_SUCH_FIELD if the field does not exist in the object */