You are not logged in.
Using this sample data https://gist.github.com/wxinix/2162c9c1 … b157f1ce6c
The following code takes about 6 ms. Is that the normal speed? Any other approaches that might be faster?
FData: Variant := _JsonFast(AData);
FDataLC: PDocVariantData := DocVariantData(FData.LC);
Offline
For almost 1MB of JSON it parses 166MB/s which makes sense.
If you want to avoid a temporary copy, you could use directly TDocVariantData.InitJsonInPlace() but it will modify the AData variable in-place.
You could try the dvoJsonParseDoNotGuessCount option for perhaps slightly faster process too.
My guess is that using a record with nested types would be faster than TDocVariant because it doesn't need to store the field names.
Almost twice faster than TDocVariant from my numbers when you parse it, and instant when you use it (no field name lookup, but directly get the value per field).
Offline