@@ -413,6 +413,11 @@ class document::element : protected internal::tape_ref {
413413 really_inline bool is_number () const noexcept ;
414414 /* * Whether this is a JSON integer (e.g. 1 or -1, but *not* 1.0 or 1e2) */
415415 really_inline bool is_integer () const noexcept ;
416+ /* * Whether this is a JSON integer in [9223372036854775808, 18446744073709551616)
417+ * that is, a value too large for a signed 64-bit integer, but that still fits
418+ * in a 64-bit word. Note that is_integer() is true when is_unsigned_integer()
419+ * is true.*/
420+ really_inline bool is_unsigned_integer () const noexcept ;
416421 /* * Whether this is a JSON number but not an integer */
417422 really_inline bool is_float () const noexcept ;
418423 /* * Whether this is a JSON string (e.g. "abc") */
@@ -889,17 +894,33 @@ class document::object : protected internal::tape_ref {
889894 /* *
890895 * Get the value associated with the given key.
891896 *
892- * Note: The key will be matched against **unescaped** JSON:
893- *
894- * document::parser parser;
895- * parser.parse(R"({ "a\n": 1 })")["a\n"].as_uint64_t().value == 1
896- * parser.parse(R"({ "a\n": 1 })")["a\\n"].as_uint64_t().error == NO_SUCH_FIELD
897+ * Note: The key will be matched against **unescaped** JSON.
897898 *
898899 * @return The value associated with this field, or:
899900 * - NO_SUCH_FIELD if the field does not exist in the object
900901 */
901902 inline element_result at_key (const char *s) const noexcept ;
902903
904+ /* *
905+ * Get the value associated with the given key, the provided key is
906+ * considered to have length characters.
907+ *
908+ * Note: The key will be matched against **unescaped** JSON.
909+ *
910+ * @return The value associated with this field, or:
911+ * - NO_SUCH_FIELD if the field does not exist in the object
912+ */
913+ inline element_result at_key (const char *s, size_t length) const noexcept ;
914+ /* *
915+ * Get the value associated with the given key in a case-insensitive manner.
916+ *
917+ * Note: The key will be matched against **unescaped** JSON.
918+ *
919+ * @return The value associated with this field, or:
920+ * - NO_SUCH_FIELD if the field does not exist in the object
921+ */
922+ inline element_result at_key_case_insensitive (const char *s) const noexcept ;
923+
903924private:
904925 really_inline object (const document *_doc, size_t _json_index) noexcept ;
905926 friend class document ::element;
0 commit comments