Parse json data before assigning to the datastruct