Skip to content
Rust bindings for the simdjson project.
Rust
Branch: master
Clone or download
Latest commit d629e0e Sep 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
simdjson-sys
src
.gitignore
.gitmodules
.travis.yml
Cargo.toml
README.md
appveyor.yml

README.md

simdjson-rust

Build Status Build status

⚠ This crate is currently updating to support simdjson 0.2.0 on dev branch.

Usage

Add this to your Cargo.toml

# In the `[dependencies]` section
simdjson-rust = {git = "https://github.com/SunDoge/simdjson-rust"}

Then, get started.

use simdjson_rust::{build_parsed_json, ParsedJsonIterator};

fn main() {
    let data = r#"
    {
        "name": "John Doe",
        "age": 43,
        "phones": [
            "+44 1234567",
            "+44 2345678"
        ]
    }"#;

    let pj = build_parsed_json(data, true);
    assert!(pj.is_valid());

    let mut pjh = pj.iterator();
    assert!(pjh.is_ok());

    assert!(pjh.down());
    assert_eq!(pjh.get_string(), "name");
    assert!(pjh.move_forward());
    assert_eq!(pjh.get_string(), "John Doe");
}

Roadmap

  • ParsedJson
  • ParsedJsonIterator
  • printjson (impl Display)
  • ci
  • tests
  • benchmark
You can’t perform that action at this time.