百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jiter

> 编程语言
开源

快速移动 JSON 剖析器.

538 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

快速移动 JSON 剖析器.

jiter

Fast iterable JSON parser.

Documentation is available at docs.rs/jiter.

jiter has three interfaces:

  • JsonValue an enum representing JSON data
  • Jiter an iterator over JSON data
  • PythonParse which parses a JSON string into a Python object

JsonValue Example

See the JsonValue docs for more details.

rust
use jiter::JsonValue;

let json_data = r#"
    {
        "name": "John Doe",
        "age": 43,
        "phones": [
            "+44 1234567",
            "+44 2345678"
        ]
    }"#;
let json_value = JsonValue::parse(json_data.as_bytes(), true).unwrap();
println!("{:#?}", json_value);

returns:

Object(
    {
        "name": Str("John Doe"),
        "age": Int(43),
        "phones": Array(
            [
                Str("+44 1234567"),
                Str("+44 2345678"),
            ],
        ),
    },
)

Jiter Example

To use Jiter, you need to know what schema you're expecting:

…

Benchmarks

There are lies, damned lies and benchmarks.

In particular, serde-json benchmarks use serde_json::Value which is significantly slower than deserializing to a string.

For more details, see the benchmarks.

benchmark jiter iter jiter value serde value serde/jiter
strings
x100 8ns 9ns 40ns 4.4x
sentence 232ns 124ns 293ns 2.4x
unicode 268ns 159ns 308ns 1.9x
unicode_dense 152ns 152ns 177ns 1.2x
string_array 466ns 751ns 3.0µs 4.0x
pass2 304ns 785ns 576ns 0.7x
json_cases_strings - 14.92ms 58.85ms 3.9x
json_cases_escapes - 1.62ms 2.44ms 1.5x
json_cases_non-ascii - 715.5µs 995.3µs 1.4x
numbers
short_numbers - 10.9µs 37.6µs 3.4x
floats_array 15.2µs 19.2µs 117.2µs 6.1x
doubles_array 13.2µs 17.6µs 110.9µs 6.3x
short_floats 9.7µs 12.6µs 46.6µs 3.7x
long_significand_floats 12.1µs 13.9µs 94.7µs 6.8x
bigints_array 12.2µs 12.5µs 69.3µs 5.6x
massive_ints_array 73.2µs 77.9µs 284.9µs 3.7x
big 2.93ms 3.96ms 20.32ms 5.1x
json_cases_numbers - 7.81ms 50.42ms 6.5x
json_cases_ints - 7.82ms 50.27ms 6.4x
json_cases_floats - 3.04ms 17.68ms 5.8x
constants
true_array 194ns 477ns 1.1µs 2.3x
true_object 2.4µs 1.4µs 6.0µs 4.2x
json_cases_constants - 25.6µs 66.3µs 2.6x
documents
pass1 - 1.8µs 5.3µs 3.0x
medium_response - 2.2µs 6.8µs 3.1x
json_cases_all - 22.15ms 90.38ms 4.1x
json_cases_arrays - 10.78ms 45.96ms 4.3x
json_cases_objects - 12.98ms 53.66ms 4.1x
json_cases_deep - 4.63ms 12.83ms 2.8x
json_cases_whitespace - 6.24ms 16.58ms 2.7x
json_cases_error - 2.38ms 11.87ms 5.0x

Part of the Pydantic Stack

The Pydantic Stack is everything you need to ship production-grade AI agents:

  • Pydantic AI - Type-safe agent framework
  • Pydantic Logfire - AI-first, full-stack observability
  • Logfire AI Gateway - Unified LLM proxy

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustjsonjson-parserpydanticrust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言