Fixed JavaScript json parsing.