JsonArray.Get(x, token) for x > size-1 gives nonsense error
Good day,
JsonArray.Get(3, jsontoken), where the length of jsonarray is less than 4 gives a runtime error that just says "3". If I use the return value, the error doesn't occur, but the error message is still nonsensical, since what it actually means is "out of bounds".
Also, I guess for legacy reasons jsonarray unexpectedly works different from list, since the indexing begins a 1 with lists, and 0 with jsonarray.
Hi,
Many thanks for raising this issue. Unfortunately we have not been able to get to this issue as soon as we'd have liked. Since it has been a long time since this issue was last updated, it is possible that this has been fixed by a newer release of Business Central and the AL extension for Visual Studio Code. We have thus decided to close it.
If the issue still affects you on the latest insider build of Business Central, please help us and open a new issue for us with the latest steps to reproduce the issue, and link back to this closed issue to track any comments or discussions.
Thanks,
Thaddeus