parsing logic for profile.json