awslabs / llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.
Apache License 2.0
7.73k stars 341 forks source link

Use iterative approach for json parsing #417

Closed richarddavison closed 2 weeks ago

richarddavison commented 2 weeks ago

Description of changes

Refactored the JSON parsing logic to utilize recursion rather than a non-recursive tree traversal. This new implementation is more efficient, given that the depth of a JavaScript object is typically not excessively deep, resulting in simpler and more maintainable code.

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.