View Source jsonpull_expect (jsonpull v0.1.1)

These functions will read a value or error out immediately, with useful errorinfo applied on top.

Summary

Functions

-spec array(JSON :: binary()) -> {begin_array, Rest :: binary()}.
-spec boolean(JSON :: binary()) -> {boolean, Rest :: binary()}.
-spec element(JSON :: binary()) -> {element | end_array, Rest :: binary()}.
-spec existing_atom(JSON :: binary()) -> {atom(), Rest :: binary()}.
-spec float(JSON :: binary()) -> {float(), Rest :: binary()}.
-spec integer(JSON :: binary()) -> {integer(), Rest :: binary()}.
-spec iolist(JSON :: binary()) -> {iolist(), Rest :: binary()}.
-spec key(JSON :: binary()) -> {binary() | end_object, Rest :: binary()}.
-spec null(JSON :: binary()) -> {null, Rest :: binary()}.
-spec number(JSON :: binary()) -> {binary(), Rest :: binary()}.
-spec object(JSON :: binary()) -> {begin_object, Rest :: binary()}.
-spec string(JSON :: binary()) -> {binary(), Rest :: binary()}.