binary, json and xml representation methods