update tests to not reencode but compare json instead