Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Add ser_json_inf_nan='strings' mode to produce valid JSON

#1307Merged
Comparing
d8e-ai:float-strings
(
0205028
) with
main
(
fd26293
)
CodSpeed Performance Gauge
0%
Untouched
155

Benchmarks

155 total
test_decimal_from_string_limit
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+6%
19 µs18 µs
test_validate_literal[python-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
15.2 µs14.7 µs
test_validate_literal[python-few_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15 µs14.7 µs
test_validate_literal[python-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.4 µs15.1 µs
test_core_string_lax
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
13.8 µs13.5 µs
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
31.1 µs30.6 µs
test_core_string_strict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
13.8 µs13.6 µs
test_validate_literal[python-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.7 µs14.5 µs
test_validate_literal[python-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.9 µs16.7 µs
test_enum_int_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.5 µs15.3 µs
test_validate_literal[python-few_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.7 µs14.5 µs
test_int_range
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.8 µs14.6 µs
test_validate_literal[python-few_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.8 µs14.6 µs
test_enum_str_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.1 µs14.9 µs
test_chain_list
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
25.7 µs25.4 µs
test_tuple_many_variable
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.2 µs19 µs
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.3 µs19.1 µs
test_small_class_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.4 µs19.2 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.8 µs14.6 µs
test_smart_union_coerce_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
17.4 µs17.2 µs
test_strict_int
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.7 µs13.5 µs
test_positional_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.5 µs19.3 µs
test_model_instance_abc
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
32.7 µs32.3 µs
test_isinstance_string_strict_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.8 µs13.7 µs
test_chain_two_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
28.8 µs28.5 µs

Commits

Click on a commit to change the comparison range
Base
main
fd26293
+0.23%
Add ser_json_inf_nan='strings' mode to produce valid JSON
0205028
2 years ago
by josh-newman
© 2026 CodSpeed Technology
Home Terms Privacy Docs