Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:18
json
json-doc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File json-doc.patch of Package json
diff -Ndurp json/src/json.erl json-doc/src/json.erl --- json/src/json.erl 2016-03-04 09:07:03.000000000 +0200 +++ json-doc/src/json.erl 2017-07-16 00:14:10.036366050 +0300 @@ -99,18 +99,18 @@ filter(JSON, Module, InitialState) -> -spec get(Path::path(), JSON::json()) -> json(). --spec get(Path::path()) -> fun((JSON::json()) -> json()). get(Path, JSON) -> try get0(maybe_decode(Path), JSON) catch error:_ -> erlang:error(badarg) end. +-spec get(Path::path()) -> fun((JSON::json()) -> json()). + get(Path) -> fun(JSON) -> get(Path, JSON) end. -spec add(Path::path(), Value::json(), JSON::json()) -> json(). --spec add(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). add(Path, Value, JSON) when is_integer(Value); is_float(Value); is_binary(Value); @@ -121,72 +121,80 @@ when is_integer(Value); is_float(Value); end; add(_, _, _) -> erlang:error(badarg). +-spec add(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). + add(Path, Value) -> fun(JSON) -> add(Path, Value, JSON) end. -spec remove(Path::path(), JSON::json()) -> json(). --spec remove(Path::path()) -> fun((JSON::json()) -> json()). remove(Path, JSON) -> try remove0(maybe_decode(Path), JSON) catch error:_ -> erlang:error(badarg) end. +-spec remove(Path::path()) -> fun((JSON::json()) -> json()). + remove(Path) -> fun(JSON) -> remove(Path, JSON) end. -spec replace(Path::path(), Value::json(), JSON::json()) -> json(). --spec replace(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). replace(Path, Value, JSON) -> try replace0(maybe_decode(Path), Value, JSON) catch error:_ -> erlang:error(badarg) end. +-spec replace(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). + replace(Path, Value) -> fun(JSON) -> replace(Path, Value, JSON) end. -spec copy(From::path(), To::path(), JSON::json()) -> json(). --spec copy(From::path(), To::path()) -> fun((JSON::json()) -> json()). copy(From, To, JSON) -> try add(To, get(From, JSON), JSON) catch error:_ -> erlang:error(badarg) end. +-spec copy(From::path(), To::path()) -> fun((JSON::json()) -> json()). + copy(From, To) -> fun(JSON) -> copy(From, To, JSON) end. -spec move(From::path(), To::path(), JSON::json()) -> json(). --spec move(From::path(), To::path()) -> fun((JSON::json()) -> json()). move(From, To, JSON) -> try move0(maybe_decode(From), maybe_decode(To), JSON) catch error:_ -> erlang:error(badarg) end. +-spec move(From::path(), To::path()) -> fun((JSON::json()) -> json()). + move(From, To) -> fun(JSON) -> move(From, To, JSON) end. -spec test(Path::path(), Value::json(), JSON::json()) -> json(). --spec test(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). test(Path, Value, JSON) -> try Get = get(Path, JSON), Get = Value, JSON catch error:_ -> erlang:error(badarg) end. +-spec test(Path::path(), Value::json()) -> fun((JSON::json()) -> json()). + test(Path, Value) -> fun(JSON) -> test(Path, Value, JSON) end. -spec apply(Path::path(), Fun::function(), JSON::json()) -> json(). --spec apply(Path::path(), Fun::function()) -> fun((JSON::json()) -> json()). apply(Path, Fun, JSON) -> try replace(Path, Fun(get(Path, JSON)), JSON) catch error:_ -> erlang:error(badarg) end. +-spec apply(Path::path(), Fun::function()) -> fun((JSON::json()) -> json()). + apply(Path, Fun) -> fun(JSON) -> apply(Path, Fun, JSON) end.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor