View Source argo_json (argo v1.0.2)

Summary

Types

-type json_array() :: [json_value()].
-type json_boolean() :: boolean().
-type json_null() :: null.
-type json_number() :: integer() | float().
-type json_object() ::
    #{json_string() => json_value()} |
    argo_index_map:t(json_string(), json_value()) |
    {[{json_string(), json_value()}]}.
-type json_string() :: unicode:unicode_binary().
-type json_value() ::
    json_null() | json_boolean() | json_number() | json_string() | json_array() | json_object().

Functions

-spec array(json_array()) -> json_array().
-spec boolean(json_boolean()) -> json_boolean().
-spec is_array(json_value()) -> boolean().
-spec is_boolean(json_value()) -> boolean().
-spec is_null(json_value()) -> boolean().
-spec is_number(json_value()) -> boolean().
-spec is_object(json_value()) -> boolean().
-spec is_string(json_value()) -> boolean().
-spec is_value(json_value()) -> boolean().
-spec null() -> json_null().
-spec number(json_number()) -> json_number().
-spec object(json_object()) -> json_object().
Link to this function

object_find(Key, JsonObject)

View Source
-spec object_find(Key, JsonObject) -> {ok, JsonValue} | error
               when Key :: json_string(), JsonObject :: json_object(), JsonValue :: json_value().
Link to this function

object_fold(Function, Acc0, JsonObject)

View Source
-spec object_fold(Function, Acc0, JsonObject) -> Acc1
               when
                   Function ::
                       fun((Key :: json_string(), JsonValue :: json_value(), AccIn :: dynamic()) ->
                               AccOut :: dynamic()),
                   Acc0 :: dynamic(),
                   JsonObject :: json_object(),
                   Acc1 :: dynamic().
-spec string(json_string()) -> json_string().
-spec value(json_value()) -> json_value().