digitalmars.D - GSOC2025: Json Library for D, weekly update #5
- Gaofei Qiu (21/21) Jul 21 Clean up the codes of static array desirialization.
Clean up the codes of static array desirialization.
The codes of dynamic array still need revisions, because the
current code is deserializing to an appender, not deserializing
to the array.
```d
size_t elementCount = 0;
while(true) {
// Add a default element to the array so we can
deserialize into it
app ~= typeof(item[0]).init;
// Create a temporary array that includes this new element
auto tempArray = app.data;
policy.onArrayElement(tokenizer, tempArray, elementCount,
context);
// Update our appender with the modified last element
app.data[elementCount] = tempArray[elementCount];
elementCount++;
//get the next token
}
```
(https://github.com/schveiguy/jsoniopipe/pull/43)
Jul 21








Gaofei Qiu <qiugaofei53391 gmail.com>