Current section

Files

Jump to
json_blueprint src json@blueprint.erl
Raw

src/json@blueprint.erl

-module(json@blueprint).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([generate_json_schema/1, get_dynamic_decoder/1, decode/2, string/0, int/0, float/0, bool/0, list/1, optional/1, field/2, optional_field/2, union_type_encoder/2, union_type_decoder/1, enum_type_encoder/2, enum_type_decoder/1, map/2, tuple2/2, tuple3/3, tuple4/4, tuple5/5, tuple6/6, decode0/1, decode1/2, decode2/3, decode3/4, decode4/5, decode5/6, decode6/7, decode7/8, decode8/9, decode9/10, encode_tuple2/3, encode_tuple3/4, encode_tuple4/5, encode_tuple5/6, encode_tuple6/7, encode_tuple7/8, encode_tuple8/9, encode_tuple9/10]).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 15).
-spec generate_json_schema(
{fun((gleam@dynamic:dynamic_()) -> {ok, any()} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> gleam@json:json().
generate_json_schema(Decoder) ->
{_, Schema} = Decoder,
json@blueprint@schema:to_json(json@blueprint@schema:new_schema(Schema)).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 20).
-spec get_dynamic_decoder(
{fun((gleam@dynamic:dynamic_()) -> {ok, GGV} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> fun((gleam@dynamic:dynamic_()) -> {ok, GGV} |
{error, list(gleam@dynamic:decode_error())}).
get_dynamic_decoder(Decoder) ->
{Dyn_decoder, _} = Decoder,
Dyn_decoder.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 25).
-spec decode(
{fun((gleam@dynamic:dynamic_()) -> {ok, GGY} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
binary()
) -> {ok, GGY} | {error, gleam@json:decode_error()}.
decode(Decoder, Json_string) ->
{Dyn_decoder, _} = Decoder,
gleam@json:decode(Json_string, Dyn_decoder).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 33).
-spec string() -> {fun((gleam@dynamic:dynamic_()) -> {ok, binary()} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
string() ->
{fun gleam@dynamic:string/1, {type, string_type}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 37).
-spec int() -> {fun((gleam@dynamic:dynamic_()) -> {ok, integer()} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
int() ->
{fun gleam@dynamic:int/1, {type, integer_type}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 41).
-spec float() -> {fun((gleam@dynamic:dynamic_()) -> {ok, float()} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
float() ->
{fun gleam@dynamic:float/1, {type, number_type}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 45).
-spec bool() -> {fun((gleam@dynamic:dynamic_()) -> {ok, boolean()} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
bool() ->
{fun gleam@dynamic:bool/1, {type, boolean_type}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 49).
-spec list(
{fun((gleam@dynamic:dynamic_()) -> {ok, GHG} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, list(GHG)} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
list(Decoder_type) ->
{Decoder, Schema} = Decoder_type,
{gleam@dynamic:list(Decoder), {array, {some, Schema}}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 54).
-spec optional(
{fun((gleam@dynamic:dynamic_()) -> {ok, GHK} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, gleam@option:option(GHK)} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
optional(Decode) ->
{Decoder, Schema} = Decode,
{gleam@dynamic:optional(Decoder), {nullable, Schema}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 59).
-spec field(
binary(),
{fun((gleam@dynamic:dynamic_()) -> {ok, GHO} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GHO} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}.
field(Name, Inner_type) ->
{Decoder, Schema} = Inner_type,
{gleam@dynamic:field(Name, Decoder), {Name, Schema}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 69).
-spec optional_field(
binary(),
{fun((gleam@dynamic:dynamic_()) -> {ok, GHR} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, gleam@option:option(GHR)} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}.
optional_field(Name, Inner_type) ->
{Decoder, Schema} = Inner_type,
{fun(Value) ->
_pipe = (gleam@dynamic:optional_field(
Name,
fun(Dyn) -> case Dyn =:= json_blueprint_ffi:null() of
false ->
gleam@result:map(
Decoder(Dyn),
fun(Field@0) -> {some, Field@0} end
);
true ->
{ok, none}
end end
))(Value),
gleam@result:map(_pipe, fun gleam@option:flatten/1)
end,
{Name, {nullable, Schema}}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 116).
-spec union_type_encoder(GHV, fun((GHV) -> {binary(), gleam@json:json()})) -> gleam@json:json().
union_type_encoder(Of, Encoder_fn) ->
{Field_name, Json_value} = Encoder_fn(Of),
gleam@json:object(
[{<<"type"/utf8>>, gleam@json:string(Field_name)},
{<<"data"/utf8>>, Json_value}]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 146).
-spec union_type_decoder(
list({binary(),
{fun((gleam@dynamic:dynamic_()) -> {ok, GHW} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}})
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GHW} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
union_type_decoder(Decoders) ->
Constructor = fun(Type_str, Data) -> _pipe = Decoders,
_pipe@1 = gleam@list:find_map(
_pipe,
fun(Dec) -> case erlang:element(1, Dec) =:= Type_str of
true ->
{Dyn_decoder, _} = erlang:element(2, Dec),
{ok, Dyn_decoder(Data)};
_ ->
{error, []}
end end
),
_pipe@4 = gleam@result:map_error(
_pipe@1,
fun(_) ->
Valid_types = begin
_pipe@2 = Decoders,
_pipe@3 = gleam@list:map(
_pipe@2,
fun(Dec@1) -> erlang:element(1, Dec@1) end
),
gleam@string:join(_pipe@3, <<", "/utf8>>)
end,
[{decode_error,
<<"valid constructor type, one of: "/utf8,
Valid_types/binary>>,
Type_str,
[]}]
end
),
gleam@result:flatten(_pipe@4) end,
Enum_decoder = fun(Data@1) ->
_pipe@5 = (gleam@dynamic:decode2(
Constructor,
gleam@dynamic:field(<<"type"/utf8>>, fun gleam@dynamic:string/1),
gleam@dynamic:field(<<"data"/utf8>>, fun gleam@dynamic:dynamic/1)
))(Data@1),
gleam@result:flatten(_pipe@5)
end,
{Enum_decoder,
begin
_pipe@6 = gleam@list:map(
Decoders,
fun(Field_dec) ->
{Name, Dec@2} = Field_dec,
{object,
[{<<"type"/utf8>>, {enum, [gleam@json:string(Name)]}},
{<<"data"/utf8>>, erlang:element(2, Dec@2)}],
{some, false},
{some, [<<"type"/utf8>>, <<"data"/utf8>>]}}
end
),
{one_of, _pipe@6}
end}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 224).
-spec enum_type_encoder(GIA, fun((GIA) -> binary())) -> gleam@json:json().
enum_type_encoder(Of, Encoder_fn) ->
Field_name = Encoder_fn(Of),
gleam@json:object([{<<"enum"/utf8>>, gleam@json:string(Field_name)}]).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 253).
-spec enum_type_decoder(list({binary(), GIB})) -> {fun((gleam@dynamic:dynamic_()) -> {ok,
GIB} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
enum_type_decoder(Decoders) ->
Constructor = fun(Type_str) -> _pipe = Decoders,
_pipe@1 = gleam@list:find_map(
_pipe,
fun(Dec) -> case erlang:element(1, Dec) =:= Type_str of
true ->
{ok, erlang:element(2, Dec)};
_ ->
{error, []}
end end
),
gleam@result:map_error(
_pipe@1,
fun(_) ->
Valid_types = begin
_pipe@2 = Decoders,
_pipe@3 = gleam@list:map(
_pipe@2,
fun(Dec@1) -> erlang:element(1, Dec@1) end
),
gleam@string:join(_pipe@3, <<", "/utf8>>)
end,
[{decode_error,
<<"valid constructor type, one of: "/utf8,
Valid_types/binary>>,
Type_str,
[]}]
end
) end,
Enum_decoder = fun(Data) ->
_pipe@4 = (gleam@dynamic:decode1(
Constructor,
gleam@dynamic:field(<<"enum"/utf8>>, fun gleam@dynamic:string/1)
))(Data),
gleam@result:flatten(_pipe@4)
end,
{Enum_decoder,
begin
_pipe@5 = gleam@list:map(
Decoders,
fun(Field_dec) ->
gleam@json:string(erlang:element(1, Field_dec))
end
),
_pipe@6 = (fun(Enum_values) ->
[{<<"enum"/utf8>>, {enum, Enum_values}}]
end)(_pipe@5),
{object, _pipe@6, {some, false}, {some, [<<"enum"/utf8>>]}}
end}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 293).
-spec map(
{fun((gleam@dynamic:dynamic_()) -> {ok, GIE} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
fun((GIE) -> GIG)
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GIG} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
map(Decoder, Foo) ->
{Dyn_dec, Schema} = Decoder,
{fun(Input) -> gleam@result:map(Dyn_dec(Input), Foo) end, Schema}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 298).
-spec tuple2(
{fun((gleam@dynamic:dynamic_()) -> {ok, GII} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GIK} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, {GII, GIK}} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
tuple2(Decode1, Decode2) ->
{Decoder1, Schema1} = Decode1,
{Decoder2, Schema2} = Decode2,
{gleam@dynamic:tuple2(Decoder1, Decoder2),
{detailed_array,
none,
{some, [Schema1, Schema2]},
{some, 2},
{some, 2},
none,
none,
none,
none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 319).
-spec tuple3(
{fun((gleam@dynamic:dynamic_()) -> {ok, GIN} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GIP} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GIR} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, {GIN, GIP, GIR}} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
tuple3(Decode1, Decode2, Decode3) ->
{Decoder1, Schema1} = Decode1,
{Decoder2, Schema2} = Decode2,
{Decoder3, Schema3} = Decode3,
{gleam@dynamic:tuple3(Decoder1, Decoder2, Decoder3),
{detailed_array,
none,
{some, [Schema1, Schema2, Schema3]},
{some, 3},
{some, 3},
none,
none,
none,
none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 342).
-spec tuple4(
{fun((gleam@dynamic:dynamic_()) -> {ok, GIU} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GIW} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GIY} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJA} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, {GIU, GIW, GIY, GJA}} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
tuple4(Decode1, Decode2, Decode3, Decode4) ->
{Decoder1, Schema1} = Decode1,
{Decoder2, Schema2} = Decode2,
{Decoder3, Schema3} = Decode3,
{Decoder4, Schema4} = Decode4,
{gleam@dynamic:tuple4(Decoder1, Decoder2, Decoder3, Decoder4),
{detailed_array,
none,
{some, [Schema1, Schema2, Schema3, Schema4]},
{some, 4},
{some, 4},
none,
none,
none,
none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 367).
-spec tuple5(
{fun((gleam@dynamic:dynamic_()) -> {ok, GJD} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJF} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJH} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJJ} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJL} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, {GJD, GJF, GJH, GJJ, GJL}} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
tuple5(Decode1, Decode2, Decode3, Decode4, Decode5) ->
{Decoder1, Schema1} = Decode1,
{Decoder2, Schema2} = Decode2,
{Decoder3, Schema3} = Decode3,
{Decoder4, Schema4} = Decode4,
{Decoder5, Schema5} = Decode5,
{gleam@dynamic:tuple5(Decoder1, Decoder2, Decoder3, Decoder4, Decoder5),
{detailed_array,
none,
{some, [Schema1, Schema2, Schema3, Schema4, Schema5]},
{some, 5},
{some, 5},
none,
none,
none,
none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 394).
-spec tuple6(
{fun((gleam@dynamic:dynamic_()) -> {ok, GJO} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJQ} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJS} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJU} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJW} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()},
{fun((gleam@dynamic:dynamic_()) -> {ok, GJY} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, {GJO, GJQ, GJS, GJU, GJW, GJY}} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
tuple6(Decode1, Decode2, Decode3, Decode4, Decode5, Decode6) ->
{Decoder1, Schema1} = Decode1,
{Decoder2, Schema2} = Decode2,
{Decoder3, Schema3} = Decode3,
{Decoder4, Schema4} = Decode4,
{Decoder5, Schema5} = Decode5,
{Decoder6, Schema6} = Decode6,
{gleam@dynamic:tuple6(
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5,
Decoder6
),
{detailed_array,
none,
{some, [Schema1, Schema2, Schema3, Schema4, Schema5, Schema6]},
{some, 6},
{some, 6},
none,
none,
none,
none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 423).
-spec create_object_schema(
list({binary(), json@blueprint@schema:schema_definition()})
) -> json@blueprint@schema:schema_definition().
create_object_schema(Fields) ->
{object,
Fields,
{some, false},
{some, gleam@list:filter_map(Fields, fun(Field_dec) -> case Field_dec of
{_, {nullable, _}} ->
{error, nil};
{Name, _} ->
{ok, Name}
end end)}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 440).
-spec decode0(GKC) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GKC} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode0(Constructor) ->
{fun(_) -> {ok, Constructor} end, {object, [], {some, false}, none}}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 466).
-spec decode1(
fun((GKE) -> GKF),
{fun((gleam@dynamic:dynamic_()) -> {ok, GKE} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GKF} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode1(Constructor, T1) ->
{Decoder, Schema} = T1,
{gleam@dynamic:decode1(Constructor, Decoder),
create_object_schema([Schema])}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 471).
-spec decode2(
fun((GKI, GKJ) -> GKK),
{fun((gleam@dynamic:dynamic_()) -> {ok, GKI} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKJ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GKK} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode2(Constructor, T1, T2) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{gleam@dynamic:decode2(Constructor, Decoder1, Decoder2),
create_object_schema([Schema1, Schema2])}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 484).
-spec decode3(
fun((GKO, GKP, GKQ) -> GKR),
{fun((gleam@dynamic:dynamic_()) -> {ok, GKO} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKP} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKQ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GKR} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode3(Constructor, T1, T2, T3) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{gleam@dynamic:decode3(Constructor, Decoder1, Decoder2, Decoder3),
create_object_schema([Schema1, Schema2, Schema3])}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 499).
-spec decode4(
fun((GKW, GKX, GKY, GKZ) -> GLA),
{fun((gleam@dynamic:dynamic_()) -> {ok, GKW} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKX} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKY} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GKZ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GLA} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode4(Constructor, T1, T2, T3, T4) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{gleam@dynamic:decode4(Constructor, Decoder1, Decoder2, Decoder3, Decoder4),
create_object_schema([Schema1, Schema2, Schema3, Schema4])}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 516).
-spec decode5(
fun((GLG, GLH, GLI, GLJ, GLK) -> GLL),
{fun((gleam@dynamic:dynamic_()) -> {ok, GLG} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLH} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLI} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLJ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLK} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GLL} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode5(Constructor, T1, T2, T3, T4, T5) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{Decoder5, Schema5} = T5,
{gleam@dynamic:decode5(
Constructor,
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5
),
create_object_schema([Schema1, Schema2, Schema3, Schema4, Schema5])}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 542).
-spec decode6(
fun((GLS, GLT, GLU, GLV, GLW, GLX) -> GLY),
{fun((gleam@dynamic:dynamic_()) -> {ok, GLS} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLT} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLU} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLV} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLW} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GLX} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GLY} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode6(Constructor, T1, T2, T3, T4, T5, T6) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{Decoder5, Schema5} = T5,
{Decoder6, Schema6} = T6,
{gleam@dynamic:decode6(
Constructor,
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5,
Decoder6
),
create_object_schema(
[Schema1, Schema2, Schema3, Schema4, Schema5, Schema6]
)}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 571).
-spec decode7(
fun((GMG, GMH, GMI, GMJ, GMK, GML, GMM) -> GMN),
{fun((gleam@dynamic:dynamic_()) -> {ok, GMG} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMH} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMI} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMJ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMK} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GML} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMM} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GMN} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode7(Constructor, T1, T2, T3, T4, T5, T6, T7) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{Decoder5, Schema5} = T5,
{Decoder6, Schema6} = T6,
{Decoder7, Schema7} = T7,
{gleam@dynamic:decode7(
Constructor,
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5,
Decoder6,
Decoder7
),
create_object_schema(
[Schema1, Schema2, Schema3, Schema4, Schema5, Schema6, Schema7]
)}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 611).
-spec decode8(
fun((GMW, GMX, GMY, GMZ, GNA, GNB, GNC, GND) -> GNE),
{fun((gleam@dynamic:dynamic_()) -> {ok, GMW} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMX} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMY} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GMZ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNA} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNB} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNC} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GND} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GNE} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode8(Constructor, T1, T2, T3, T4, T5, T6, T7, T8) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{Decoder5, Schema5} = T5,
{Decoder6, Schema6} = T6,
{Decoder7, Schema7} = T7,
{Decoder8, Schema8} = T8,
{gleam@dynamic:decode8(
Constructor,
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5,
Decoder6,
Decoder7,
Decoder8
),
create_object_schema(
[Schema1,
Schema2,
Schema3,
Schema4,
Schema5,
Schema6,
Schema7,
Schema8]
)}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 655).
-spec decode9(
fun((GNO, GNP, GNQ, GNR, GNS, GNT, GNU, GNV, GNW) -> GNX),
{fun((gleam@dynamic:dynamic_()) -> {ok, GNO} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNP} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNQ} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNR} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNS} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNT} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNU} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNV} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}},
{fun((gleam@dynamic:dynamic_()) -> {ok, GNW} |
{error, list(gleam@dynamic:decode_error())}),
{binary(), json@blueprint@schema:schema_definition()}}
) -> {fun((gleam@dynamic:dynamic_()) -> {ok, GNX} |
{error, list(gleam@dynamic:decode_error())}),
json@blueprint@schema:schema_definition()}.
decode9(Constructor, T1, T2, T3, T4, T5, T6, T7, T8, T9) ->
{Decoder1, Schema1} = T1,
{Decoder2, Schema2} = T2,
{Decoder3, Schema3} = T3,
{Decoder4, Schema4} = T4,
{Decoder5, Schema5} = T5,
{Decoder6, Schema6} = T6,
{Decoder7, Schema7} = T7,
{Decoder8, Schema8} = T8,
{Decoder9, Schema9} = T9,
{gleam@dynamic:decode9(
Constructor,
Decoder1,
Decoder2,
Decoder3,
Decoder4,
Decoder5,
Decoder6,
Decoder7,
Decoder8,
Decoder9
),
create_object_schema(
[Schema1,
Schema2,
Schema3,
Schema4,
Schema5,
Schema6,
Schema7,
Schema8,
Schema9]
)}.
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 703).
-spec encode_tuple2(
{GOI, GOJ},
fun((GOI) -> gleam@json:json()),
fun((GOJ) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple2(Tuple, Encode1, Encode2) ->
{T1, T2} = Tuple,
gleam@json:preprocessed_array([Encode1(T1), Encode2(T2)]).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 712).
-spec encode_tuple3(
{GOK, GOL, GOM},
fun((GOK) -> gleam@json:json()),
fun((GOL) -> gleam@json:json()),
fun((GOM) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple3(Tuple, Encode1, Encode2, Encode3) ->
{T1, T2, T3} = Tuple,
gleam@json:preprocessed_array([Encode1(T1), Encode2(T2), Encode3(T3)]).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 722).
-spec encode_tuple4(
{GON, GOO, GOP, GOQ},
fun((GON) -> gleam@json:json()),
fun((GOO) -> gleam@json:json()),
fun((GOP) -> gleam@json:json()),
fun((GOQ) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple4(Tuple, Encode1, Encode2, Encode3, Encode4) ->
{T1, T2, T3, T4} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1), Encode2(T2), Encode3(T3), Encode4(T4)]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 733).
-spec encode_tuple5(
{GOR, GOS, GOT, GOU, GOV},
fun((GOR) -> gleam@json:json()),
fun((GOS) -> gleam@json:json()),
fun((GOT) -> gleam@json:json()),
fun((GOU) -> gleam@json:json()),
fun((GOV) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple5(Tuple, Encode1, Encode2, Encode3, Encode4, Encode5) ->
{T1, T2, T3, T4, T5} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1), Encode2(T2), Encode3(T3), Encode4(T4), Encode5(T5)]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 751).
-spec encode_tuple6(
{GOW, GOX, GOY, GOZ, GPA, GPB},
fun((GOW) -> gleam@json:json()),
fun((GOX) -> gleam@json:json()),
fun((GOY) -> gleam@json:json()),
fun((GOZ) -> gleam@json:json()),
fun((GPA) -> gleam@json:json()),
fun((GPB) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple6(Tuple, Encode1, Encode2, Encode3, Encode4, Encode5, Encode6) ->
{T1, T2, T3, T4, T5, T6} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1),
Encode2(T2),
Encode3(T3),
Encode4(T4),
Encode5(T5),
Encode6(T6)]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 771).
-spec encode_tuple7(
{GPC, GPD, GPE, GPF, GPG, GPH, GPI},
fun((GPC) -> gleam@json:json()),
fun((GPD) -> gleam@json:json()),
fun((GPE) -> gleam@json:json()),
fun((GPF) -> gleam@json:json()),
fun((GPG) -> gleam@json:json()),
fun((GPH) -> gleam@json:json()),
fun((GPI) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple7(
Tuple,
Encode1,
Encode2,
Encode3,
Encode4,
Encode5,
Encode6,
Encode7
) ->
{T1, T2, T3, T4, T5, T6, T7} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1),
Encode2(T2),
Encode3(T3),
Encode4(T4),
Encode5(T5),
Encode6(T6),
Encode7(T7)]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 793).
-spec encode_tuple8(
{GPJ, GPK, GPL, GPM, GPN, GPO, GPP, GPQ},
fun((GPJ) -> gleam@json:json()),
fun((GPK) -> gleam@json:json()),
fun((GPL) -> gleam@json:json()),
fun((GPM) -> gleam@json:json()),
fun((GPN) -> gleam@json:json()),
fun((GPO) -> gleam@json:json()),
fun((GPP) -> gleam@json:json()),
fun((GPQ) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple8(
Tuple,
Encode1,
Encode2,
Encode3,
Encode4,
Encode5,
Encode6,
Encode7,
Encode8
) ->
{T1, T2, T3, T4, T5, T6, T7, T8} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1),
Encode2(T2),
Encode3(T3),
Encode4(T4),
Encode5(T5),
Encode6(T6),
Encode7(T7),
Encode8(T8)]
).
-file("/code/edgar/gleamplay/src/json/blueprint.gleam", 817).
-spec encode_tuple9(
{GPR, GPS, GPT, GPU, GPV, GPW, GPX, GPY, GPZ},
fun((GPR) -> gleam@json:json()),
fun((GPS) -> gleam@json:json()),
fun((GPT) -> gleam@json:json()),
fun((GPU) -> gleam@json:json()),
fun((GPV) -> gleam@json:json()),
fun((GPW) -> gleam@json:json()),
fun((GPX) -> gleam@json:json()),
fun((GPY) -> gleam@json:json()),
fun((GPZ) -> gleam@json:json())
) -> gleam@json:json().
encode_tuple9(
Tuple,
Encode1,
Encode2,
Encode3,
Encode4,
Encode5,
Encode6,
Encode7,
Encode8,
Encode9
) ->
{T1, T2, T3, T4, T5, T6, T7, T8, T9} = Tuple,
gleam@json:preprocessed_array(
[Encode1(T1),
Encode2(T2),
Encode3(T3),
Encode4(T4),
Encode5(T5),
Encode6(T6),
Encode7(T7),
Encode8(T8),
Encode9(T9)]
).