Skip to content

krant/simdjson_erlang

This branch is 3 commits ahead of ChomperT/simdjson_erlang:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c5f12fd · Sep 20, 2022

History

15 Commits
Sep 20, 2022
Oct 4, 2020
Sep 7, 2020
Sep 7, 2020
Sep 7, 2020

Repository files navigation

simdjson

This is an erlang bindings from simdjson

Build

$ rebar3 compile

Normal Mode

2> simdjson:decode("[1,2,3,4,5]").
[1,2,3,4,5]

3> simdjson:decode("{\"a\": 1, \"b\": 2}").
#{<<"a">> => 1,<<"b">> => 2}

Lazy Mode

1>  Id = simdjson:lazy_decode("{\"a\": 1, \"b\": 2, \"c\": {\"a\": 1, \"b\": 2, \"c\": [1,2,3,4,5]}}").
2129395095
2> simdjson:at(Id, "a").
1
3> simdjson:at(Id, "c").
#{<<"a">> => 1,<<"b">> => 2,<<"c">> => [1,2,3,4,5]}
4> simdjson:at(Id, "c/b").
2
5> simdjson:at(Id, "c/c").
[1,2,3,4,5]
6> simdjson:at(Id, "c/c/0").
1
7> simdjson:at(Id, "c/c/4").
5
8> simdjson:erase(Id).  %remove this lazy document;
ok
9> simdjson:erase_all(). % or remove all lazy document;
ok

About

simdjson bindings for erlang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.8%
  • Other 0.2%