Changed json parse logic