def _extractText(self, format):
val = _fitz.TextPage__extractText(self, format)<EOL>if format != <NUM_LIT:2>:<EOL><INDENT>return val<EOL><DEDENT>import base64, json<EOL>class b64encode(json.JSONEncoder):<EOL><INDENT>def default(self,s):<EOL><INDENT>if not fitz_py2 and type(s) is bytes:<EOL><INDENT>return base64.b64encode(s).decode()<EOL><DEDENT>if type(s) is bytearray:<EOL><INDENT>if fitz_py2:<EOL><INDENT>return base64.b64encode(s)<EOL><DEDENT>else:<EOL><INDENT>return base64.b64encode(s).decode()<EOL><DEDENT><DEDENT><DEDENT><DEDENT>val = json.dumps(val, separators=("<STR_LIT:U+002C>", "<STR_LIT::>"), cls=b64encode, indent=<NUM_LIT:1>)<EOL>return val<EOL>
_extractText(self, format) -> PyObject *