This commit is contained in:
nlohmann committed 2026-11-09 18:59:22 +00:00
1 parent cf8df97ba7
commit eeea067a72
566 files changed
+15370 -2688

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ bool operator==(const BasicJsonType& lhs, const basic_json_view& rhs);
1. Compares two views for equality: whether the values [`BasicJsonType::parse()`](https://json.nlohmann.me/api/basic_json/parse/index.md) would produce for `lhs` and `rhs` are equal, according to `BasicJsonType`'s [`operator==`](https://json.nlohmann.me/api/basic_json/operator_eq/index.md).
1. Compares a view and a `BasicJsonType` value for equality, in either order: whether the value `parse()` would produce for the view and the other operand are equal, according to `BasicJsonType`'s [`operator==`](https://json.nlohmann.me/api/basic_json/operator_eq/index.md).
Neither overload builds a `BasicJsonType` value for a view to do the comparison (see [Notes](#notes) below). Numbers compare by value across their types (`1 == 1.0`), and an object compares by its members, with duplicate keys resolved exactly as `parse()` resolves them — the last value, at the position of the first occurrence of the key. This is not what [`operator[]`](https://json.nlohmann.me/api/basic_json_view/operator%5B%5D/index.md) and the other lookups return for a duplicate key: they find the *first* member (see [Duplicate keys](https://json.nlohmann.me/features/json_view/#duplicate-keys)).
Neither overload builds a `BasicJsonType` value for a view to do the comparison (see [Notes](#notes) below). Numbers compare by value across their types (`1 == 1.0`), and an object compares by its members, with duplicate keys resolved exactly as `parse()` resolves them — the last value, at the position of the first occurrence of the key. This is not what [`operator[]`](https://json.nlohmann.me/api/basic_json_view/operator%5B%5D/index.md) and the other lookups return for a duplicate key: they find the *first* member (see [Duplicate keys](https://json.nlohmann.me/features/json_view/differences/#duplicate-keys)).
## Parameters