MCPcopy Create free account

hub / github.com/simplejson/simplejson / functions

Functions472 in github.com/simplejson/simplejson

↓ 234 callersMethoddumps
(self, obj, **kw)
simplejson/tests/test_decimal.py:10
↓ 135 callersMethodloads
(self, s, **kw)
simplejson/tests/test_decimal.py:17
↓ 45 callersFunctionb
(s)
simplejson/compat.py:7
↓ 43 callersFunctionraise_errmsg
Use JSONDecodeError exception to raise a nice looking ValueError subclass */
simplejson/_speedups.c:1226
↓ 33 callersMethodencode
Return a JSON string representation of a Python data structure. >>> from simplejson import JSONEncoder >>> JSONEncoder().encode({"foo
simplejson/encoder.py:292
↓ 21 callersFunctionJSON_Accu_Accumulate
simplejson/_speedups.c:561
↓ 19 callersFunctionget_speedups_state
simplejson/_speedups.c:170
↓ 16 callersMethod_assert_no_leak
Run `func` in two measurement phases and verify the second phase's refcount delta stays near zero. A real per-call leak (1 ref per ca
simplejson/tests/test_speedups.py:155
↓ 10 callersMethodassertRoundTrip
(self, obj, other, for_json=True)
simplejson/tests/test_for_json.py:31
↓ 10 callersMethoddecode
(self, encoding=None)
simplejson/tests/test_dump.py:11
↓ 10 callersFunctionencoder_accumulate_newline_indent
Write '\n' followed by indent_level copies of s->indent directly to * the accumulator, without materializing the combined string as an * intermediat
simplejson/_speedups.c:3172
↓ 7 callersFunctionencoder_listencode_obj
simplejson/_speedups.c:3041
↓ 7 callersMethodfor_json
(self)
simplejson/tests/test_for_json.py:6
↓ 6 callersFunctionIS_DIGIT
simplejson/_speedups.c:697
↓ 6 callersFunction_steal_accumulate
simplejson/_speedups.c:2858
↓ 6 callersFunctioncall_method
(obj, method_name)
simplejson/encoder.py:470
↓ 6 callersMethoddecode
(self, encoding=None)
simplejson/tests/test_decode.py:11
↓ 6 callersFunctiondumps
Serialize ``obj`` to a JSON formatted ``str``. If ``skipkeys`` is true then ``dict`` keys that are not basic types (``str``, ``int``, ``long`
simplejson/__init__.py:277
↓ 6 callersFunctionencoder_annotate_exception
Attach a PEP 678 note formatted via PyUnicode_FromFormatV to the in- * flight exception. Mirrors the pure-Python encoder's * `except BaseException a
simplejson/_speedups.c:3205
↓ 6 callersFunctionrun_scenario
Run a scenario in a forked child so a SEGV can't kill the parent.
tsan_stress_simplejson.py:217
↓ 5 callersFunction_iterencode
(o, _current_indent_level)
simplejson/encoder.py:707
↓ 5 callersFunction_iterencode_list
(lst, _current_indent_level)
simplejson/encoder.py:497
↓ 5 callersMethoditerencode
Encode the given object and yield each string representation as available. For example:: for chunk in JSONEncoder().iter
simplejson/encoder.py:321
↓ 4 callersMethod__str__
(self)
simplejson/tests/test_dump.py:7
↓ 4 callersMethod_asdict
(self)
simplejson/tests/test_namedtuple.py:19
↓ 4 callersFunction_iterencode_dict
(dct, _current_indent_level)
simplejson/encoder.py:607
↓ 4 callersFunction_make_shared_encoder
()
tsan_stress_simplejson.py:148
↓ 4 callersMethod_run_in_subinterp
Helper to run code in a fresh subinterpreter.
simplejson/tests/test_subinterpreters.py:19
↓ 4 callersMethod_run_threads
(self, worker)
simplejson/tests/test_free_threading.py:22
↓ 4 callersMethodclear
(self)
simplejson/ordered_dict.py:19
↓ 4 callersFunctionlinecol
(doc, pos)
simplejson/errors.py:6
↓ 4 callersMethodraw_decode
Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning with a JSON document) and return a 2-tuple of the Python represe
simplejson/decoder.py:402
↓ 3 callersFunction_encode_int
(value)
simplejson/encoder.py:479
↓ 3 callersFunction_encoded_const
simplejson/_speedups.c:2766
↓ 3 callersFunction_env_int
(name, default)
tsan_stress_simplejson.py:63
↓ 3 callersFunction_parse_constant
simplejson/_speedups.c:2200
↓ 3 callersFunctionascii_escape_char
simplejson/_speedups.c:787
↓ 3 callersFunctionascii_escape_unicode
simplejson/_speedups.c:862
↓ 3 callersMethoddecode
Return the Python representation of ``s`` (a ``str`` or ``unicode`` instance containing a JSON document)
simplejson/decoder.py:389
↓ 3 callersFunctionencoder_encode_string
simplejson/_speedups.c:2833
↓ 3 callersFunctionencoder_markers_pop
Counterpart to encoder_markers_push. Removes the ident entry from * s->markers and drops the caller's reference. Passing NULL is a no-op * so caller
simplejson/_speedups.c:2907
↓ 3 callersFunctionencoder_markers_push
Push a reference to `obj` into the encoder's circular-reference marker * dict, keyed by the object's address. Allocates a fresh PyLong ident and * s
simplejson/_speedups.c:2875
↓ 3 callersFunctionopen_temp_file
()
simplejson/tests/test_tool.py:13
↓ 3 callersMethodrunTool
(self, args=None, data=None)
simplejson/tests/test_tool.py:49
↓ 2 callersFunctionJSON_ParseEncoding
simplejson/_speedups.c:2352
↓ 2 callersFunction_build_rval_index_tuple
simplejson/_speedups.c:388
↓ 2 callersFunction_call_json_method
simplejson/_speedups.c:753
↓ 2 callersFunction_is_tsan_build
()
tsan_stress_simplejson.py:79
↓ 2 callersFunction_stringify_key
(key)
simplejson/encoder.py:580
↓ 2 callersMethod_test_encode_basestring_ascii
(self, encode_basestring_ascii)
simplejson/tests/test_encode_basestring_ascii.py:34
↓ 2 callersMethod_test_scanstring
(self, scanstring)
simplejson/tests/test_scanstring.py:27
↓ 2 callersFunctionascii_char_size
Only needed by the two-pass ascii_escape_unicode (pre-3.14) and * ascii_escape_str (Python 2). The PyUnicodeWriter path on 3.14+ * computes sizes im
simplejson/_speedups.c:835
↓ 2 callersMethodcheck_keys_reuse
(self, source, loads)
simplejson/tests/test_decode.py:61
↓ 2 callersFunctionencoder_encode_dict_key
Stringify and encode a dict key to its JSON representation, using the * key_memo cache for string keys. Returns a new reference to the encoded * ke
simplejson/_speedups.c:3107
↓ 2 callersFunctionencoder_encode_float
simplejson/_speedups.c:2788
↓ 2 callersFunctionencoder_listencode_dict
simplejson/_speedups.c:3245
↓ 2 callersFunctionencoder_listencode_list
simplejson/_speedups.c:3414
↓ 2 callersFunctionencoder_long_to_str
Stringify an int/long to its JSON decimal form. For int/long subclasses * we first normalize through PyLong_Type so custom __str__ / __repr__ * over
simplejson/_speedups.c:738
↓ 2 callersFunctionencoder_sort_items_inplace
Call list.sort(**item_sort_kw) on `lst`. Returns 0 on success, * -1 on error. Factored out so the fast and slow paths of * encoder_dict_iteritems sh
simplejson/_speedups.c:1080
↓ 2 callersFunctionencoder_steal_encode
Helper for the for_json / _asdict paths in encoder_listencode_obj. * Steals the reference to `newobj` (returned by _call_json_method), * handles rec
simplejson/_speedups.c:2929
↓ 2 callersFunctionencoder_stringify_key
simplejson/_speedups.c:1028
↓ 2 callersFunctionescape_char_noascii
Only needed by the two-pass escape_unicode_noascii (pre-3.14 and * Python 2). The PyUnicodeWriter path on 3.14+ writes escapes inline. */
simplejson/_speedups.c:1951
↓ 2 callersFunctionescape_unicode_noascii
simplejson/_speedups.c:1995
↓ 2 callersFunctionflush_accumulator
simplejson/_speedups.c:611
↓ 2 callersFunctionget_suite
()
simplejson/tests/__init__.py:57
↓ 2 callersFunctionimport_dependency
simplejson/_speedups.c:3988
↓ 2 callersFunctioninit_speedups_state
Shared initializer for per-module state. Called from module_exec on Python 3 and from init_speedups on Python 2. Assumes the type fields in stat
simplejson/_speedups.c:3756
↓ 2 callersFunctionis_json_string_key
True iff `key` is a Python string type that can be used verbatim * as a JSON object key (PyUnicode on all versions, PyString also on * Python 2). */
simplejson/_speedups.c:1100
↓ 2 callersFunctionjoin_list_string
simplejson/_speedups.c:1247
↓ 2 callersFunctionjoin_list_unicode
simplejson/_speedups.c:1238
↓ 2 callersFunctionloads
Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON document) to a Python object. *encoding* determines the encoding used
simplejson/__init__.py:461
↓ 2 callersFunctionreset_speedups_state_constants
Clear every state field that init_speedups_state may populate. * Called at the start of init_speedups_state so that re-initialization * (e.g. import
simplejson/_speedups.c:3721
↓ 2 callersFunctionrun_setup
(with_binary)
setup.py:86
↓ 2 callersFunctionscan_once
(string, idx)
simplejson/scanner.py:74
↓ 1 callersFunctionJSON_Accu_Destroy
simplejson/_speedups.c:588
↓ 1 callersFunctionJSON_Accu_FinishAsList
simplejson/_speedups.c:569
↓ 1 callersFunctionJSON_Accu_Init
simplejson/_speedups.c:552
↓ 1 callersFunction_env_float
(name, default)
tsan_stress_simplejson.py:71
↓ 1 callersFunction_floatconstants
()
simplejson/decoder.py:24
↓ 1 callersFunction_import_OrderedDict
()
simplejson/__init__.py:137
↓ 1 callersFunction_import_c_make_encoder
()
simplejson/__init__.py:146
↓ 1 callersFunction_import_c_make_scanner
()
simplejson/scanner.py:6
↓ 1 callersFunction_import_c_scanstring
()
simplejson/decoder.py:10
↓ 1 callersFunction_import_speedups
()
simplejson/encoder.py:14
↓ 1 callersFunction_make_distinct_object
(i)
tsan_stress_simplejson.py:189
↓ 1 callersFunction_make_iterencode
(markers, _default, _encoder, _indent, _floatstr, _key_separator, _item_separator, _sort_keys, _skipke
simplejson/encoder.py:436
↓ 1 callersFunction_make_shared_scanner
()
tsan_stress_simplejson.py:144
↓ 1 callersFunction_run_scenario_threads
(target_fns, thread_counts=None)
tsan_stress_simplejson.py:263
↓ 1 callersFunction_scan_once
(string, idx)
simplejson/scanner.py:36
↓ 1 callersFunctionadditional_tests
(suite=None, project_dir=None)
simplejson/tests/__init__.py:37
↓ 1 callersFunctionall_tests_suite
(project_dir=None)
simplejson/tests/__init__.py:56
↓ 1 callersFunctionas_text_type
(s)
simplejson/tests/test_dump.py:18
↓ 1 callersFunctionascii_escape_str
simplejson/_speedups.c:958
↓ 1 callersMethodcopy
(self)
simplejson/ordered_dict.py:86
↓ 1 callersFunctionencoder_clear
simplejson/_speedups.c:3615
↓ 1 callersFunctionencoder_dict_iteritems
simplejson/_speedups.c:1110
↓ 1 callersFunctionencoder_listencode_default
Fallback encoder path used when obj is not one of the directly- * supported JSON types (const, string, int, float, list, dict, * Decimal, etc.) and
simplejson/_speedups.c:2967
↓ 1 callersFunctionerrmsg
(msg, doc, pos, end=None)
simplejson/errors.py:15
↓ 1 callersFunctionescape_char_noascii_size
simplejson/_speedups.c:1979
↓ 1 callersFunctionhas_speedups
()
simplejson/tests/_helpers.py:7
next →1–100 of 472, ranked by callers