fixed json parsing to work with yail