Since #199, json_to_value converts every JSON number via n.to_string() plus a char scan, allocating a String per number even for plain integers. Before #199 common integers decoded allocation-free via as_i64().
Suggested direction
Try n.as_i64() first (this works under arbitrary_precision) and fall back to the string representation only for floats and integers that overflow i64.
🤖
Since #199,
json_to_valueconverts every JSON number vian.to_string()plus a char scan, allocating aStringper number even for plain integers. Before #199 common integers decoded allocation-free viaas_i64().Suggested direction
Try
n.as_i64()first (this works underarbitrary_precision) and fall back to the string representation only for floats and integers that overflowi64.🤖