Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
All of the usability methods for document reading are on the document::view class. However, as a usability improvement, it would be nice to provide operator[] on the document::value class, which would delegate the real work to document::view under the hood:
auto doc = make_document(kvp("a", 1)); |
|
|
// currently
|
auto a = doc.view()["a"].get_value(); |
|
|
// also currently
|
auto doc_view = doc.view();
|
auto a = doc_view["a"].get_value(); |
|
|
// proposed
|
auto a = doc["a"].get_value(); |