MCPcopy Index your code
hub / github.com/httprunner/httprunner / __init__

Method __init__

httprunner/thrift/data_convertor.py:258–284  ·  view source on GitHub ↗
(
        self,
        skipkeys=False,
        ensure_ascii=True,
        check_circular=True,
        allow_nan=True,
        indent=None,
        separators=None,
        encoding="utf-8",
        default=None,
        sort_keys=False,
        **kw
    )

Source from the content-addressed store, hash-verified

256
257class MyJSONEncoder(json.JSONEncoder):
258 def __init__(
259 self,
260 skipkeys=False,
261 ensure_ascii=True,
262 check_circular=True,
263 allow_nan=True,
264 indent=None,
265 separators=None,
266 encoding="utf-8",
267 default=None,
268 sort_keys=False,
269 **kw
270 ):
271 super(MyJSONEncoder, self).__init__(
272 skipkeys=skipkeys,
273 ensure_ascii=ensure_ascii,
274 check_circular=check_circular,
275 allow_nan=allow_nan,
276 indent=indent,
277 separators=separators,
278 encoding=encoding,
279 default=default,
280 sort_keys=sort_keys,
281 )
282 self.skip_nonutf8_value = kw.get(
283 "skip_nonutf8_value", False
284 ) # 默认不skip忽略非utf-8编码的字段
285
286 def encode(self, o):
287 """Return a JSON string representation of a Python data structure.

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected