managing json_data when it is not a dictionary