Skip to content

janl/erl-jsonpointer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JSON Pointer for Erlang

This is an implementation of JSON Pointer.

Usage

   Json = {[
    {<<"a">>, 1},
    {<<"b">>, {[
        {<<"c">>, 2}
    ]}},
    {<<"d">>, {[
        {<<"e">>, [
            {<<"a">>, 3},
            {<<"b">>, 4},
            {<<"c">>, 5}
        ]}
    ]}}
]},

One =   jsonpointer:get(Json, <<"/a">>)),
Two =   jsonpointer:get(Json, <<"/b/c">>)),
Three = jsonpointer:get(Json, <<"/d/e/0/a">>)),
Four =  jsonpointer:get(Json, <<"/d/e/1/b">>)),
Five =  jsonpointer:get(Json, <<"/d/e/2/c">>)),

Building

$ rebar compile

Testing

$ rebar eunit

License

MIT License.

Releases

No releases published

Packages

No packages published

Languages