calling encode_json() on an object will end up calling it's dump() method.