Add an insert overload function (#1110)

This commit is contained in:
Chen
2019-12-03 09:13:42 +08:00
committed by GitHub
parent 9e0d70aa66
commit a0bd9adfef
3 changed files with 9 additions and 4 deletions

View File

@@ -445,8 +445,10 @@ public:
/// Equivalent to jsonvalue[jsonvalue.size()] = value;
Value& append(const Value& value);
Value& append(Value&& value);
/// \brief Insert value in array at specific index
bool insert(ArrayIndex index, Value newValue);
bool insert(ArrayIndex index, const Value& newValue);
bool insert(ArrayIndex index, Value&& newValue);
/// Access an object value by name, create a null member if it does not exist.
/// \note Because of our implementation, keys are limited to 2^30 -1 chars.