mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 09:40:12 +01:00
ircd::json: Commentary on array.
This commit is contained in:
parent
e567293dde
commit
7bfaa5ec08
1 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,15 @@
|
|||
namespace ircd {
|
||||
namespace json {
|
||||
|
||||
// ircd::json::array is the rank1 analog to ircd::json::object. It accepts
|
||||
// queries with numerical indexing. The same parsing approach is used in
|
||||
// ircd::json::object and that is important to note here: iterating this array
|
||||
// by incrementing your own numerical index and making calls into this object
|
||||
// is NOT efficient. Simply put, do not do something like
|
||||
// `for(int x=0;x<array.count();x++) array.at(x)` as that will parse the array
|
||||
// from the beginning on every single iteration. Instead, use the provided
|
||||
// iterator object.
|
||||
//
|
||||
struct array
|
||||
:string_view
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue