look into what "type" is and see if we should json encode it