Fixes#598
* fix: parsed json with extra tokens issue
* Added unit test for json.ts
* fix the json unit test running issue
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update the code with code review suggestion
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>