handle conversion to and from json in body manipulation