Test case
1 generated file · +6 −0test/inputs/json/misc/00c36.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias FluffyQuickType = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickType : Jdec.Decoder QuickType |
| 68 | 74 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +6 −0test/inputs/json/misc/00ec5.json
Melmdefault / QuickType.elm+6 −0
| @@ -106,6 +106,12 @@ type alias Schema = | ||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | -- decoders and encoders |
| 109 | +optionalField key decoder fallback = | |
| 110 | + Jdec.dict Jdec.value | |
| 111 | + |> Jdec.andThen (\m -> | |
| 112 | + case Dict.get key m of | |
| 113 | + Nothing -> Jdec.succeed fallback | |
| 114 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 109 | 115 | |
| 110 | 116 | quickTypeToString : QuickType -> String |
| 111 | 117 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/010b1.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/016af.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/033b1.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/050b0.json
Melmdefault / QuickType.elm+8 −2
| @@ -93,6 +93,12 @@ type Title | ||
| 93 | 93 | | PlainText |
| 94 | 94 | |
| 95 | 95 | -- decoders and encoders |
| 96 | +optionalField key decoder fallback = | |
| 97 | + Jdec.dict Jdec.value | |
| 98 | + |> Jdec.andThen (\m -> | |
| 99 | + case Dict.get key m of | |
| 100 | + Nothing -> Jdec.succeed fallback | |
| 101 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 96 | 102 | |
| 97 | 103 | quickType : Jdec.Decoder QuickType |
| 98 | 104 | quickType = Jdec.list quickTypeElement |
| @@ -109,7 +115,7 @@ quickTypeElement = | ||
| 109 | 115 | |> Jpipe.required "links" (Jdec.list link) |
| 110 | 116 | |> Jpipe.required "name" Jdec.string |
| 111 | 117 | |> Jpipe.required "other_names" (Jdec.list otherName) |
| 112 | - |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing | |
| 118 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing) | |
| 113 | 119 | |> Jpipe.required "text" (Jdec.list text) |
| 114 | 120 | |
| 115 | 121 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| @@ -212,7 +218,7 @@ otherName : Jdec.Decoder OtherName | ||
| 212 | 218 | otherName = |
| 213 | 219 | Jdec.succeed OtherName |
| 214 | 220 | |> Jpipe.required "name" Jdec.string |
| 215 | - |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing | |
| 221 | + |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing) | |
| 216 | 222 | |
| 217 | 223 | encodeOtherName : OtherName -> Jenc.Value |
| 218 | 224 | encodeOtherName x = |
Test case
1 generated file · +7 −1test/inputs/json/misc/06bee.json
Melmdefault / QuickType.elm+7 −1
| @@ -80,6 +80,12 @@ type Title | ||
| 80 | 80 | = HTML |
| 81 | 81 | |
| 82 | 82 | -- decoders and encoders |
| 83 | +optionalField key decoder fallback = | |
| 84 | + Jdec.dict Jdec.value | |
| 85 | + |> Jdec.andThen (\m -> | |
| 86 | + case Dict.get key m of | |
| 87 | + Nothing -> Jdec.succeed fallback | |
| 88 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 83 | 89 | |
| 84 | 90 | quickType : Jdec.Decoder QuickType |
| 85 | 91 | quickType = Jdec.list quickTypeElement |
| @@ -96,7 +102,7 @@ quickTypeElement = | ||
| 96 | 102 | |> Jpipe.required "links" (Jdec.list link) |
| 97 | 103 | |> Jpipe.required "name" Jdec.string |
| 98 | 104 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 99 | - |> Jpipe.optional "superseded_by" (Jdec.null ()) () | |
| 105 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ()) | |
| 100 | 106 | |> Jpipe.required "text" (Jdec.list text) |
| 101 | 107 | |
| 102 | 108 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/07540.json
Melmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type alias Cookies = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/0779f.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/misc/07c75.json
Melmdefault / QuickType.elm+7 −1
| @@ -56,6 +56,12 @@ type alias Text = | ||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | -- decoders and encoders |
| 59 | +optionalField key decoder fallback = | |
| 60 | + Jdec.dict Jdec.value | |
| 61 | + |> Jdec.andThen (\m -> | |
| 62 | + case Dict.get key m of | |
| 63 | + Nothing -> Jdec.succeed fallback | |
| 64 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 59 | 65 | |
| 60 | 66 | quickType : Jdec.Decoder QuickType |
| 61 | 67 | quickType = Jdec.list quickTypeElement |
| @@ -72,7 +78,7 @@ quickTypeElement = | ||
| 72 | 78 | |> Jpipe.required "links" (Jdec.list link) |
| 73 | 79 | |> Jpipe.required "name" Jdec.string |
| 74 | 80 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 75 | - |> Jpipe.optional "superseded_by" (Jdec.null ()) () | |
| 81 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ()) | |
| 76 | 82 | |> Jpipe.required "text" (Jdec.list text) |
| 77 | 83 | |
| 78 | 84 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/09f54.json
Melmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type alias Description = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/0a358.json
Melmdefault / QuickType.elm+6 −0
| @@ -48,6 +48,12 @@ type alias Result = | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | -- decoders and encoders |
| 51 | +optionalField key decoder fallback = | |
| 52 | + Jdec.dict Jdec.value | |
| 53 | + |> Jdec.andThen (\m -> | |
| 54 | + case Dict.get key m of | |
| 55 | + Nothing -> Jdec.succeed fallback | |
| 56 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 51 | 57 | |
| 52 | 58 | quickTypeToString : QuickType -> String |
| 53 | 59 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +29 −23test/inputs/json/misc/0a91a.json
Melmdefault / QuickType.elm+29 −23
| @@ -260,6 +260,12 @@ type alias QuickTypeRepo = | ||
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | -- decoders and encoders |
| 263 | +optionalField key decoder fallback = | |
| 264 | + Jdec.dict Jdec.value | |
| 265 | + |> Jdec.andThen (\m -> | |
| 266 | + case Dict.get key m of | |
| 267 | + Nothing -> Jdec.succeed fallback | |
| 268 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 263 | 269 | |
| 264 | 270 | quickType : Jdec.Decoder QuickType |
| 265 | 271 | quickType = Jdec.list quickTypeElement |
| @@ -273,7 +279,7 @@ quickTypeElement = | ||
| 273 | 279 | |> Jpipe.required "actor" actor |
| 274 | 280 | |> Jpipe.required "created_at" Jdec.string |
| 275 | 281 | |> Jpipe.required "id" Jdec.string |
| 276 | - |> Jpipe.optional "org" (Jdec.nullable actor) Nothing | |
| 282 | + |> Jpipe.custom (optionalField "org" (Jdec.nullable actor) Nothing) | |
| 277 | 283 | |> Jpipe.required "payload" payload |
| 278 | 284 | |> Jpipe.required "public" Jdec.bool |
| 279 | 285 | |> Jpipe.required "type" purpleType |
| @@ -296,7 +302,7 @@ actor : Jdec.Decoder Actor | ||
| 296 | 302 | actor = |
| 297 | 303 | Jdec.succeed Actor |
| 298 | 304 | |> Jpipe.required "avatar_url" Jdec.string |
| 299 | - |> Jpipe.optional "display_login" (Jdec.nullable Jdec.string) Nothing | |
| 305 | + |> Jpipe.custom (optionalField "display_login" (Jdec.nullable Jdec.string) Nothing) | |
| 300 | 306 | |> Jpipe.required "gravatar_id" Jdec.string |
| 301 | 307 | |> Jpipe.required "id" Jdec.int |
| 302 | 308 | |> Jpipe.required "login" Jdec.string |
| @@ -316,20 +322,20 @@ encodeActor x = | ||
| 316 | 322 | payload : Jdec.Decoder Payload |
| 317 | 323 | payload = |
| 318 | 324 | Jdec.succeed Payload |
| 319 | - |> Jpipe.optional "action" (Jdec.nullable Jdec.string) Nothing | |
| 320 | - |> Jpipe.optional "before" (Jdec.nullable Jdec.string) Nothing | |
| 321 | - |> Jpipe.optional "commits" (Jdec.nullable (Jdec.list commit)) Nothing | |
| 322 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 323 | - |> Jpipe.optional "distinct_size" (Jdec.nullable Jdec.int) Nothing | |
| 324 | - |> Jpipe.optional "head" (Jdec.nullable Jdec.string) Nothing | |
| 325 | - |> Jpipe.optional "master_branch" (Jdec.nullable Jdec.string) Nothing | |
| 326 | - |> Jpipe.optional "number" (Jdec.nullable Jdec.int) Nothing | |
| 327 | - |> Jpipe.optional "pull_request" (Jdec.nullable pullRequest) Nothing | |
| 328 | - |> Jpipe.optional "push_id" (Jdec.nullable Jdec.int) Nothing | |
| 329 | - |> Jpipe.optional "pusher_type" (Jdec.nullable Jdec.string) Nothing | |
| 330 | - |> Jpipe.optional "ref" (Jdec.nullable Jdec.string) Nothing | |
| 331 | - |> Jpipe.optional "ref_type" (Jdec.nullable Jdec.string) Nothing | |
| 332 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.int) Nothing | |
| 325 | + |> Jpipe.custom (optionalField "action" (Jdec.nullable Jdec.string) Nothing) | |
| 326 | + |> Jpipe.custom (optionalField "before" (Jdec.nullable Jdec.string) Nothing) | |
| 327 | + |> Jpipe.custom (optionalField "commits" (Jdec.nullable (Jdec.list commit)) Nothing) | |
| 328 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 329 | + |> Jpipe.custom (optionalField "distinct_size" (Jdec.nullable Jdec.int) Nothing) | |
| 330 | + |> Jpipe.custom (optionalField "head" (Jdec.nullable Jdec.string) Nothing) | |
| 331 | + |> Jpipe.custom (optionalField "master_branch" (Jdec.nullable Jdec.string) Nothing) | |
| 332 | + |> Jpipe.custom (optionalField "number" (Jdec.nullable Jdec.int) Nothing) | |
| 333 | + |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable pullRequest) Nothing) | |
| 334 | + |> Jpipe.custom (optionalField "push_id" (Jdec.nullable Jdec.int) Nothing) | |
| 335 | + |> Jpipe.custom (optionalField "pusher_type" (Jdec.nullable Jdec.string) Nothing) | |
| 336 | + |> Jpipe.custom (optionalField "ref" (Jdec.nullable Jdec.string) Nothing) | |
| 337 | + |> Jpipe.custom (optionalField "ref_type" (Jdec.nullable Jdec.string) Nothing) | |
| 338 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.int) Nothing) | |
| 333 | 339 | |
| 334 | 340 | encodePayload : Payload -> Jenc.Value |
| 335 | 341 | encodePayload x = |
| @@ -386,7 +392,7 @@ pullRequest : Jdec.Decoder PullRequest | ||
| 386 | 392 | pullRequest = |
| 387 | 393 | Jdec.succeed PullRequest |
| 388 | 394 | |> Jpipe.required "additions" Jdec.int |
| 389 | - |> Jpipe.optional "assignee" (Jdec.null ()) () | |
| 395 | + |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ()) | |
| 390 | 396 | |> Jpipe.required "assignees" (Jdec.list Jdec.value) |
| 391 | 397 | |> Jpipe.required "base" base |
| 392 | 398 | |> Jpipe.required "body" Jdec.string |
| @@ -407,15 +413,15 @@ pullRequest = | ||
| 407 | 413 | |> Jpipe.required "locked" Jdec.bool |
| 408 | 414 | |> Jpipe.required "maintainer_can_modify" Jdec.bool |
| 409 | 415 | |> Jpipe.required "merge_commit_sha" Jdec.string |
| 410 | - |> Jpipe.optional "mergeable" (Jdec.null ()) () | |
| 416 | + |> Jpipe.custom (optionalField "mergeable" (Jdec.null ()) ()) | |
| 411 | 417 | |> Jpipe.required "mergeable_state" Jdec.string |
| 412 | 418 | |> Jpipe.required "merged" Jdec.bool |
| 413 | 419 | |> Jpipe.required "merged_at" Jdec.string |
| 414 | 420 | |> Jpipe.required "merged_by" mergedBy |
| 415 | - |> Jpipe.optional "milestone" (Jdec.null ()) () | |
| 421 | + |> Jpipe.custom (optionalField "milestone" (Jdec.null ()) ()) | |
| 416 | 422 | |> Jpipe.required "number" Jdec.int |
| 417 | 423 | |> Jpipe.required "patch_url" Jdec.string |
| 418 | - |> Jpipe.optional "rebaseable" (Jdec.null ()) () | |
| 424 | + |> Jpipe.custom (optionalField "rebaseable" (Jdec.null ()) ()) | |
| 419 | 425 | |> Jpipe.required "requested_reviewers" (Jdec.list Jdec.value) |
| 420 | 426 | |> Jpipe.required "review_comment_url" Jdec.string |
| 421 | 427 | |> Jpipe.required "review_comments" Jdec.int |
| @@ -509,7 +515,7 @@ baseRepo = | ||
| 509 | 515 | |> Jpipe.required "created_at" Jdec.string |
| 510 | 516 | |> Jpipe.required "default_branch" Jdec.string |
| 511 | 517 | |> Jpipe.required "deployments_url" Jdec.string |
| 512 | - |> Jpipe.optional "description" (Jdec.null ()) () | |
| 518 | + |> Jpipe.custom (optionalField "description" (Jdec.null ()) ()) | |
| 513 | 519 | |> Jpipe.required "downloads_url" Jdec.string |
| 514 | 520 | |> Jpipe.required "events_url" Jdec.string |
| 515 | 521 | |> Jpipe.required "fork" Jdec.bool |
| @@ -526,7 +532,7 @@ baseRepo = | ||
| 526 | 532 | |> Jpipe.required "has_pages" Jdec.bool |
| 527 | 533 | |> Jpipe.required "has_projects" Jdec.bool |
| 528 | 534 | |> Jpipe.required "has_wiki" Jdec.bool |
| 529 | - |> Jpipe.optional "homepage" (Jdec.null ()) () | |
| 535 | + |> Jpipe.custom (optionalField "homepage" (Jdec.null ()) ()) | |
| 530 | 536 | |> Jpipe.required "hooks_url" Jdec.string |
| 531 | 537 | |> Jpipe.required "html_url" Jdec.string |
| 532 | 538 | |> Jpipe.required "id" Jdec.int |
| @@ -539,7 +545,7 @@ baseRepo = | ||
| 539 | 545 | |> Jpipe.required "languages_url" Jdec.string |
| 540 | 546 | |> Jpipe.required "merges_url" Jdec.string |
| 541 | 547 | |> Jpipe.required "milestones_url" Jdec.string |
| 542 | - |> Jpipe.optional "mirror_url" (Jdec.null ()) () | |
| 548 | + |> Jpipe.custom (optionalField "mirror_url" (Jdec.null ()) ()) | |
| 543 | 549 | |> Jpipe.required "name" Jdec.string |
| 544 | 550 | |> Jpipe.required "notifications_url" Jdec.string |
| 545 | 551 | |> Jpipe.required "open_issues" Jdec.int |
Test case
1 generated file · +8 −2test/inputs/json/misc/0b91a.json
Melmdefault / QuickType.elm+8 −2
| @@ -72,6 +72,12 @@ type alias Component = | ||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | -- decoders and encoders |
| 75 | +optionalField key decoder fallback = | |
| 76 | + Jdec.dict Jdec.value | |
| 77 | + |> Jdec.andThen (\m -> | |
| 78 | + case Dict.get key m of | |
| 79 | + Nothing -> Jdec.succeed fallback | |
| 80 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 75 | 81 | |
| 76 | 82 | quickTypeToString : QuickType -> String |
| 77 | 83 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -142,8 +148,8 @@ result = | ||
| 142 | 148 | |> Jpipe.required "created" Jdec.string |
| 143 | 149 | |> Jpipe.required "date" Jdec.string |
| 144 | 150 | |> Jpipe.required "image" (Jdec.list Jdec.value) |
| 145 | - |> Jpipe.optional "number" (Jdec.null ()) () | |
| 146 | - |> Jpipe.optional "teaser" (Jdec.null ()) () | |
| 151 | + |> Jpipe.custom (optionalField "number" (Jdec.null ()) ()) | |
| 152 | + |> Jpipe.custom (optionalField "teaser" (Jdec.null ()) ()) | |
| 147 | 153 | |> Jpipe.required "title" Jdec.string |
| 148 | 154 | |> Jpipe.required "topic" (Jdec.list Jdec.value) |
| 149 | 155 | |> Jpipe.required "url" Jdec.string |
Test case
1 generated file · +13 −7test/inputs/json/misc/0cffa.json
Melmdefault / QuickType.elm+13 −7
| @@ -154,6 +154,12 @@ type alias Pagination = | ||
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | -- decoders and encoders |
| 157 | +optionalField key decoder fallback = | |
| 158 | + Jdec.dict Jdec.value | |
| 159 | + |> Jdec.andThen (\m -> | |
| 160 | + case Dict.get key m of | |
| 161 | + Nothing -> Jdec.succeed fallback | |
| 162 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 157 | 163 | |
| 158 | 164 | quickTypeToString : QuickType -> String |
| 159 | 165 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -192,7 +198,7 @@ datum = | ||
| 192 | 198 | |> Jpipe.required "source_tld" Jdec.string |
| 193 | 199 | |> Jpipe.required "trending_datetime" Jdec.string |
| 194 | 200 | |> Jpipe.required "url" Jdec.string |
| 195 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 201 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 196 | 202 | |> Jpipe.required "username" username |
| 197 | 203 | |
| 198 | 204 | encodeDatum : Datum -> Jenc.Value |
| @@ -256,7 +262,7 @@ images = | ||
| 256 | 262 | |> Jpipe.required "preview" downsizedSmall |
| 257 | 263 | |> Jpipe.required "preview_gif" the480WStill |
| 258 | 264 | |> Jpipe.required "preview_webp" the480WStill |
| 259 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 265 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 260 | 266 | |
| 261 | 267 | encodeImages : Images -> Jenc.Value |
| 262 | 268 | encodeImages x = |
| @@ -290,7 +296,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 290 | 296 | the480WStill = |
| 291 | 297 | Jdec.succeed The480_WStill |
| 292 | 298 | |> Jpipe.required "height" Jdec.string |
| 293 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 299 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 294 | 300 | |> Jpipe.required "url" Jdec.string |
| 295 | 301 | |> Jpipe.required "width" Jdec.string |
| 296 | 302 | |
| @@ -323,11 +329,11 @@ encodeDownsizedSmall x = | ||
| 323 | 329 | fixedHeight : Jdec.Decoder FixedHeight |
| 324 | 330 | fixedHeight = |
| 325 | 331 | Jdec.succeed FixedHeight |
| 326 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 327 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 332 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 333 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 328 | 334 | |> Jpipe.required "height" Jdec.string |
| 329 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 330 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 335 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 336 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 331 | 337 | |> Jpipe.required "size" Jdec.string |
| 332 | 338 | |> Jpipe.required "url" Jdec.string |
| 333 | 339 | |> Jpipe.required "webp" Jdec.string |
Test case
1 generated file · +8 −2test/inputs/json/misc/0e0c2.json
Melmdefault / QuickType.elm+8 −2
| @@ -114,6 +114,12 @@ type alias VoteScore = | ||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | -- decoders and encoders |
| 117 | +optionalField key decoder fallback = | |
| 118 | + Jdec.dict Jdec.value | |
| 119 | + |> Jdec.andThen (\m -> | |
| 120 | + case Dict.get key m of | |
| 121 | + Nothing -> Jdec.succeed fallback | |
| 122 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 117 | 123 | |
| 118 | 124 | quickTypeToString : QuickType -> String |
| 119 | 125 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -123,7 +129,7 @@ quickType = | ||
| 123 | 129 | Jdec.succeed QuickType |
| 124 | 130 | |> Jpipe.required "count" Jdec.int |
| 125 | 131 | |> Jpipe.required "next" Jdec.string |
| 126 | - |> Jpipe.optional "previous" (Jdec.null ()) () | |
| 132 | + |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ()) | |
| 127 | 133 | |> Jpipe.required "results" (Jdec.list result) |
| 128 | 134 | |
| 129 | 135 | encodeQuickType : QuickType -> Jenc.Value |
| @@ -148,7 +154,7 @@ result = | ||
| 148 | 154 | |> Jpipe.required "language" resultLanguage |
| 149 | 155 | |> Jpipe.required "release_date" Jdec.string |
| 150 | 156 | |> Jpipe.required "stars" Jdec.int |
| 151 | - |> Jpipe.optional "tags" (Jdec.nullable (Jdec.list Jdec.value)) Nothing | |
| 157 | + |> Jpipe.custom (optionalField "tags" (Jdec.nullable (Jdec.list Jdec.value)) Nothing) | |
| 152 | 158 | |> Jpipe.required "title" Jdec.string |
| 153 | 159 | |> Jpipe.required "videos" (Jdec.list video) |
| 154 | 160 | |> Jpipe.required "vote_score" voteScore |
Test case
1 generated file · +6 −0test/inputs/json/misc/0fecf.json
Melmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/10be4.json
Melmdefault / QuickType.elm+8 −2
| @@ -104,6 +104,12 @@ type Title | ||
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | -- decoders and encoders |
| 107 | +optionalField key decoder fallback = | |
| 108 | + Jdec.dict Jdec.value | |
| 109 | + |> Jdec.andThen (\m -> | |
| 110 | + case Dict.get key m of | |
| 111 | + Nothing -> Jdec.succeed fallback | |
| 112 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 107 | 113 | |
| 108 | 114 | quickType : Jdec.Decoder QuickType |
| 109 | 115 | quickType = Jdec.list quickTypeElement |
| @@ -120,7 +126,7 @@ quickTypeElement = | ||
| 120 | 126 | |> Jpipe.required "links" (Jdec.list link) |
| 121 | 127 | |> Jpipe.required "name" Jdec.string |
| 122 | 128 | |> Jpipe.required "other_names" (Jdec.list otherName) |
| 123 | - |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing | |
| 129 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing) | |
| 124 | 130 | |> Jpipe.required "text" (Jdec.list text) |
| 125 | 131 | |
| 126 | 132 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| @@ -241,7 +247,7 @@ otherName : Jdec.Decoder OtherName | ||
| 241 | 247 | otherName = |
| 242 | 248 | Jdec.succeed OtherName |
| 243 | 249 | |> Jpipe.required "name" Jdec.string |
| 244 | - |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing | |
| 250 | + |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing) | |
| 245 | 251 | |
| 246 | 252 | encodeOtherName : OtherName -> Jenc.Value |
| 247 | 253 | encodeOtherName x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/112b5.json
Melmdefault / QuickType.elm+6 −0
| @@ -43,6 +43,12 @@ type alias Headers = | ||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | -- decoders and encoders |
| 46 | +optionalField key decoder fallback = | |
| 47 | + Jdec.dict Jdec.value | |
| 48 | + |> Jdec.andThen (\m -> | |
| 49 | + case Dict.get key m of | |
| 50 | + Nothing -> Jdec.succeed fallback | |
| 51 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 46 | 52 | |
| 47 | 53 | quickTypeToString : QuickType -> String |
| 48 | 54 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +14 −8test/inputs/json/misc/127a1.json
Melmdefault / QuickType.elm+14 −8
| @@ -153,6 +153,12 @@ type alias Pagination = | ||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | -- decoders and encoders |
| 156 | +optionalField key decoder fallback = | |
| 157 | + Jdec.dict Jdec.value | |
| 158 | + |> Jdec.andThen (\m -> | |
| 159 | + case Dict.get key m of | |
| 160 | + Nothing -> Jdec.succeed fallback | |
| 161 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 156 | 162 | |
| 157 | 163 | quickTypeToString : QuickType -> String |
| 158 | 164 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -191,7 +197,7 @@ datum = | ||
| 191 | 197 | |> Jpipe.required "source_tld" Jdec.string |
| 192 | 198 | |> Jpipe.required "trending_datetime" Jdec.string |
| 193 | 199 | |> Jpipe.required "url" Jdec.string |
| 194 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 200 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 195 | 201 | |> Jpipe.required "username" username |
| 196 | 202 | |
| 197 | 203 | encodeDatum : Datum -> Jenc.Value |
| @@ -255,7 +261,7 @@ images = | ||
| 255 | 261 | |> Jpipe.required "preview" downsizedSmall |
| 256 | 262 | |> Jpipe.required "preview_gif" the480WStill |
| 257 | 263 | |> Jpipe.required "preview_webp" the480WStill |
| 258 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 264 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 259 | 265 | |
| 260 | 266 | encodeImages : Images -> Jenc.Value |
| 261 | 267 | encodeImages x = |
| @@ -289,7 +295,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 289 | 295 | the480WStill = |
| 290 | 296 | Jdec.succeed The480_WStill |
| 291 | 297 | |> Jpipe.required "height" Jdec.string |
| 292 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 298 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 293 | 299 | |> Jpipe.required "url" Jdec.string |
| 294 | 300 | |> Jpipe.required "width" Jdec.string |
| 295 | 301 | |
| @@ -322,11 +328,11 @@ encodeDownsizedSmall x = | ||
| 322 | 328 | fixedHeight : Jdec.Decoder FixedHeight |
| 323 | 329 | fixedHeight = |
| 324 | 330 | Jdec.succeed FixedHeight |
| 325 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 326 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 331 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 332 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 327 | 333 | |> Jpipe.required "height" Jdec.string |
| 328 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 329 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 334 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 335 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 330 | 336 | |> Jpipe.required "size" Jdec.string |
| 331 | 337 | |> Jpipe.required "url" Jdec.string |
| 332 | 338 | |> Jpipe.required "webp" Jdec.string |
| @@ -381,7 +387,7 @@ user = | ||
| 381 | 387 | |> Jpipe.required "banner_url" Jdec.string |
| 382 | 388 | |> Jpipe.required "display_name" Jdec.string |
| 383 | 389 | |> Jpipe.required "profile_url" Jdec.string |
| 384 | - |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing | |
| 390 | + |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing) | |
| 385 | 391 | |> Jpipe.required "username" username |
| 386 | 392 | |
| 387 | 393 | encodeUser : User -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/13d8d.json
Melmdefault / QuickType.elm+6 −0
| @@ -57,6 +57,12 @@ type alias OutcomeStatus = | ||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | -- decoders and encoders |
| 60 | +optionalField key decoder fallback = | |
| 61 | + Jdec.dict Jdec.value | |
| 62 | + |> Jdec.andThen (\m -> | |
| 63 | + case Dict.get key m of | |
| 64 | + Nothing -> Jdec.succeed fallback | |
| 65 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 60 | 66 | |
| 61 | 67 | quickType : Jdec.Decoder QuickType |
| 62 | 68 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/14d38.json
Melmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type alias Headers = | ||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/167d6.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/16bc5.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/176f1.json
Melmdefault / QuickType.elm+8 −2
| @@ -56,6 +56,12 @@ type alias Footnote = | ||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | -- decoders and encoders |
| 59 | +optionalField key decoder fallback = | |
| 60 | + Jdec.dict Jdec.value | |
| 61 | + |> Jdec.andThen (\m -> | |
| 62 | + case Dict.get key m of | |
| 63 | + Nothing -> Jdec.succeed fallback | |
| 64 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 59 | 65 | |
| 60 | 66 | quickTypeToString : QuickType -> String |
| 61 | 67 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -123,8 +129,8 @@ encodeDatum x = | ||
| 123 | 129 | footnote : Jdec.Decoder Footnote |
| 124 | 130 | footnote = |
| 125 | 131 | Jdec.succeed Footnote |
| 126 | - |> Jpipe.optional "code" (Jdec.nullable Jdec.string) Nothing | |
| 127 | - |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing | |
| 132 | + |> Jpipe.custom (optionalField "code" (Jdec.nullable Jdec.string) Nothing) | |
| 133 | + |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing) | |
| 128 | 134 | |
| 129 | 135 | encodeFootnote : Footnote -> Jenc.Value |
| 130 | 136 | encodeFootnote x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/1a7f5.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/1b28c.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +16 −10test/inputs/json/misc/1b409.json
Melmdefault / QuickType.elm+16 −10
| @@ -129,6 +129,12 @@ type Title | ||
| 129 | 129 | | Commish |
| 130 | 130 | |
| 131 | 131 | -- decoders and encoders |
| 132 | +optionalField key decoder fallback = | |
| 133 | + Jdec.dict Jdec.value | |
| 134 | + |> Jdec.andThen (\m -> | |
| 135 | + case Dict.get key m of | |
| 136 | + Nothing -> Jdec.succeed fallback | |
| 137 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 132 | 138 | |
| 133 | 139 | quickTypeToString : QuickType -> String |
| 134 | 140 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -164,7 +170,7 @@ encodeMeta x = | ||
| 164 | 170 | object : Jdec.Decoder Object |
| 165 | 171 | object = |
| 166 | 172 | Jdec.succeed Object |
| 167 | - |> Jpipe.optional "caucus" (Jdec.null ()) () | |
| 173 | + |> Jpipe.custom (optionalField "caucus" (Jdec.null ()) ()) | |
| 168 | 174 | |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int) |
| 169 | 175 | |> Jpipe.required "current" Jdec.bool |
| 170 | 176 | |> Jpipe.required "description" Jdec.string |
| @@ -172,14 +178,14 @@ object = | ||
| 172 | 178 | |> Jpipe.required "enddate" Jdec.string |
| 173 | 179 | |> Jpipe.required "extra" extra |
| 174 | 180 | |> Jpipe.required "id" Jdec.int |
| 175 | - |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing | |
| 181 | + |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing) | |
| 176 | 182 | |> Jpipe.required "party" party |
| 177 | 183 | |> Jpipe.required "person" person |
| 178 | 184 | |> Jpipe.required "phone" Jdec.string |
| 179 | 185 | |> Jpipe.required "role_type" roleType |
| 180 | 186 | |> Jpipe.required "role_type_label" roleTypeLabel |
| 181 | - |> Jpipe.optional "senator_class" (Jdec.null ()) () | |
| 182 | - |> Jpipe.optional "senator_rank" (Jdec.null ()) () | |
| 187 | + |> Jpipe.custom (optionalField "senator_class" (Jdec.null ()) ()) | |
| 188 | + |> Jpipe.custom (optionalField "senator_rank" (Jdec.null ()) ()) | |
| 183 | 189 | |> Jpipe.required "startdate" Jdec.string |
| 184 | 190 | |> Jpipe.required "state" Jdec.string |
| 185 | 191 | |> Jpipe.required "title" title |
| @@ -216,10 +222,10 @@ extra : Jdec.Decoder Extra | ||
| 216 | 222 | extra = |
| 217 | 223 | Jdec.succeed Extra |
| 218 | 224 | |> Jpipe.required "address" Jdec.string |
| 219 | - |> Jpipe.optional "contact_form" (Jdec.nullable Jdec.string) Nothing | |
| 220 | - |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing | |
| 225 | + |> Jpipe.custom (optionalField "contact_form" (Jdec.nullable Jdec.string) Nothing) | |
| 226 | + |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing) | |
| 221 | 227 | |> Jpipe.required "office" Jdec.string |
| 222 | - |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing | |
| 228 | + |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing) | |
| 223 | 229 | |
| 224 | 230 | encodeExtra : Extra -> Jenc.Value |
| 225 | 231 | encodeExtra x = |
| @@ -263,10 +269,10 @@ person = | ||
| 263 | 269 | |> Jpipe.required "namemod" namemod |
| 264 | 270 | |> Jpipe.required "nickname" Jdec.string |
| 265 | 271 | |> Jpipe.required "osid" Jdec.string |
| 266 | - |> Jpipe.optional "pvsid" (Jdec.nullable Jdec.string) Nothing | |
| 272 | + |> Jpipe.custom (optionalField "pvsid" (Jdec.nullable Jdec.string) Nothing) | |
| 267 | 273 | |> Jpipe.required "sortname" Jdec.string |
| 268 | - |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing | |
| 269 | - |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing | |
| 274 | + |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing) | |
| 275 | + |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing) | |
| 270 | 276 | |
| 271 | 277 | encodePerson : Person -> Jenc.Value |
| 272 | 278 | encodePerson x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/2465e.json
Melmdefault / QuickType.elm+6 −0
| @@ -112,6 +112,12 @@ type alias Schema = | ||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | -- decoders and encoders |
| 115 | +optionalField key decoder fallback = | |
| 116 | + Jdec.dict Jdec.value | |
| 117 | + |> Jdec.andThen (\m -> | |
| 118 | + case Dict.get key m of | |
| 119 | + Nothing -> Jdec.succeed fallback | |
| 120 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 115 | 121 | |
| 116 | 122 | quickTypeToString : QuickType -> String |
| 117 | 123 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/24f52.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/262f0.json
Melmdefault / QuickType.elm+6 −0
| @@ -144,6 +144,12 @@ type alias Wind = | ||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | -- decoders and encoders |
| 147 | +optionalField key decoder fallback = | |
| 148 | + Jdec.dict Jdec.value | |
| 149 | + |> Jdec.andThen (\m -> | |
| 150 | + case Dict.get key m of | |
| 151 | + Nothing -> Jdec.succeed fallback | |
| 152 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 147 | 153 | |
| 148 | 154 | quickTypeToString : QuickType -> String |
| 149 | 155 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +15 −9test/inputs/json/misc/26b49.json
Melmdefault / QuickType.elm+15 −9
| @@ -150,6 +150,12 @@ type alias Pagination = | ||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | -- decoders and encoders |
| 153 | +optionalField key decoder fallback = | |
| 154 | + Jdec.dict Jdec.value | |
| 155 | + |> Jdec.andThen (\m -> | |
| 156 | + case Dict.get key m of | |
| 157 | + Nothing -> Jdec.succeed fallback | |
| 158 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 153 | 159 | |
| 154 | 160 | quickTypeToString : QuickType -> String |
| 155 | 161 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -188,7 +194,7 @@ datum = | ||
| 188 | 194 | |> Jpipe.required "source_tld" Jdec.string |
| 189 | 195 | |> Jpipe.required "trending_datetime" Jdec.string |
| 190 | 196 | |> Jpipe.required "url" Jdec.string |
| 191 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 197 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 192 | 198 | |> Jpipe.required "username" Jdec.string |
| 193 | 199 | |
| 194 | 200 | encodeDatum : Datum -> Jenc.Value |
| @@ -245,7 +251,7 @@ images = | ||
| 245 | 251 | |> Jpipe.required "fixed_width_small" fixedHeight |
| 246 | 252 | |> Jpipe.required "fixed_width_small_still" the480WStill |
| 247 | 253 | |> Jpipe.required "fixed_width_still" the480WStill |
| 248 | - |> Jpipe.optional "hd" (Jdec.nullable downsizedSmall) Nothing | |
| 254 | + |> Jpipe.custom (optionalField "hd" (Jdec.nullable downsizedSmall) Nothing) | |
| 249 | 255 | |> Jpipe.required "looping" looping |
| 250 | 256 | |> Jpipe.required "original" fixedHeight |
| 251 | 257 | |> Jpipe.required "original_mp4" downsizedSmall |
| @@ -253,7 +259,7 @@ images = | ||
| 253 | 259 | |> Jpipe.required "preview" downsizedSmall |
| 254 | 260 | |> Jpipe.required "preview_gif" the480WStill |
| 255 | 261 | |> Jpipe.required "preview_webp" the480WStill |
| 256 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 262 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 257 | 263 | |
| 258 | 264 | encodeImages : Images -> Jenc.Value |
| 259 | 265 | encodeImages x = |
| @@ -288,7 +294,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 288 | 294 | the480WStill = |
| 289 | 295 | Jdec.succeed The480_WStill |
| 290 | 296 | |> Jpipe.required "height" Jdec.string |
| 291 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 297 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 292 | 298 | |> Jpipe.required "url" Jdec.string |
| 293 | 299 | |> Jpipe.required "width" Jdec.string |
| 294 | 300 | |
| @@ -321,11 +327,11 @@ encodeDownsizedSmall x = | ||
| 321 | 327 | fixedHeight : Jdec.Decoder FixedHeight |
| 322 | 328 | fixedHeight = |
| 323 | 329 | Jdec.succeed FixedHeight |
| 324 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 325 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 330 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 331 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 326 | 332 | |> Jpipe.required "height" Jdec.string |
| 327 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 328 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 333 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 334 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 329 | 335 | |> Jpipe.required "size" Jdec.string |
| 330 | 336 | |> Jpipe.required "url" Jdec.string |
| 331 | 337 | |> Jpipe.required "webp" Jdec.string |
| @@ -386,7 +392,7 @@ user = | ||
| 386 | 392 | |> Jpipe.required "banner_url" Jdec.string |
| 387 | 393 | |> Jpipe.required "display_name" Jdec.string |
| 388 | 394 | |> Jpipe.required "profile_url" Jdec.string |
| 389 | - |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing | |
| 395 | + |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing) | |
| 390 | 396 | |> Jpipe.required "username" Jdec.string |
| 391 | 397 | |
| 392 | 398 | encodeUser : User -> Jenc.Value |
Test case
1 generated file · +16 −10test/inputs/json/misc/26c9c.json
Melmdefault / QuickType.elm+16 −10
| @@ -241,6 +241,12 @@ type alias Expression = | ||
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | -- decoders and encoders |
| 244 | +optionalField key decoder fallback = | |
| 245 | + Jdec.dict Jdec.value | |
| 246 | + |> Jdec.andThen (\m -> | |
| 247 | + case Dict.get key m of | |
| 248 | + Nothing -> Jdec.succeed fallback | |
| 249 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 244 | 250 | |
| 245 | 251 | quickTypeToString : QuickType -> String |
| 246 | 252 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -371,17 +377,17 @@ encodeView x = | ||
| 371 | 377 | column : Jdec.Decoder Column |
| 372 | 378 | column = |
| 373 | 379 | Jdec.succeed Column |
| 374 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 380 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 375 | 381 | |> Jpipe.required "dataTypeName" Jdec.string |
| 376 | 382 | |> Jpipe.required "fieldName" Jdec.string |
| 377 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 383 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 378 | 384 | |> Jpipe.required "format" format |
| 379 | 385 | |> Jpipe.required "id" Jdec.int |
| 380 | 386 | |> Jpipe.required "name" Jdec.string |
| 381 | 387 | |> Jpipe.required "position" Jdec.int |
| 382 | 388 | |> Jpipe.required "renderTypeName" Jdec.string |
| 383 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 384 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 389 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 390 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 385 | 391 | |
| 386 | 392 | encodeColumn : Column -> Jenc.Value |
| 387 | 393 | encodeColumn x = |
| @@ -402,12 +408,12 @@ encodeColumn x = | ||
| 402 | 408 | cachedContents : Jdec.Decoder CachedContents |
| 403 | 409 | cachedContents = |
| 404 | 410 | Jdec.succeed CachedContents |
| 405 | - |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing | |
| 411 | + |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing) | |
| 406 | 412 | |> Jpipe.required "largest" Jdec.string |
| 407 | 413 | |> Jpipe.required "non_null" Jdec.int |
| 408 | 414 | |> Jpipe.required "null" Jdec.int |
| 409 | 415 | |> Jpipe.required "smallest" Jdec.string |
| 410 | - |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing | |
| 416 | + |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing) | |
| 411 | 417 | |> Jpipe.required "top" (Jdec.list top) |
| 412 | 418 | |
| 413 | 419 | encodeCachedContents : CachedContents -> Jenc.Value |
| @@ -438,10 +444,10 @@ encodeTop x = | ||
| 438 | 444 | format : Jdec.Decoder Format |
| 439 | 445 | format = |
| 440 | 446 | Jdec.succeed Format |
| 441 | - |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing | |
| 442 | - |> Jpipe.optional "noCommas" (Jdec.nullable Jdec.string) Nothing | |
| 443 | - |> Jpipe.optional "precisionStyle" (Jdec.nullable Jdec.string) Nothing | |
| 444 | - |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing | |
| 447 | + |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing) | |
| 448 | + |> Jpipe.custom (optionalField "noCommas" (Jdec.nullable Jdec.string) Nothing) | |
| 449 | + |> Jpipe.custom (optionalField "precisionStyle" (Jdec.nullable Jdec.string) Nothing) | |
| 450 | + |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing) | |
| 445 | 451 | |
| 446 | 452 | encodeFormat : Format -> Jenc.Value |
| 447 | 453 | encodeFormat x = |
Test case
1 generated file · +33 −27test/inputs/json/misc/27332.json
Melmdefault / QuickType.elm+33 −27
| @@ -198,6 +198,12 @@ type Kind | ||
| 198 | 198 | = T3 |
| 199 | 199 | |
| 200 | 200 | -- decoders and encoders |
| 201 | +optionalField key decoder fallback = | |
| 202 | + Jdec.dict Jdec.value | |
| 203 | + |> Jdec.andThen (\m -> | |
| 204 | + case Dict.get key m of | |
| 205 | + Nothing -> Jdec.succeed fallback | |
| 206 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 201 | 207 | |
| 202 | 208 | quickTypeToString : QuickType -> String |
| 203 | 209 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -219,7 +225,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 219 | 225 | quickTypeData = |
| 220 | 226 | Jdec.succeed QuickTypeData |
| 221 | 227 | |> Jpipe.required "after" Jdec.string |
| 222 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 228 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 223 | 229 | |> Jpipe.required "children" (Jdec.list child) |
| 224 | 230 | |> Jpipe.required "modhash" Jdec.string |
| 225 | 231 | |
| @@ -248,14 +254,14 @@ encodeChild x = | ||
| 248 | 254 | childData : Jdec.Decoder ChildData |
| 249 | 255 | childData = |
| 250 | 256 | Jdec.succeed ChildData |
| 251 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 252 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 257 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 258 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 253 | 259 | |> Jpipe.required "archived" Jdec.bool |
| 254 | 260 | |> Jpipe.required "author" Jdec.string |
| 255 | - |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 256 | - |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 257 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 258 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 261 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 262 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 263 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 264 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 259 | 265 | |> Jpipe.required "brand_safe" Jdec.bool |
| 260 | 266 | |> Jpipe.required "can_gild" Jdec.bool |
| 261 | 267 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -263,7 +269,7 @@ childData = | ||
| 263 | 269 | |> Jpipe.required "contest_mode" Jdec.bool |
| 264 | 270 | |> Jpipe.required "created" Jdec.float |
| 265 | 271 | |> Jpipe.required "created_utc" Jdec.float |
| 266 | - |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing | |
| 272 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing) | |
| 267 | 273 | |> Jpipe.required "domain" domain |
| 268 | 274 | |> Jpipe.required "downs" Jdec.int |
| 269 | 275 | |> Jpipe.required "edited" Jdec.bool |
| @@ -273,44 +279,44 @@ childData = | ||
| 273 | 279 | |> Jpipe.required "id" Jdec.string |
| 274 | 280 | |> Jpipe.required "is_self" Jdec.bool |
| 275 | 281 | |> Jpipe.required "is_video" Jdec.bool |
| 276 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 277 | - |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 278 | - |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 282 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 283 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 284 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 279 | 285 | |> Jpipe.required "locked" Jdec.bool |
| 280 | - |> Jpipe.optional "media" (Jdec.nullable media) Nothing | |
| 286 | + |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing) | |
| 281 | 287 | |> Jpipe.required "media_embed" mediaEmbed |
| 282 | 288 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 283 | 289 | |> Jpipe.required "name" Jdec.string |
| 284 | 290 | |> Jpipe.required "num_comments" Jdec.int |
| 285 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 291 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 286 | 292 | |> Jpipe.required "over_18" Jdec.bool |
| 287 | 293 | |> Jpipe.required "permalink" Jdec.string |
| 288 | - |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing | |
| 289 | - |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing | |
| 294 | + |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing) | |
| 295 | + |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing) | |
| 290 | 296 | |> Jpipe.required "quarantine" Jdec.bool |
| 291 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 292 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 297 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 298 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 293 | 299 | |> Jpipe.required "saved" Jdec.bool |
| 294 | 300 | |> Jpipe.required "score" Jdec.int |
| 295 | - |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing | |
| 301 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing) | |
| 296 | 302 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 297 | 303 | |> Jpipe.required "selftext" Jdec.string |
| 298 | - |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing | |
| 304 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing) | |
| 299 | 305 | |> Jpipe.required "spoiler" Jdec.bool |
| 300 | 306 | |> Jpipe.required "stickied" Jdec.bool |
| 301 | 307 | |> Jpipe.required "subreddit" subreddit |
| 302 | 308 | |> Jpipe.required "subreddit_id" subredditID |
| 303 | 309 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 304 | 310 | |> Jpipe.required "subreddit_type" subredditType |
| 305 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 311 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 306 | 312 | |> Jpipe.required "thumbnail" Jdec.string |
| 307 | - |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing | |
| 308 | - |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing | |
| 313 | + |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing) | |
| 314 | + |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing) | |
| 309 | 315 | |> Jpipe.required "title" Jdec.string |
| 310 | 316 | |> Jpipe.required "ups" Jdec.int |
| 311 | 317 | |> Jpipe.required "url" Jdec.string |
| 312 | 318 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 313 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 319 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 314 | 320 | |> Jpipe.required "visited" Jdec.bool |
| 315 | 321 | |
| 316 | 322 | encodeChildData : ChildData -> Jenc.Value |
| @@ -450,10 +456,10 @@ encodeOembed x = | ||
| 450 | 456 | mediaEmbed : Jdec.Decoder MediaEmbed |
| 451 | 457 | mediaEmbed = |
| 452 | 458 | Jdec.succeed MediaEmbed |
| 453 | - |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing | |
| 454 | - |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing | |
| 455 | - |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing | |
| 456 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 459 | + |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing) | |
| 460 | + |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing) | |
| 461 | + |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing) | |
| 462 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 457 | 463 | |
| 458 | 464 | encodeMediaEmbed : MediaEmbed -> Jenc.Value |
| 459 | 465 | encodeMediaEmbed x = |
Test case
1 generated file · +30 −24test/inputs/json/misc/29f47.json
Melmdefault / QuickType.elm+30 −24
| @@ -187,6 +187,12 @@ type Kind | ||
| 187 | 187 | = T3 |
| 188 | 188 | |
| 189 | 189 | -- decoders and encoders |
| 190 | +optionalField key decoder fallback = | |
| 191 | + Jdec.dict Jdec.value | |
| 192 | + |> Jdec.andThen (\m -> | |
| 193 | + case Dict.get key m of | |
| 194 | + Nothing -> Jdec.succeed fallback | |
| 195 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 190 | 196 | |
| 191 | 197 | quickTypeToString : QuickType -> String |
| 192 | 198 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -208,7 +214,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 208 | 214 | quickTypeData = |
| 209 | 215 | Jdec.succeed QuickTypeData |
| 210 | 216 | |> Jpipe.required "after" Jdec.string |
| 211 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 217 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 212 | 218 | |> Jpipe.required "children" (Jdec.list child) |
| 213 | 219 | |> Jpipe.required "modhash" Jdec.string |
| 214 | 220 | |
| @@ -237,14 +243,14 @@ encodeChild x = | ||
| 237 | 243 | childData : Jdec.Decoder ChildData |
| 238 | 244 | childData = |
| 239 | 245 | Jdec.succeed ChildData |
| 240 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 241 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 246 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 247 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 242 | 248 | |> Jpipe.required "archived" Jdec.bool |
| 243 | 249 | |> Jpipe.required "author" Jdec.string |
| 244 | - |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) () | |
| 245 | - |> Jpipe.optional "author_flair_text" (Jdec.null ()) () | |
| 246 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 247 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 250 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ()) | |
| 251 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ()) | |
| 252 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 253 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 248 | 254 | |> Jpipe.required "brand_safe" Jdec.bool |
| 249 | 255 | |> Jpipe.required "can_gild" Jdec.bool |
| 250 | 256 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -262,44 +268,44 @@ childData = | ||
| 262 | 268 | |> Jpipe.required "id" Jdec.string |
| 263 | 269 | |> Jpipe.required "is_self" Jdec.bool |
| 264 | 270 | |> Jpipe.required "is_video" Jdec.bool |
| 265 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 266 | - |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) () | |
| 267 | - |> Jpipe.optional "link_flair_text" (Jdec.null ()) () | |
| 271 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 272 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ()) | |
| 273 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ()) | |
| 268 | 274 | |> Jpipe.required "locked" Jdec.bool |
| 269 | - |> Jpipe.optional "media" (Jdec.null ()) () | |
| 275 | + |> Jpipe.custom (optionalField "media" (Jdec.null ()) ()) | |
| 270 | 276 | |> Jpipe.required "media_embed" mediaEmbed |
| 271 | 277 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 272 | 278 | |> Jpipe.required "name" Jdec.string |
| 273 | 279 | |> Jpipe.required "num_comments" Jdec.int |
| 274 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 280 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 275 | 281 | |> Jpipe.required "over_18" Jdec.bool |
| 276 | 282 | |> Jpipe.required "permalink" Jdec.string |
| 277 | - |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing | |
| 278 | - |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing | |
| 283 | + |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing) | |
| 284 | + |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing) | |
| 279 | 285 | |> Jpipe.required "quarantine" Jdec.bool |
| 280 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 281 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 286 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 287 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 282 | 288 | |> Jpipe.required "saved" Jdec.bool |
| 283 | 289 | |> Jpipe.required "score" Jdec.int |
| 284 | - |> Jpipe.optional "secure_media" (Jdec.null ()) () | |
| 290 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ()) | |
| 285 | 291 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 286 | 292 | |> Jpipe.required "selftext" Jdec.string |
| 287 | - |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing | |
| 293 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing) | |
| 288 | 294 | |> Jpipe.required "spoiler" Jdec.bool |
| 289 | 295 | |> Jpipe.required "stickied" Jdec.bool |
| 290 | 296 | |> Jpipe.required "subreddit" subreddit |
| 291 | 297 | |> Jpipe.required "subreddit_id" subredditID |
| 292 | 298 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 293 | 299 | |> Jpipe.required "subreddit_type" subredditType |
| 294 | - |> Jpipe.optional "suggested_sort" (Jdec.nullable Jdec.string) Nothing | |
| 300 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.nullable Jdec.string) Nothing) | |
| 295 | 301 | |> Jpipe.required "thumbnail" Jdec.string |
| 296 | - |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing | |
| 297 | - |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing | |
| 302 | + |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing) | |
| 303 | + |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing) | |
| 298 | 304 | |> Jpipe.required "title" Jdec.string |
| 299 | 305 | |> Jpipe.required "ups" Jdec.int |
| 300 | 306 | |> Jpipe.required "url" Jdec.string |
| 301 | 307 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 302 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 308 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 303 | 309 | |> Jpipe.required "visited" Jdec.bool |
| 304 | 310 | |
| 305 | 311 | encodeChildData : ChildData -> Jenc.Value |
| @@ -484,8 +490,8 @@ encodeSource x = | ||
| 484 | 490 | variants : Jdec.Decoder Variants |
| 485 | 491 | variants = |
| 486 | 492 | Jdec.succeed Variants |
| 487 | - |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing | |
| 488 | - |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing | |
| 493 | + |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing) | |
| 494 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing) | |
| 489 | 495 | |
| 490 | 496 | encodeVariants : Variants -> Jenc.Value |
| 491 | 497 | encodeVariants x = |
Test case
1 generated file · +13 −7test/inputs/json/misc/2d4e2.json
Melmdefault / QuickType.elm+13 −7
| @@ -149,6 +149,12 @@ type Title | ||
| 149 | 149 | = Sen |
| 150 | 150 | |
| 151 | 151 | -- decoders and encoders |
| 152 | +optionalField key decoder fallback = | |
| 153 | + Jdec.dict Jdec.value | |
| 154 | + |> Jdec.andThen (\m -> | |
| 155 | + case Dict.get key m of | |
| 156 | + Nothing -> Jdec.succeed fallback | |
| 157 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 152 | 158 | |
| 153 | 159 | quickTypeToString : QuickType -> String |
| 154 | 160 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -184,15 +190,15 @@ encodeMeta x = | ||
| 184 | 190 | object : Jdec.Decoder Object |
| 185 | 191 | object = |
| 186 | 192 | Jdec.succeed Object |
| 187 | - |> Jpipe.optional "caucus" (Jdec.nullable party) Nothing | |
| 193 | + |> Jpipe.custom (optionalField "caucus" (Jdec.nullable party) Nothing) | |
| 188 | 194 | |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int) |
| 189 | 195 | |> Jpipe.required "current" Jdec.bool |
| 190 | 196 | |> Jpipe.required "description" Jdec.string |
| 191 | - |> Jpipe.optional "district" (Jdec.null ()) () | |
| 197 | + |> Jpipe.custom (optionalField "district" (Jdec.null ()) ()) | |
| 192 | 198 | |> Jpipe.required "enddate" Jdec.string |
| 193 | 199 | |> Jpipe.required "extra" extra |
| 194 | 200 | |> Jpipe.required "id" Jdec.int |
| 195 | - |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing | |
| 201 | + |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing) | |
| 196 | 202 | |> Jpipe.required "party" party |
| 197 | 203 | |> Jpipe.required "person" person |
| 198 | 204 | |> Jpipe.required "phone" Jdec.string |
| @@ -258,9 +264,9 @@ extra = | ||
| 258 | 264 | Jdec.succeed Extra |
| 259 | 265 | |> Jpipe.required "address" Jdec.string |
| 260 | 266 | |> Jpipe.required "contact_form" Jdec.string |
| 261 | - |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing | |
| 267 | + |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing) | |
| 262 | 268 | |> Jpipe.required "office" Jdec.string |
| 263 | - |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing | |
| 269 | + |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing) | |
| 264 | 270 | |
| 265 | 271 | encodeExtra : Extra -> Jenc.Value |
| 266 | 272 | encodeExtra x = |
| @@ -291,8 +297,8 @@ person = | ||
| 291 | 297 | |> Jpipe.required "osid" Jdec.string |
| 292 | 298 | |> Jpipe.required "pvsid" Jdec.string |
| 293 | 299 | |> Jpipe.required "sortname" Jdec.string |
| 294 | - |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing | |
| 295 | - |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing | |
| 300 | + |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing) | |
| 301 | + |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing) | |
| 296 | 302 | |
| 297 | 303 | encodePerson : Person -> Jenc.Value |
| 298 | 304 | encodePerson x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/2df80.json
Melmdefault / QuickType.elm+6 −0
| @@ -108,6 +108,12 @@ type alias FluffyQuickType = | ||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | -- decoders and encoders |
| 111 | +optionalField key decoder fallback = | |
| 112 | + Jdec.dict Jdec.value | |
| 113 | + |> Jdec.andThen (\m -> | |
| 114 | + case Dict.get key m of | |
| 115 | + Nothing -> Jdec.succeed fallback | |
| 116 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 111 | 117 | |
| 112 | 118 | quickType : Jdec.Decoder QuickType |
| 113 | 119 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +12 −6test/inputs/json/misc/31189.json
Melmdefault / QuickType.elm+12 −6
| @@ -53,6 +53,12 @@ type alias Rates = | ||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | -- decoders and encoders |
| 56 | +optionalField key decoder fallback = | |
| 57 | + Jdec.dict Jdec.value | |
| 58 | + |> Jdec.andThen (\m -> | |
| 59 | + case Dict.get key m of | |
| 60 | + Nothing -> Jdec.succeed fallback | |
| 61 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 56 | 62 | |
| 57 | 63 | quickTypeToString : QuickType -> String |
| 58 | 64 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -62,7 +68,7 @@ quickType = | ||
| 62 | 68 | Jdec.succeed QuickType |
| 63 | 69 | |> Jpipe.required "details" Jdec.string |
| 64 | 70 | |> Jpipe.required "rates" (Jdec.list rate) |
| 65 | - |> Jpipe.optional "version" (Jdec.null ()) () | |
| 71 | + |> Jpipe.custom (optionalField "version" (Jdec.null ()) ()) | |
| 66 | 72 | |
| 67 | 73 | encodeQuickType : QuickType -> Jenc.Value |
| 68 | 74 | encodeQuickType x = |
| @@ -105,12 +111,12 @@ encodePeriod x = | ||
| 105 | 111 | rates : Jdec.Decoder Rates |
| 106 | 112 | rates = |
| 107 | 113 | Jdec.succeed Rates |
| 108 | - |> Jpipe.optional "parking" (Jdec.nullable Jdec.float) Nothing | |
| 109 | - |> Jpipe.optional "reduced" (Jdec.nullable Jdec.float) Nothing | |
| 110 | - |> Jpipe.optional "reduced1" (Jdec.nullable Jdec.float) Nothing | |
| 111 | - |> Jpipe.optional "reduced2" (Jdec.nullable Jdec.float) Nothing | |
| 114 | + |> Jpipe.custom (optionalField "parking" (Jdec.nullable Jdec.float) Nothing) | |
| 115 | + |> Jpipe.custom (optionalField "reduced" (Jdec.nullable Jdec.float) Nothing) | |
| 116 | + |> Jpipe.custom (optionalField "reduced1" (Jdec.nullable Jdec.float) Nothing) | |
| 117 | + |> Jpipe.custom (optionalField "reduced2" (Jdec.nullable Jdec.float) Nothing) | |
| 112 | 118 | |> Jpipe.required "standard" Jdec.float |
| 113 | - |> Jpipe.optional "super_reduced" (Jdec.nullable Jdec.float) Nothing | |
| 119 | + |> Jpipe.custom (optionalField "super_reduced" (Jdec.nullable Jdec.float) Nothing) | |
| 114 | 120 | |
| 115 | 121 | encodeRates : Rates -> Jenc.Value |
| 116 | 122 | encodeRates x = |
Test case
1 generated file · +13 −7test/inputs/json/misc/32431.json
Melmdefault / QuickType.elm+13 −7
| @@ -107,6 +107,12 @@ type alias Metadata = | ||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | -- decoders and encoders |
| 110 | +optionalField key decoder fallback = | |
| 111 | + Jdec.dict Jdec.value | |
| 112 | + |> Jdec.andThen (\m -> | |
| 113 | + case Dict.get key m of | |
| 114 | + Nothing -> Jdec.succeed fallback | |
| 115 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 110 | 116 | |
| 111 | 117 | quickTypeToString : QuickType -> String |
| 112 | 118 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -187,19 +193,19 @@ encodeGeometryType x = case x of | ||
| 187 | 193 | properties : Jdec.Decoder Properties |
| 188 | 194 | properties = |
| 189 | 195 | Jdec.succeed Properties |
| 190 | - |> Jpipe.optional "alert" (Jdec.null ()) () | |
| 191 | - |> Jpipe.optional "cdi" (Jdec.null ()) () | |
| 196 | + |> Jpipe.custom (optionalField "alert" (Jdec.null ()) ()) | |
| 197 | + |> Jpipe.custom (optionalField "cdi" (Jdec.null ()) ()) | |
| 192 | 198 | |> Jpipe.required "code" Jdec.string |
| 193 | 199 | |> Jpipe.required "detail" Jdec.string |
| 194 | - |> Jpipe.optional "dmin" (Jdec.nullable Jdec.float) Nothing | |
| 195 | - |> Jpipe.optional "felt" (Jdec.null ()) () | |
| 196 | - |> Jpipe.optional "gap" (Jdec.nullable Jdec.int) Nothing | |
| 200 | + |> Jpipe.custom (optionalField "dmin" (Jdec.nullable Jdec.float) Nothing) | |
| 201 | + |> Jpipe.custom (optionalField "felt" (Jdec.null ()) ()) | |
| 202 | + |> Jpipe.custom (optionalField "gap" (Jdec.nullable Jdec.int) Nothing) | |
| 197 | 203 | |> Jpipe.required "ids" Jdec.string |
| 198 | 204 | |> Jpipe.required "mag" Jdec.float |
| 199 | 205 | |> Jpipe.required "magType" magType |
| 200 | - |> Jpipe.optional "mmi" (Jdec.null ()) () | |
| 206 | + |> Jpipe.custom (optionalField "mmi" (Jdec.null ()) ()) | |
| 201 | 207 | |> Jpipe.required "net" Jdec.string |
| 202 | - |> Jpipe.optional "nst" (Jdec.nullable Jdec.int) Nothing | |
| 208 | + |> Jpipe.custom (optionalField "nst" (Jdec.nullable Jdec.int) Nothing) | |
| 203 | 209 | |> Jpipe.required "place" Jdec.string |
| 204 | 210 | |> Jpipe.required "type" propertiesType |
| 205 | 211 | |> Jpipe.required "rms" Jdec.float |
Test case
1 generated file · +7 −1test/inputs/json/misc/32d5c.json
Melmdefault / QuickType.elm+7 −1
| @@ -37,6 +37,12 @@ type alias QuickTypeElement = | ||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | -- decoders and encoders |
| 40 | +optionalField key decoder fallback = | |
| 41 | + Jdec.dict Jdec.value | |
| 42 | + |> Jdec.andThen (\m -> | |
| 43 | + case Dict.get key m of | |
| 44 | + Nothing -> Jdec.succeed fallback | |
| 45 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 40 | 46 | |
| 41 | 47 | quickType : Jdec.Decoder QuickType |
| 42 | 48 | quickType = Jdec.list quickTypeElement |
| @@ -47,7 +53,7 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r) | ||
| 47 | 53 | quickTypeElement : Jdec.Decoder QuickTypeElement |
| 48 | 54 | quickTypeElement = |
| 49 | 55 | Jdec.succeed QuickTypeElement |
| 50 | - |> Jpipe.optional "BirthDate" (Jdec.nullable Jdec.string) Nothing | |
| 56 | + |> Jpipe.custom (optionalField "BirthDate" (Jdec.nullable Jdec.string) Nothing) | |
| 51 | 57 | |> Jpipe.required "BirthDateIsProtected" Jdec.bool |
| 52 | 58 | |> Jpipe.required "GenderTypeID" Jdec.int |
| 53 | 59 | |> Jpipe.required "Notes" Jdec.string |
Test case
1 generated file · +26 −20test/inputs/json/misc/337ed.json
Melmdefault / QuickType.elm+26 −20
| @@ -102,6 +102,12 @@ type ResultType | ||
| 102 | 102 | | FinancialDataTradeAssociation |
| 103 | 103 | |
| 104 | 104 | -- decoders and encoders |
| 105 | +optionalField key decoder fallback = | |
| 106 | + Jdec.dict Jdec.value | |
| 107 | + |> Jdec.andThen (\m -> | |
| 108 | + case Dict.get key m of | |
| 109 | + Nothing -> Jdec.succeed fallback | |
| 110 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 105 | 111 | |
| 106 | 112 | quickTypeToString : QuickType -> String |
| 107 | 113 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -142,36 +148,36 @@ encodeFacets x = | ||
| 142 | 148 | result : Jdec.Decoder Result |
| 143 | 149 | result = |
| 144 | 150 | Jdec.succeed Result |
| 145 | - |> Jpipe.optional "cost_absolute" (Jdec.nullable Jdec.int) Nothing | |
| 146 | - |> Jpipe.optional "cost_max" (Jdec.nullable Jdec.int) Nothing | |
| 147 | - |> Jpipe.optional "cost_min" (Jdec.nullable Jdec.int) Nothing | |
| 151 | + |> Jpipe.custom (optionalField "cost_absolute" (Jdec.nullable Jdec.int) Nothing) | |
| 152 | + |> Jpipe.custom (optionalField "cost_max" (Jdec.nullable Jdec.int) Nothing) | |
| 153 | + |> Jpipe.custom (optionalField "cost_min" (Jdec.nullable Jdec.int) Nothing) | |
| 148 | 154 | |> Jpipe.required "created_at" Jdec.string |
| 149 | 155 | |> Jpipe.required "customIncomes" (Jdec.list customIncome) |
| 150 | - |> Jpipe.optional "direct_rep_costs_max" (Jdec.null ()) () | |
| 151 | - |> Jpipe.optional "direct_rep_costs_min" (Jdec.null ()) () | |
| 156 | + |> Jpipe.custom (optionalField "direct_rep_costs_max" (Jdec.null ()) ()) | |
| 157 | + |> Jpipe.custom (optionalField "direct_rep_costs_min" (Jdec.null ()) ()) | |
| 152 | 158 | |> Jpipe.required "end_date" Jdec.string |
| 153 | 159 | |> Jpipe.required "eur_sources_grants" Jdec.int |
| 154 | - |> Jpipe.optional "eur_sources_grants_src" (Jdec.nullable Jdec.string) Nothing | |
| 160 | + |> Jpipe.custom (optionalField "eur_sources_grants_src" (Jdec.nullable Jdec.string) Nothing) | |
| 155 | 161 | |> Jpipe.required "eur_sources_procurement" Jdec.int |
| 156 | - |> Jpipe.optional "eur_sources_procurement_src" (Jdec.nullable Jdec.string) Nothing | |
| 162 | + |> Jpipe.custom (optionalField "eur_sources_procurement_src" (Jdec.nullable Jdec.string) Nothing) | |
| 157 | 163 | |> Jpipe.required "id" Jdec.string |
| 158 | - |> Jpipe.optional "new_organisation" (Jdec.null ()) () | |
| 159 | - |> Jpipe.optional "no_clients" (Jdec.nullable Jdec.string) Nothing | |
| 160 | - |> Jpipe.optional "other_financial_information" (Jdec.nullable Jdec.string) Nothing | |
| 161 | - |> Jpipe.optional "other_sources_contributions" (Jdec.nullable Jdec.int) Nothing | |
| 162 | - |> Jpipe.optional "other_sources_donation" (Jdec.nullable Jdec.int) Nothing | |
| 163 | - |> Jpipe.optional "other_sources_total" (Jdec.nullable Jdec.int) Nothing | |
| 164 | - |> Jpipe.optional "public_financing_infranational" (Jdec.nullable Jdec.int) Nothing | |
| 165 | - |> Jpipe.optional "public_financing_national" (Jdec.nullable Jdec.int) Nothing | |
| 166 | - |> Jpipe.optional "public_financing_total" (Jdec.nullable Jdec.int) Nothing | |
| 164 | + |> Jpipe.custom (optionalField "new_organisation" (Jdec.null ()) ()) | |
| 165 | + |> Jpipe.custom (optionalField "no_clients" (Jdec.nullable Jdec.string) Nothing) | |
| 166 | + |> Jpipe.custom (optionalField "other_financial_information" (Jdec.nullable Jdec.string) Nothing) | |
| 167 | + |> Jpipe.custom (optionalField "other_sources_contributions" (Jdec.nullable Jdec.int) Nothing) | |
| 168 | + |> Jpipe.custom (optionalField "other_sources_donation" (Jdec.nullable Jdec.int) Nothing) | |
| 169 | + |> Jpipe.custom (optionalField "other_sources_total" (Jdec.nullable Jdec.int) Nothing) | |
| 170 | + |> Jpipe.custom (optionalField "public_financing_infranational" (Jdec.nullable Jdec.int) Nothing) | |
| 171 | + |> Jpipe.custom (optionalField "public_financing_national" (Jdec.nullable Jdec.int) Nothing) | |
| 172 | + |> Jpipe.custom (optionalField "public_financing_total" (Jdec.nullable Jdec.int) Nothing) | |
| 167 | 173 | |> Jpipe.required "representative" Jdec.string |
| 168 | 174 | |> Jpipe.required "type" resultType |
| 169 | 175 | |> Jpipe.required "start_date" Jdec.string |
| 170 | 176 | |> Jpipe.required "status" status |
| 171 | - |> Jpipe.optional "total_budget" (Jdec.nullable Jdec.int) Nothing | |
| 172 | - |> Jpipe.optional "turnover_absolute" (Jdec.nullable Jdec.int) Nothing | |
| 173 | - |> Jpipe.optional "turnover_max" (Jdec.nullable Jdec.int) Nothing | |
| 174 | - |> Jpipe.optional "turnover_min" (Jdec.nullable Jdec.int) Nothing | |
| 177 | + |> Jpipe.custom (optionalField "total_budget" (Jdec.nullable Jdec.int) Nothing) | |
| 178 | + |> Jpipe.custom (optionalField "turnover_absolute" (Jdec.nullable Jdec.int) Nothing) | |
| 179 | + |> Jpipe.custom (optionalField "turnover_max" (Jdec.nullable Jdec.int) Nothing) | |
| 180 | + |> Jpipe.custom (optionalField "turnover_min" (Jdec.nullable Jdec.int) Nothing) | |
| 175 | 181 | |> Jpipe.required "updated_at" Jdec.string |
| 176 | 182 | |> Jpipe.required "uri" Jdec.string |
Test case
1 generated file · +22 −16test/inputs/json/misc/33d2e.json
Melmdefault / QuickType.elm+22 −16
| @@ -81,6 +81,12 @@ type Category | ||
| 81 | 81 | | Economics |
| 82 | 82 | |
| 83 | 83 | -- decoders and encoders |
| 84 | +optionalField key decoder fallback = | |
| 85 | + Jdec.dict Jdec.value | |
| 86 | + |> Jdec.andThen (\m -> | |
| 87 | + case Dict.get key m of | |
| 88 | + Nothing -> Jdec.succeed fallback | |
| 89 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 84 | 90 | |
| 85 | 91 | quickTypeToString : QuickType -> String |
| 86 | 92 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -100,18 +106,18 @@ laureate : Jdec.Decoder Laureate | ||
| 100 | 106 | laureate = |
| 101 | 107 | Jdec.succeed Laureate |
| 102 | 108 | |> Jpipe.required "born" Jdec.string |
| 103 | - |> Jpipe.optional "bornCity" (Jdec.nullable Jdec.string) Nothing | |
| 104 | - |> Jpipe.optional "bornCountry" (Jdec.nullable Jdec.string) Nothing | |
| 105 | - |> Jpipe.optional "bornCountryCode" (Jdec.nullable Jdec.string) Nothing | |
| 109 | + |> Jpipe.custom (optionalField "bornCity" (Jdec.nullable Jdec.string) Nothing) | |
| 110 | + |> Jpipe.custom (optionalField "bornCountry" (Jdec.nullable Jdec.string) Nothing) | |
| 111 | + |> Jpipe.custom (optionalField "bornCountryCode" (Jdec.nullable Jdec.string) Nothing) | |
| 106 | 112 | |> Jpipe.required "died" Jdec.string |
| 107 | - |> Jpipe.optional "diedCity" (Jdec.nullable Jdec.string) Nothing | |
| 108 | - |> Jpipe.optional "diedCountry" (Jdec.nullable Jdec.string) Nothing | |
| 109 | - |> Jpipe.optional "diedCountryCode" (Jdec.nullable Jdec.string) Nothing | |
| 110 | - |> Jpipe.optional "firstname" (Jdec.nullable Jdec.string) Nothing | |
| 113 | + |> Jpipe.custom (optionalField "diedCity" (Jdec.nullable Jdec.string) Nothing) | |
| 114 | + |> Jpipe.custom (optionalField "diedCountry" (Jdec.nullable Jdec.string) Nothing) | |
| 115 | + |> Jpipe.custom (optionalField "diedCountryCode" (Jdec.nullable Jdec.string) Nothing) | |
| 116 | + |> Jpipe.custom (optionalField "firstname" (Jdec.nullable Jdec.string) Nothing) | |
| 111 | 117 | |> Jpipe.required "gender" gender |
| 112 | 118 | |> Jpipe.required "id" Jdec.string |
| 113 | 119 | |> Jpipe.required "prizes" (Jdec.list prize) |
| 114 | - |> Jpipe.optional "surname" (Jdec.nullable Jdec.string) Nothing | |
| 120 | + |> Jpipe.custom (optionalField "surname" (Jdec.nullable Jdec.string) Nothing) | |
| 115 | 121 | |
| 116 | 122 | encodeLaureate : Laureate -> Jenc.Value |
| 117 | 123 | encodeLaureate x = |
| @@ -152,11 +158,11 @@ prize : Jdec.Decoder Prize | ||
| 152 | 158 | prize = |
| 153 | 159 | Jdec.succeed Prize |
| 154 | 160 | |> Jpipe.required "affiliations" (Jdec.list affiliationElement) |
| 155 | - |> Jpipe.optional "category" (Jdec.nullable category) Nothing | |
| 156 | - |> Jpipe.optional "motivation" (Jdec.nullable Jdec.string) Nothing | |
| 157 | - |> Jpipe.optional "overallMotivation" (Jdec.nullable Jdec.string) Nothing | |
| 158 | - |> Jpipe.optional "share" (Jdec.nullable Jdec.string) Nothing | |
| 159 | - |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing | |
| 161 | + |> Jpipe.custom (optionalField "category" (Jdec.nullable category) Nothing) | |
| 162 | + |> Jpipe.custom (optionalField "motivation" (Jdec.nullable Jdec.string) Nothing) | |
| 163 | + |> Jpipe.custom (optionalField "overallMotivation" (Jdec.nullable Jdec.string) Nothing) | |
| 164 | + |> Jpipe.custom (optionalField "share" (Jdec.nullable Jdec.string) Nothing) | |
| 165 | + |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing) | |
| 160 | 166 | |
| 161 | 167 | encodePrize : Prize -> Jenc.Value |
| 162 | 168 | encodePrize x = |
| @@ -184,9 +190,9 @@ encodeAffiliationElement x = case x of | ||
| 184 | 190 | affiliationClass : Jdec.Decoder AffiliationClass |
| 185 | 191 | affiliationClass = |
| 186 | 192 | Jdec.succeed AffiliationClass |
| 187 | - |> Jpipe.optional "city" (Jdec.nullable Jdec.string) Nothing | |
| 188 | - |> Jpipe.optional "country" (Jdec.nullable Jdec.string) Nothing | |
| 189 | - |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing | |
| 193 | + |> Jpipe.custom (optionalField "city" (Jdec.nullable Jdec.string) Nothing) | |
| 194 | + |> Jpipe.custom (optionalField "country" (Jdec.nullable Jdec.string) Nothing) | |
| 195 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing) | |
| 190 | 196 | |
| 191 | 197 | encodeAffiliationClass : AffiliationClass -> Jenc.Value |
| 192 | 198 | encodeAffiliationClass x = |
Test case
1 generated file · +9 −3test/inputs/json/misc/34702.json
Melmdefault / QuickType.elm+9 −3
| @@ -126,6 +126,12 @@ type Region | ||
| 126 | 126 | | SouthernMetro |
| 127 | 127 | |
| 128 | 128 | -- decoders and encoders |
| 129 | +optionalField key decoder fallback = | |
| 130 | + Jdec.dict Jdec.value | |
| 131 | + |> Jdec.andThen (\m -> | |
| 132 | + case Dict.get key m of | |
| 133 | + Nothing -> Jdec.succeed fallback | |
| 134 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 129 | 135 | |
| 130 | 136 | quickTypeToString : QuickType -> String |
| 131 | 137 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -247,14 +253,14 @@ featureProperties = | ||
| 247 | 253 | Jdec.succeed FeatureProperties |
| 248 | 254 | |> Jpipe.required "division" Jdec.string |
| 249 | 255 | |> Jpipe.required "fax" Jdec.float |
| 250 | - |> Jpipe.optional "fire_ban_r" (Jdec.nullable fireBanR) Nothing | |
| 256 | + |> Jpipe.custom (optionalField "fire_ban_r" (Jdec.nullable fireBanR) Nothing) | |
| 251 | 257 | |> Jpipe.required "latitude" Jdec.float |
| 252 | 258 | |> Jpipe.required "local_govt" Jdec.string |
| 253 | 259 | |> Jpipe.required "longitude" Jdec.float |
| 254 | - |> Jpipe.optional "no" (Jdec.nullable Jdec.string) Nothing | |
| 260 | + |> Jpipe.custom (optionalField "no" (Jdec.nullable Jdec.string) Nothing) | |
| 255 | 261 | |> Jpipe.required "phone" Jdec.float |
| 256 | 262 | |> Jpipe.required "postcode" Jdec.int |
| 257 | - |> Jpipe.optional "type" (Jdec.nullable propertiesType) Nothing | |
| 263 | + |> Jpipe.custom (optionalField "type" (Jdec.nullable propertiesType) Nothing) | |
| 258 | 264 | |> Jpipe.required "psa" Jdec.string |
| 259 | 265 | |> Jpipe.required "region" region |
| 260 | 266 | |> Jpipe.required "station" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/3536b.json
Melmdefault / QuickType.elm+6 −0
| @@ -68,6 +68,12 @@ type alias Text = | ||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | -- decoders and encoders |
| 71 | +optionalField key decoder fallback = | |
| 72 | + Jdec.dict Jdec.value | |
| 73 | + |> Jdec.andThen (\m -> | |
| 74 | + case Dict.get key m of | |
| 75 | + Nothing -> Jdec.succeed fallback | |
| 76 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 71 | 77 | |
| 72 | 78 | quickType : Jdec.Decoder QuickType |
| 73 | 79 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/3659d.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/36d5d.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/3a6b3.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/3e9a3.json
Melmdefault / QuickType.elm+8 −2
| @@ -56,6 +56,12 @@ type alias Footnote = | ||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | -- decoders and encoders |
| 59 | +optionalField key decoder fallback = | |
| 60 | + Jdec.dict Jdec.value | |
| 61 | + |> Jdec.andThen (\m -> | |
| 62 | + case Dict.get key m of | |
| 63 | + Nothing -> Jdec.succeed fallback | |
| 64 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 59 | 65 | |
| 60 | 66 | quickTypeToString : QuickType -> String |
| 61 | 67 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -123,8 +129,8 @@ encodeDatum x = | ||
| 123 | 129 | footnote : Jdec.Decoder Footnote |
| 124 | 130 | footnote = |
| 125 | 131 | Jdec.succeed Footnote |
| 126 | - |> Jpipe.optional "code" (Jdec.nullable Jdec.string) Nothing | |
| 127 | - |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing | |
| 132 | + |> Jpipe.custom (optionalField "code" (Jdec.nullable Jdec.string) Nothing) | |
| 133 | + |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing) | |
| 128 | 134 | |
| 129 | 135 | encodeFootnote : Footnote -> Jenc.Value |
| 130 | 136 | encodeFootnote x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/3f1ce.json
Melmdefault / QuickType.elm+6 −0
| @@ -142,6 +142,12 @@ type alias Wind = | ||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | -- decoders and encoders |
| 145 | +optionalField key decoder fallback = | |
| 146 | + Jdec.dict Jdec.value | |
| 147 | + |> Jdec.andThen (\m -> | |
| 148 | + case Dict.get key m of | |
| 149 | + Nothing -> Jdec.succeed fallback | |
| 150 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 145 | 151 | |
| 146 | 152 | quickTypeToString : QuickType -> String |
| 147 | 153 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +15 −9test/inputs/json/misc/421d4.json
Melmdefault / QuickType.elm+15 −9
| @@ -158,6 +158,12 @@ type alias Owner = | ||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | -- decoders and encoders |
| 161 | +optionalField key decoder fallback = | |
| 162 | + Jdec.dict Jdec.value | |
| 163 | + |> Jdec.andThen (\m -> | |
| 164 | + case Dict.get key m of | |
| 165 | + Nothing -> Jdec.succeed fallback | |
| 166 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 161 | 167 | |
| 162 | 168 | quickTypeToString : QuickType -> String |
| 163 | 169 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -292,17 +298,17 @@ encodeView x = | ||
| 292 | 298 | column : Jdec.Decoder Column |
| 293 | 299 | column = |
| 294 | 300 | Jdec.succeed Column |
| 295 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 301 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 296 | 302 | |> Jpipe.required "dataTypeName" Jdec.string |
| 297 | 303 | |> Jpipe.required "fieldName" Jdec.string |
| 298 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 304 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 299 | 305 | |> Jpipe.required "format" query |
| 300 | 306 | |> Jpipe.required "id" Jdec.int |
| 301 | 307 | |> Jpipe.required "name" Jdec.string |
| 302 | 308 | |> Jpipe.required "position" Jdec.int |
| 303 | 309 | |> Jpipe.required "renderTypeName" Jdec.string |
| 304 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 305 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 310 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 311 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 306 | 312 | |
| 307 | 313 | encodeColumn : Column -> Jenc.Value |
| 308 | 314 | encodeColumn x = |
| @@ -323,13 +329,13 @@ encodeColumn x = | ||
| 323 | 329 | cachedContents : Jdec.Decoder CachedContents |
| 324 | 330 | cachedContents = |
| 325 | 331 | Jdec.succeed CachedContents |
| 326 | - |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing | |
| 327 | - |> Jpipe.optional "largest" (Jdec.nullable Jdec.string) Nothing | |
| 332 | + |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing) | |
| 333 | + |> Jpipe.custom (optionalField "largest" (Jdec.nullable Jdec.string) Nothing) | |
| 328 | 334 | |> Jpipe.required "non_null" Jdec.int |
| 329 | 335 | |> Jpipe.required "null" Jdec.int |
| 330 | - |> Jpipe.optional "smallest" (Jdec.nullable Jdec.string) Nothing | |
| 331 | - |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing | |
| 332 | - |> Jpipe.optional "top" (Jdec.nullable (Jdec.list top)) Nothing | |
| 336 | + |> Jpipe.custom (optionalField "smallest" (Jdec.nullable Jdec.string) Nothing) | |
| 337 | + |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing) | |
| 338 | + |> Jpipe.custom (optionalField "top" (Jdec.nullable (Jdec.list top)) Nothing) | |
| 333 | 339 | |
| 334 | 340 | encodeCachedContents : CachedContents -> Jenc.Value |
| 335 | 341 | encodeCachedContents x = |
Test case
1 generated file · +11 −5test/inputs/json/misc/437e7.json
Melmdefault / QuickType.elm+11 −5
| @@ -147,6 +147,12 @@ type alias Pagination = | ||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | -- decoders and encoders |
| 150 | +optionalField key decoder fallback = | |
| 151 | + Jdec.dict Jdec.value | |
| 152 | + |> Jdec.andThen (\m -> | |
| 153 | + case Dict.get key m of | |
| 154 | + Nothing -> Jdec.succeed fallback | |
| 155 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 150 | 156 | |
| 151 | 157 | quickTypeToString : QuickType -> String |
| 152 | 158 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -185,7 +191,7 @@ datum = | ||
| 185 | 191 | |> Jpipe.required "source_tld" Jdec.string |
| 186 | 192 | |> Jpipe.required "trending_datetime" Jdec.string |
| 187 | 193 | |> Jpipe.required "url" Jdec.string |
| 188 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 194 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 189 | 195 | |> Jpipe.required "username" Jdec.string |
| 190 | 196 | |
| 191 | 197 | encodeDatum : Datum -> Jenc.Value |
| @@ -281,7 +287,7 @@ downsized : Jdec.Decoder Downsized | ||
| 281 | 287 | downsized = |
| 282 | 288 | Jdec.succeed Downsized |
| 283 | 289 | |> Jpipe.required "height" Jdec.string |
| 284 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 290 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 285 | 291 | |> Jpipe.required "url" Jdec.string |
| 286 | 292 | |> Jpipe.required "width" Jdec.string |
| 287 | 293 | |
| @@ -314,10 +320,10 @@ encodeDownsizedSmall x = | ||
| 314 | 320 | fixedHeight : Jdec.Decoder FixedHeight |
| 315 | 321 | fixedHeight = |
| 316 | 322 | Jdec.succeed FixedHeight |
| 317 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 323 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 318 | 324 | |> Jpipe.required "height" Jdec.string |
| 319 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 320 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 325 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 326 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 321 | 327 | |> Jpipe.required "size" Jdec.string |
| 322 | 328 | |> Jpipe.required "url" Jdec.string |
| 323 | 329 | |> Jpipe.required "webp" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/43970.json
Melmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type alias QuickTypeElement = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickType : Jdec.Decoder QuickType |
| 37 | 43 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/43eaf.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/458db.json
Melmdefault / QuickType.elm+6 −0
| @@ -75,6 +75,12 @@ type Name | ||
| 75 | 75 | = OfficeOnViolenceAgainstWomen |
| 76 | 76 | |
| 77 | 77 | -- decoders and encoders |
| 78 | +optionalField key decoder fallback = | |
| 79 | + Jdec.dict Jdec.value | |
| 80 | + |> Jdec.andThen (\m -> | |
| 81 | + case Dict.get key m of | |
| 82 | + Nothing -> Jdec.succeed fallback | |
| 83 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 78 | 84 | |
| 79 | 85 | quickTypeToString : QuickType -> String |
| 80 | 86 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/4961a.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/4a0d7.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/4a455.json
Melmdefault / QuickType.elm+6 −0
| @@ -78,6 +78,12 @@ type alias FeatureProperties = | ||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | -- decoders and encoders |
| 81 | +optionalField key decoder fallback = | |
| 82 | + Jdec.dict Jdec.value | |
| 83 | + |> Jdec.andThen (\m -> | |
| 84 | + case Dict.get key m of | |
| 85 | + Nothing -> Jdec.succeed fallback | |
| 86 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 81 | 87 | |
| 82 | 88 | quickTypeToString : QuickType -> String |
| 83 | 89 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/4c547.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +33 −27test/inputs/json/misc/4d6fb.json
Melmdefault / QuickType.elm+33 −27
| @@ -192,6 +192,12 @@ type Kind | ||
| 192 | 192 | = T3 |
| 193 | 193 | |
| 194 | 194 | -- decoders and encoders |
| 195 | +optionalField key decoder fallback = | |
| 196 | + Jdec.dict Jdec.value | |
| 197 | + |> Jdec.andThen (\m -> | |
| 198 | + case Dict.get key m of | |
| 199 | + Nothing -> Jdec.succeed fallback | |
| 200 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 195 | 201 | |
| 196 | 202 | quickTypeToString : QuickType -> String |
| 197 | 203 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -213,7 +219,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 213 | 219 | quickTypeData = |
| 214 | 220 | Jdec.succeed QuickTypeData |
| 215 | 221 | |> Jpipe.required "after" Jdec.string |
| 216 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 222 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 217 | 223 | |> Jpipe.required "children" (Jdec.list child) |
| 218 | 224 | |> Jpipe.required "modhash" Jdec.string |
| 219 | 225 | |
| @@ -242,14 +248,14 @@ encodeChild x = | ||
| 242 | 248 | childData : Jdec.Decoder ChildData |
| 243 | 249 | childData = |
| 244 | 250 | Jdec.succeed ChildData |
| 245 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 246 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 251 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 252 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 247 | 253 | |> Jpipe.required "archived" Jdec.bool |
| 248 | 254 | |> Jpipe.required "author" Jdec.string |
| 249 | - |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) () | |
| 250 | - |> Jpipe.optional "author_flair_text" (Jdec.null ()) () | |
| 251 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 252 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 255 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ()) | |
| 256 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ()) | |
| 257 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 258 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 253 | 259 | |> Jpipe.required "brand_safe" Jdec.bool |
| 254 | 260 | |> Jpipe.required "can_gild" Jdec.bool |
| 255 | 261 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -257,7 +263,7 @@ childData = | ||
| 257 | 263 | |> Jpipe.required "contest_mode" Jdec.bool |
| 258 | 264 | |> Jpipe.required "created" Jdec.float |
| 259 | 265 | |> Jpipe.required "created_utc" Jdec.float |
| 260 | - |> Jpipe.optional "distinguished" (Jdec.null ()) () | |
| 266 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ()) | |
| 261 | 267 | |> Jpipe.required "domain" Jdec.string |
| 262 | 268 | |> Jpipe.required "downs" Jdec.int |
| 263 | 269 | |> Jpipe.required "edited" Jdec.bool |
| @@ -267,44 +273,44 @@ childData = | ||
| 267 | 273 | |> Jpipe.required "id" Jdec.string |
| 268 | 274 | |> Jpipe.required "is_self" Jdec.bool |
| 269 | 275 | |> Jpipe.required "is_video" Jdec.bool |
| 270 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 271 | - |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) () | |
| 272 | - |> Jpipe.optional "link_flair_text" (Jdec.null ()) () | |
| 276 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 277 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ()) | |
| 278 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ()) | |
| 273 | 279 | |> Jpipe.required "locked" Jdec.bool |
| 274 | - |> Jpipe.optional "media" (Jdec.nullable media) Nothing | |
| 280 | + |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing) | |
| 275 | 281 | |> Jpipe.required "media_embed" mediaEmbed |
| 276 | 282 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 277 | 283 | |> Jpipe.required "name" Jdec.string |
| 278 | 284 | |> Jpipe.required "num_comments" Jdec.int |
| 279 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 285 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 280 | 286 | |> Jpipe.required "over_18" Jdec.bool |
| 281 | 287 | |> Jpipe.required "permalink" Jdec.string |
| 282 | - |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing | |
| 283 | - |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing | |
| 288 | + |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing) | |
| 289 | + |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing) | |
| 284 | 290 | |> Jpipe.required "quarantine" Jdec.bool |
| 285 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 286 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 291 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 292 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 287 | 293 | |> Jpipe.required "saved" Jdec.bool |
| 288 | 294 | |> Jpipe.required "score" Jdec.int |
| 289 | - |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing | |
| 295 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing) | |
| 290 | 296 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 291 | 297 | |> Jpipe.required "selftext" Jdec.string |
| 292 | - |> Jpipe.optional "selftext_html" (Jdec.null ()) () | |
| 298 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ()) | |
| 293 | 299 | |> Jpipe.required "spoiler" Jdec.bool |
| 294 | 300 | |> Jpipe.required "stickied" Jdec.bool |
| 295 | 301 | |> Jpipe.required "subreddit" subreddit |
| 296 | 302 | |> Jpipe.required "subreddit_id" subredditID |
| 297 | 303 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 298 | 304 | |> Jpipe.required "subreddit_type" subredditType |
| 299 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 305 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 300 | 306 | |> Jpipe.required "thumbnail" Jdec.string |
| 301 | - |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing | |
| 302 | - |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing | |
| 307 | + |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing) | |
| 308 | + |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing) | |
| 303 | 309 | |> Jpipe.required "title" Jdec.string |
| 304 | 310 | |> Jpipe.required "ups" Jdec.int |
| 305 | 311 | |> Jpipe.required "url" Jdec.string |
| 306 | 312 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 307 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 313 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 308 | 314 | |> Jpipe.required "visited" Jdec.bool |
| 309 | 315 | |
| 310 | 316 | encodeChildData : ChildData -> Jenc.Value |
| @@ -427,10 +433,10 @@ encodeOembed x = | ||
| 427 | 433 | mediaEmbed : Jdec.Decoder MediaEmbed |
| 428 | 434 | mediaEmbed = |
| 429 | 435 | Jdec.succeed MediaEmbed |
| 430 | - |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing | |
| 431 | - |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing | |
| 432 | - |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing | |
| 433 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 436 | + |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing) | |
| 437 | + |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing) | |
| 438 | + |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing) | |
| 439 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 434 | 440 | |
| 435 | 441 | encodeMediaEmbed : MediaEmbed -> Jenc.Value |
| 436 | 442 | encodeMediaEmbed x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/4e336.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/54147.json
Melmdefault / QuickType.elm+6 −0
| @@ -46,6 +46,12 @@ type alias Headers = | ||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | -- decoders and encoders |
| 49 | +optionalField key decoder fallback = | |
| 50 | + Jdec.dict Jdec.value | |
| 51 | + |> Jdec.andThen (\m -> | |
| 52 | + case Dict.get key m of | |
| 53 | + Nothing -> Jdec.succeed fallback | |
| 54 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 49 | 55 | |
| 50 | 56 | quickTypeToString : QuickType -> String |
| 51 | 57 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/54d32.json
Melmdefault / QuickType.elm+6 −0
| @@ -53,6 +53,12 @@ type Status | ||
| 53 | 53 | | Active |
| 54 | 54 | |
| 55 | 55 | -- decoders and encoders |
| 56 | +optionalField key decoder fallback = | |
| 57 | + Jdec.dict Jdec.value | |
| 58 | + |> Jdec.andThen (\m -> | |
| 59 | + case Dict.get key m of | |
| 60 | + Nothing -> Jdec.succeed fallback | |
| 61 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 56 | 62 | |
| 57 | 63 | quickTypeToString : QuickType -> String |
| 58 | 64 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/570ec.json
Melmdefault / QuickType.elm+8 −2
| @@ -68,6 +68,12 @@ type alias Text = | ||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | -- decoders and encoders |
| 71 | +optionalField key decoder fallback = | |
| 72 | + Jdec.dict Jdec.value | |
| 73 | + |> Jdec.andThen (\m -> | |
| 74 | + case Dict.get key m of | |
| 75 | + Nothing -> Jdec.succeed fallback | |
| 76 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 71 | 77 | |
| 72 | 78 | quickType : Jdec.Decoder QuickType |
| 73 | 79 | quickType = Jdec.list quickTypeElement |
| @@ -84,7 +90,7 @@ quickTypeElement = | ||
| 84 | 90 | |> Jpipe.required "links" (Jdec.list link) |
| 85 | 91 | |> Jpipe.required "name" Jdec.string |
| 86 | 92 | |> Jpipe.required "other_names" (Jdec.list otherName) |
| 87 | - |> Jpipe.optional "superseded_by" (Jdec.null ()) () | |
| 93 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ()) | |
| 88 | 94 | |> Jpipe.required "text" (Jdec.list text) |
| 89 | 95 | |
| 90 | 96 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| @@ -147,7 +153,7 @@ otherName : Jdec.Decoder OtherName | ||
| 147 | 153 | otherName = |
| 148 | 154 | Jdec.succeed OtherName |
| 149 | 155 | |> Jpipe.required "name" Jdec.string |
| 150 | - |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing | |
| 156 | + |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing) | |
| 151 | 157 | |
| 152 | 158 | encodeOtherName : OtherName -> Jenc.Value |
| 153 | 159 | encodeOtherName x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/5dd0d.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/5eae5.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias QuickTypeElement = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickType : Jdec.Decoder QuickType |
| 38 | 44 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/5eb20.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/5f3a1.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +12 −6test/inputs/json/misc/5f7fe.json
Melmdefault / QuickType.elm+12 −6
| @@ -243,6 +243,12 @@ type alias Expression = | ||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | -- decoders and encoders |
| 246 | +optionalField key decoder fallback = | |
| 247 | + Jdec.dict Jdec.value | |
| 248 | + |> Jdec.andThen (\m -> | |
| 249 | + case Dict.get key m of | |
| 250 | + Nothing -> Jdec.succeed fallback | |
| 251 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 246 | 252 | |
| 247 | 253 | quickTypeToString : QuickType -> String |
| 248 | 254 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -373,17 +379,17 @@ encodeView x = | ||
| 373 | 379 | column : Jdec.Decoder Column |
| 374 | 380 | column = |
| 375 | 381 | Jdec.succeed Column |
| 376 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 382 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 377 | 383 | |> Jpipe.required "dataTypeName" typeName |
| 378 | 384 | |> Jpipe.required "fieldName" Jdec.string |
| 379 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 385 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 380 | 386 | |> Jpipe.required "format" format |
| 381 | 387 | |> Jpipe.required "id" Jdec.int |
| 382 | 388 | |> Jpipe.required "name" Jdec.string |
| 383 | 389 | |> Jpipe.required "position" Jdec.int |
| 384 | 390 | |> Jpipe.required "renderTypeName" typeName |
| 385 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 386 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 391 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 392 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 387 | 393 | |
| 388 | 394 | encodeColumn : Column -> Jenc.Value |
| 389 | 395 | encodeColumn x = |
| @@ -453,8 +459,8 @@ encodeTypeName x = case x of | ||
| 453 | 459 | format : Jdec.Decoder Format |
| 454 | 460 | format = |
| 455 | 461 | Jdec.succeed Format |
| 456 | - |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing | |
| 457 | - |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing | |
| 462 | + |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing) | |
| 463 | + |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing) | |
| 458 | 464 | |
| 459 | 465 | encodeFormat : Format -> Jenc.Value |
| 460 | 466 | encodeFormat x = |
Test case
1 generated file · +13 −7test/inputs/json/misc/617e8.json
Melmdefault / QuickType.elm+13 −7
| @@ -242,6 +242,12 @@ type alias Expression = | ||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | -- decoders and encoders |
| 245 | +optionalField key decoder fallback = | |
| 246 | + Jdec.dict Jdec.value | |
| 247 | + |> Jdec.andThen (\m -> | |
| 248 | + case Dict.get key m of | |
| 249 | + Nothing -> Jdec.succeed fallback | |
| 250 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 245 | 251 | |
| 246 | 252 | quickTypeToString : QuickType -> String |
| 247 | 253 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -372,18 +378,18 @@ encodeView x = | ||
| 372 | 378 | column : Jdec.Decoder Column |
| 373 | 379 | column = |
| 374 | 380 | Jdec.succeed Column |
| 375 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 381 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 376 | 382 | |> Jpipe.required "dataTypeName" typeName |
| 377 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 383 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 378 | 384 | |> Jpipe.required "fieldName" Jdec.string |
| 379 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 385 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 380 | 386 | |> Jpipe.required "format" format |
| 381 | 387 | |> Jpipe.required "id" Jdec.int |
| 382 | 388 | |> Jpipe.required "name" Jdec.string |
| 383 | 389 | |> Jpipe.required "position" Jdec.int |
| 384 | 390 | |> Jpipe.required "renderTypeName" typeName |
| 385 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 386 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 391 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 392 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 387 | 393 | |
| 388 | 394 | encodeColumn : Column -> Jenc.Value |
| 389 | 395 | encodeColumn x = |
| @@ -454,8 +460,8 @@ encodeTypeName x = case x of | ||
| 454 | 460 | format : Jdec.Decoder Format |
| 455 | 461 | format = |
| 456 | 462 | Jdec.succeed Format |
| 457 | - |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing | |
| 458 | - |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing | |
| 463 | + |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing) | |
| 464 | + |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing) | |
| 459 | 465 | |
| 460 | 466 | encodeFormat : Format -> Jenc.Value |
| 461 | 467 | encodeFormat x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/61b66.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/6260a.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +20 −14test/inputs/json/misc/65dec.json
Melmdefault / QuickType.elm+20 −14
| @@ -123,6 +123,12 @@ type Type | ||
| 123 | 123 | | Sorcery |
| 124 | 124 | |
| 125 | 125 | -- decoders and encoders |
| 126 | +optionalField key decoder fallback = | |
| 127 | + Jdec.dict Jdec.value | |
| 128 | + |> Jdec.andThen (\m -> | |
| 129 | + case Dict.get key m of | |
| 130 | + Nothing -> Jdec.succeed fallback | |
| 131 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 126 | 132 | |
| 127 | 133 | quickTypeToString : QuickType -> String |
| 128 | 134 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -164,31 +170,31 @@ card = | ||
| 164 | 170 | |> Jpipe.required "artist" Jdec.string |
| 165 | 171 | |> Jpipe.required "type" Jdec.string |
| 166 | 172 | |> Jpipe.required "cmc" Jdec.int |
| 167 | - |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing | |
| 168 | - |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list watermark)) Nothing | |
| 169 | - |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing | |
| 173 | + |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing) | |
| 174 | + |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list watermark)) Nothing) | |
| 175 | + |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing) | |
| 170 | 176 | |> Jpipe.required "id" Jdec.string |
| 171 | 177 | |> Jpipe.required "imageName" Jdec.string |
| 172 | 178 | |> Jpipe.required "layout" layout |
| 173 | 179 | |> Jpipe.required "legalities" (Jdec.list legalityElement) |
| 174 | - |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing | |
| 175 | - |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing | |
| 180 | + |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing) | |
| 181 | + |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing) | |
| 176 | 182 | |> Jpipe.required "multiverseid" Jdec.int |
| 177 | 183 | |> Jpipe.required "name" Jdec.string |
| 178 | 184 | |> Jpipe.required "originalText" Jdec.string |
| 179 | 185 | |> Jpipe.required "originalType" Jdec.string |
| 180 | - |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing | |
| 186 | + |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing) | |
| 181 | 187 | |> Jpipe.required "printings" (Jdec.list Jdec.string) |
| 182 | 188 | |> Jpipe.required "rarity" rarity |
| 183 | - |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing | |
| 184 | - |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing | |
| 185 | - |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 186 | - |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 187 | - |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing | |
| 188 | - |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing | |
| 189 | + |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing) | |
| 190 | + |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing) | |
| 191 | + |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 192 | + |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 193 | + |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing) | |
| 194 | + |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing) | |
| 189 | 195 | |> Jpipe.required "types" (Jdec.list purpleType) |
| 190 | - |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing | |
| 191 | - |> Jpipe.optional "watermark" (Jdec.nullable watermark) Nothing | |
| 196 | + |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing) | |
| 197 | + |> Jpipe.custom (optionalField "watermark" (Jdec.nullable watermark) Nothing) | |
| 192 | 198 | |
| 193 | 199 | encodeCard : Card -> Jenc.Value |
| 194 | 200 | encodeCard x = |
Test case
1 generated file · +7 −1test/inputs/json/misc/66121.json
Melmdefault / QuickType.elm+7 −1
| @@ -80,6 +80,12 @@ type Title | ||
| 80 | 80 | = HTML |
| 81 | 81 | |
| 82 | 82 | -- decoders and encoders |
| 83 | +optionalField key decoder fallback = | |
| 84 | + Jdec.dict Jdec.value | |
| 85 | + |> Jdec.andThen (\m -> | |
| 86 | + case Dict.get key m of | |
| 87 | + Nothing -> Jdec.succeed fallback | |
| 88 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 83 | 89 | |
| 84 | 90 | quickType : Jdec.Decoder QuickType |
| 85 | 91 | quickType = Jdec.list quickTypeElement |
| @@ -96,7 +102,7 @@ quickTypeElement = | ||
| 96 | 102 | |> Jpipe.required "links" (Jdec.list link) |
| 97 | 103 | |> Jpipe.required "name" Jdec.string |
| 98 | 104 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 99 | - |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing | |
| 105 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing) | |
| 100 | 106 | |> Jpipe.required "text" (Jdec.list text) |
| 101 | 107 | |
| 102 | 108 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/6617c.json
Melmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type alias IssPosition = | ||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/67c03.json
Melmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type alias Person = | ||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/68c30.json
Melmdefault / QuickType.elm+6 −0
| @@ -61,6 +61,12 @@ type alias Out = | ||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | -- decoders and encoders |
| 64 | +optionalField key decoder fallback = | |
| 65 | + Jdec.dict Jdec.value | |
| 66 | + |> Jdec.andThen (\m -> | |
| 67 | + case Dict.get key m of | |
| 68 | + Nothing -> Jdec.succeed fallback | |
| 69 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 64 | 70 | |
| 65 | 71 | quickTypeToString : QuickType -> String |
| 66 | 72 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/6c155.json
Melmdefault / QuickType.elm+8 −2
| @@ -86,6 +86,12 @@ type alias Location = | ||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | -- decoders and encoders |
| 89 | +optionalField key decoder fallback = | |
| 90 | + Jdec.dict Jdec.value | |
| 91 | + |> Jdec.andThen (\m -> | |
| 92 | + case Dict.get key m of | |
| 93 | + Nothing -> Jdec.succeed fallback | |
| 94 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 89 | 95 | |
| 90 | 96 | quickTypeToString : QuickType -> String |
| 91 | 97 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -157,7 +163,7 @@ result = | ||
| 157 | 163 | |> Jpipe.required "date" Jdec.string |
| 158 | 164 | |> Jpipe.required "image" (Jdec.list Jdec.value) |
| 159 | 165 | |> Jpipe.required "location" location |
| 160 | - |> Jpipe.optional "teaser" (Jdec.null ()) () | |
| 166 | + |> Jpipe.custom (optionalField "teaser" (Jdec.null ()) ()) | |
| 161 | 167 | |> Jpipe.required "title" Jdec.string |
| 162 | 168 | |> Jpipe.required "topic" (Jdec.list Jdec.value) |
| 163 | 169 | |> Jpipe.required "url" Jdec.string |
| @@ -207,7 +213,7 @@ location = | ||
| 207 | 213 | |> Jpipe.required "phone_number" Jdec.string |
| 208 | 214 | |> Jpipe.required "phone_number_extension" Jdec.string |
| 209 | 215 | |> Jpipe.required "postal_code" Jdec.string |
| 210 | - |> Jpipe.optional "sub_premise" (Jdec.null ()) () | |
| 216 | + |> Jpipe.custom (optionalField "sub_premise" (Jdec.null ()) ()) | |
| 211 | 217 | |> Jpipe.required "thoroughfare" Jdec.string |
| 212 | 218 | |
| 213 | 219 | encodeLocation : Location -> Jenc.Value |
Test case
1 generated file · +37 −31test/inputs/json/misc/6de06.json
Melmdefault / QuickType.elm+37 −31
| @@ -189,6 +189,12 @@ type Kind | ||
| 189 | 189 | = T3 |
| 190 | 190 | |
| 191 | 191 | -- decoders and encoders |
| 192 | +optionalField key decoder fallback = | |
| 193 | + Jdec.dict Jdec.value | |
| 194 | + |> Jdec.andThen (\m -> | |
| 195 | + case Dict.get key m of | |
| 196 | + Nothing -> Jdec.succeed fallback | |
| 197 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 192 | 198 | |
| 193 | 199 | quickTypeToString : QuickType -> String |
| 194 | 200 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -210,7 +216,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 210 | 216 | quickTypeData = |
| 211 | 217 | Jdec.succeed QuickTypeData |
| 212 | 218 | |> Jpipe.required "after" Jdec.string |
| 213 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 219 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 214 | 220 | |> Jpipe.required "children" (Jdec.list child) |
| 215 | 221 | |> Jpipe.required "modhash" Jdec.string |
| 216 | 222 | |
| @@ -239,14 +245,14 @@ encodeChild x = | ||
| 239 | 245 | childData : Jdec.Decoder ChildData |
| 240 | 246 | childData = |
| 241 | 247 | Jdec.succeed ChildData |
| 242 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 243 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 248 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 249 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 244 | 250 | |> Jpipe.required "archived" Jdec.bool |
| 245 | 251 | |> Jpipe.required "author" Jdec.string |
| 246 | - |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 247 | - |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 248 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 249 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 252 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 253 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 254 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 255 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 250 | 256 | |> Jpipe.required "brand_safe" Jdec.bool |
| 251 | 257 | |> Jpipe.required "can_gild" Jdec.bool |
| 252 | 258 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -254,7 +260,7 @@ childData = | ||
| 254 | 260 | |> Jpipe.required "contest_mode" Jdec.bool |
| 255 | 261 | |> Jpipe.required "created" Jdec.float |
| 256 | 262 | |> Jpipe.required "created_utc" Jdec.float |
| 257 | - |> Jpipe.optional "distinguished" (Jdec.null ()) () | |
| 263 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ()) | |
| 258 | 264 | |> Jpipe.required "domain" Jdec.string |
| 259 | 265 | |> Jpipe.required "downs" Jdec.int |
| 260 | 266 | |> Jpipe.required "edited" Jdec.bool |
| @@ -264,44 +270,44 @@ childData = | ||
| 264 | 270 | |> Jpipe.required "id" Jdec.string |
| 265 | 271 | |> Jpipe.required "is_self" Jdec.bool |
| 266 | 272 | |> Jpipe.required "is_video" Jdec.bool |
| 267 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 268 | - |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 269 | - |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 273 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 274 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 275 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 270 | 276 | |> Jpipe.required "locked" Jdec.bool |
| 271 | - |> Jpipe.optional "media" (Jdec.nullable media) Nothing | |
| 277 | + |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing) | |
| 272 | 278 | |> Jpipe.required "media_embed" mediaEmbed |
| 273 | 279 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 274 | 280 | |> Jpipe.required "name" Jdec.string |
| 275 | 281 | |> Jpipe.required "num_comments" Jdec.int |
| 276 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 282 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 277 | 283 | |> Jpipe.required "over_18" Jdec.bool |
| 278 | 284 | |> Jpipe.required "permalink" Jdec.string |
| 279 | - |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing | |
| 280 | - |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing | |
| 285 | + |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing) | |
| 286 | + |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing) | |
| 281 | 287 | |> Jpipe.required "quarantine" Jdec.bool |
| 282 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 283 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 288 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 289 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 284 | 290 | |> Jpipe.required "saved" Jdec.bool |
| 285 | 291 | |> Jpipe.required "score" Jdec.int |
| 286 | - |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing | |
| 292 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing) | |
| 287 | 293 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 288 | 294 | |> Jpipe.required "selftext" Jdec.string |
| 289 | - |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing | |
| 295 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing) | |
| 290 | 296 | |> Jpipe.required "spoiler" Jdec.bool |
| 291 | 297 | |> Jpipe.required "stickied" Jdec.bool |
| 292 | 298 | |> Jpipe.required "subreddit" Jdec.string |
| 293 | 299 | |> Jpipe.required "subreddit_id" Jdec.string |
| 294 | 300 | |> Jpipe.required "subreddit_name_prefixed" Jdec.string |
| 295 | 301 | |> Jpipe.required "subreddit_type" subredditType |
| 296 | - |> Jpipe.optional "suggested_sort" (Jdec.nullable Jdec.string) Nothing | |
| 302 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.nullable Jdec.string) Nothing) | |
| 297 | 303 | |> Jpipe.required "thumbnail" Jdec.string |
| 298 | - |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing | |
| 299 | - |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing | |
| 304 | + |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing) | |
| 305 | + |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing) | |
| 300 | 306 | |> Jpipe.required "title" Jdec.string |
| 301 | 307 | |> Jpipe.required "ups" Jdec.int |
| 302 | 308 | |> Jpipe.required "url" Jdec.string |
| 303 | 309 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 304 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 310 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 305 | 311 | |> Jpipe.required "visited" Jdec.bool |
| 306 | 312 | |
| 307 | 313 | encodeChildData : ChildData -> Jenc.Value |
| @@ -422,10 +428,10 @@ encodeOembed x = | ||
| 422 | 428 | mediaEmbed : Jdec.Decoder MediaEmbed |
| 423 | 429 | mediaEmbed = |
| 424 | 430 | Jdec.succeed MediaEmbed |
| 425 | - |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing | |
| 426 | - |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing | |
| 427 | - |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing | |
| 428 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 431 | + |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing) | |
| 432 | + |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing) | |
| 433 | + |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing) | |
| 434 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 429 | 435 | |
| 430 | 436 | encodeMediaEmbed : MediaEmbed -> Jenc.Value |
| 431 | 437 | encodeMediaEmbed x = |
| @@ -501,10 +507,10 @@ encodeSource x = | ||
| 501 | 507 | variants : Jdec.Decoder Variants |
| 502 | 508 | variants = |
| 503 | 509 | Jdec.succeed Variants |
| 504 | - |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing | |
| 505 | - |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing | |
| 506 | - |> Jpipe.optional "nsfw" (Jdec.nullable gif) Nothing | |
| 507 | - |> Jpipe.optional "obfuscated" (Jdec.nullable gif) Nothing | |
| 510 | + |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing) | |
| 511 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing) | |
| 512 | + |> Jpipe.custom (optionalField "nsfw" (Jdec.nullable gif) Nothing) | |
| 513 | + |> Jpipe.custom (optionalField "obfuscated" (Jdec.nullable gif) Nothing) | |
| 508 | 514 | |
| 509 | 515 | encodeVariants : Variants -> Jenc.Value |
| 510 | 516 | encodeVariants x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/6dec6.json
Melmdefault / QuickType.elm+6 −0
| @@ -144,6 +144,12 @@ type alias Wind = | ||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | -- decoders and encoders |
| 147 | +optionalField key decoder fallback = | |
| 148 | + Jdec.dict Jdec.value | |
| 149 | + |> Jdec.andThen (\m -> | |
| 150 | + case Dict.get key m of | |
| 151 | + Nothing -> Jdec.succeed fallback | |
| 152 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 147 | 153 | |
| 148 | 154 | quickTypeToString : QuickType -> String |
| 149 | 155 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/6eb00.json
Melmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type alias QuickTypeElement = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickType : Jdec.Decoder QuickType |
| 37 | 43 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/70c77.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +29 −23test/inputs/json/misc/734ad.json
Melmdefault / QuickType.elm+29 −23
| @@ -105,6 +105,12 @@ type Status | ||
| 105 | 105 | | Inactive |
| 106 | 106 | |
| 107 | 107 | -- decoders and encoders |
| 108 | +optionalField key decoder fallback = | |
| 109 | + Jdec.dict Jdec.value | |
| 110 | + |> Jdec.andThen (\m -> | |
| 111 | + case Dict.get key m of | |
| 112 | + Nothing -> Jdec.succeed fallback | |
| 113 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 108 | 114 | |
| 109 | 115 | quickTypeToString : QuickType -> String |
| 110 | 116 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -145,23 +151,23 @@ encodeFacets x = | ||
| 145 | 151 | result : Jdec.Decoder Result |
| 146 | 152 | result = |
| 147 | 153 | Jdec.succeed Result |
| 148 | - |> Jpipe.optional "acronym" (Jdec.nullable Jdec.string) Nothing | |
| 154 | + |> Jpipe.custom (optionalField "acronym" (Jdec.nullable Jdec.string) Nothing) | |
| 149 | 155 | |> Jpipe.required "activity_consult_committees" Jdec.string |
| 150 | 156 | |> Jpipe.required "activity_eu_legislative" Jdec.string |
| 151 | 157 | |> Jpipe.required "activity_expert_groups" Jdec.string |
| 152 | 158 | |> Jpipe.required "activity_high_level_groups" Jdec.string |
| 153 | 159 | |> Jpipe.required "activity_industry_forums" Jdec.string |
| 154 | 160 | |> Jpipe.required "activity_inter_groups" Jdec.string |
| 155 | - |> Jpipe.optional "activity_other" (Jdec.nullable Jdec.string) Nothing | |
| 161 | + |> Jpipe.custom (optionalField "activity_other" (Jdec.nullable Jdec.string) Nothing) | |
| 156 | 162 | |> Jpipe.required "activity_relevant_comm" Jdec.string |
| 157 | - |> Jpipe.optional "be_office_country" (Jdec.nullable Jdec.string) Nothing | |
| 158 | - |> Jpipe.optional "be_office_lat" (Jdec.nullable Jdec.float) Nothing | |
| 159 | - |> Jpipe.optional "be_office_lon" (Jdec.nullable Jdec.float) Nothing | |
| 160 | - |> Jpipe.optional "be_office_phone" (Jdec.nullable Jdec.string) Nothing | |
| 161 | - |> Jpipe.optional "be_office_post_code" (Jdec.nullable Jdec.string) Nothing | |
| 162 | - |> Jpipe.optional "be_office_postbox" (Jdec.nullable Jdec.string) Nothing | |
| 163 | - |> Jpipe.optional "be_office_street" (Jdec.nullable Jdec.string) Nothing | |
| 164 | - |> Jpipe.optional "be_office_town" (Jdec.nullable Jdec.string) Nothing | |
| 163 | + |> Jpipe.custom (optionalField "be_office_country" (Jdec.nullable Jdec.string) Nothing) | |
| 164 | + |> Jpipe.custom (optionalField "be_office_lat" (Jdec.nullable Jdec.float) Nothing) | |
| 165 | + |> Jpipe.custom (optionalField "be_office_lon" (Jdec.nullable Jdec.float) Nothing) | |
| 166 | + |> Jpipe.custom (optionalField "be_office_phone" (Jdec.nullable Jdec.string) Nothing) | |
| 167 | + |> Jpipe.custom (optionalField "be_office_post_code" (Jdec.nullable Jdec.string) Nothing) | |
| 168 | + |> Jpipe.custom (optionalField "be_office_postbox" (Jdec.nullable Jdec.string) Nothing) | |
| 169 | + |> Jpipe.custom (optionalField "be_office_street" (Jdec.nullable Jdec.string) Nothing) | |
| 170 | + |> Jpipe.custom (optionalField "be_office_town" (Jdec.nullable Jdec.string) Nothing) | |
| 165 | 171 | |> Jpipe.required "code_of_conduct" Jdec.string |
| 166 | 172 | |> Jpipe.required "contact_country" Jdec.int |
| 167 | 173 | |> Jpipe.required "created_at" Jdec.string |
| @@ -169,11 +175,11 @@ result = | ||
| 169 | 175 | |> Jpipe.required "goals" Jdec.string |
| 170 | 176 | |> Jpipe.required "head" Jdec.string |
| 171 | 177 | |> Jpipe.required "head_office_country" Jdec.string |
| 172 | - |> Jpipe.optional "head_office_lat" (Jdec.nullable Jdec.float) Nothing | |
| 173 | - |> Jpipe.optional "head_office_lon" (Jdec.nullable Jdec.float) Nothing | |
| 178 | + |> Jpipe.custom (optionalField "head_office_lat" (Jdec.nullable Jdec.float) Nothing) | |
| 179 | + |> Jpipe.custom (optionalField "head_office_lon" (Jdec.nullable Jdec.float) Nothing) | |
| 174 | 180 | |> Jpipe.required "head_office_phone" Jdec.string |
| 175 | - |> Jpipe.optional "head_office_post_code" (Jdec.nullable Jdec.string) Nothing | |
| 176 | - |> Jpipe.optional "head_office_postbox" (Jdec.nullable Jdec.string) Nothing | |
| 181 | + |> Jpipe.custom (optionalField "head_office_post_code" (Jdec.nullable Jdec.string) Nothing) | |
| 182 | + |> Jpipe.custom (optionalField "head_office_postbox" (Jdec.nullable Jdec.string) Nothing) | |
| 177 | 183 | |> Jpipe.required "head_office_street" Jdec.string |
| 178 | 184 | |> Jpipe.required "head_office_town" Jdec.string |
| 179 | 185 | |> Jpipe.required "id" Jdec.string |
| @@ -185,16 +191,16 @@ result = | ||
| 185 | 191 | |> Jpipe.required "main_category" Jdec.int |
| 186 | 192 | |> Jpipe.required "main_category_title" Jdec.string |
| 187 | 193 | |> Jpipe.required "members" Jdec.int |
| 188 | - |> Jpipe.optional "members_100" (Jdec.nullable Jdec.int) Nothing | |
| 189 | - |> Jpipe.optional "members_25" (Jdec.nullable Jdec.int) Nothing | |
| 190 | - |> Jpipe.optional "members_50" (Jdec.nullable Jdec.int) Nothing | |
| 191 | - |> Jpipe.optional "members_75" (Jdec.nullable Jdec.int) Nothing | |
| 194 | + |> Jpipe.custom (optionalField "members_100" (Jdec.nullable Jdec.int) Nothing) | |
| 195 | + |> Jpipe.custom (optionalField "members_25" (Jdec.nullable Jdec.int) Nothing) | |
| 196 | + |> Jpipe.custom (optionalField "members_50" (Jdec.nullable Jdec.int) Nothing) | |
| 197 | + |> Jpipe.custom (optionalField "members_75" (Jdec.nullable Jdec.int) Nothing) | |
| 192 | 198 | |> Jpipe.required "members_fte" Jdec.float |
| 193 | 199 | |> Jpipe.required "name" Jdec.string |
| 194 | - |> Jpipe.optional "native_name" (Jdec.null ()) () | |
| 195 | - |> Jpipe.optional "networking" (Jdec.nullable Jdec.string) Nothing | |
| 196 | - |> Jpipe.optional "number_of_natural_persons" (Jdec.nullable Jdec.int) Nothing | |
| 197 | - |> Jpipe.optional "other_code_of_conduct" (Jdec.nullable Jdec.string) Nothing | |
| 200 | + |> Jpipe.custom (optionalField "native_name" (Jdec.null ()) ()) | |
| 201 | + |> Jpipe.custom (optionalField "networking" (Jdec.nullable Jdec.string) Nothing) | |
| 202 | + |> Jpipe.custom (optionalField "number_of_natural_persons" (Jdec.nullable Jdec.int) Nothing) | |
| 203 | + |> Jpipe.custom (optionalField "other_code_of_conduct" (Jdec.nullable Jdec.string) Nothing) | |
| 198 | 204 | |> Jpipe.required "registration_date" Jdec.string |
| 199 | 205 | |> Jpipe.required "status" status |
| 200 | 206 | |> Jpipe.required "structure_members" Jdec.string |
| @@ -202,7 +208,7 @@ result = | ||
| 202 | 208 | |> Jpipe.required "sub_category_title" Jdec.string |
| 203 | 209 | |> Jpipe.required "updated_at" Jdec.string |
| 204 | 210 | |> Jpipe.required "uri" Jdec.string |
| 205 | - |> Jpipe.optional "web_site_url" (Jdec.nullable Jdec.string) Nothing | |
| 211 | + |> Jpipe.custom (optionalField "web_site_url" (Jdec.nullable Jdec.string) Nothing) | |
| 206 | 212 | |
| 207 | 213 | encodeResult : Result -> Jenc.Value |
| 208 | 214 | encodeResult x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/75912.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +14 −8test/inputs/json/misc/7681c.json
Melmdefault / QuickType.elm+14 −8
| @@ -155,6 +155,12 @@ type alias Pagination = | ||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | -- decoders and encoders |
| 158 | +optionalField key decoder fallback = | |
| 159 | + Jdec.dict Jdec.value | |
| 160 | + |> Jdec.andThen (\m -> | |
| 161 | + case Dict.get key m of | |
| 162 | + Nothing -> Jdec.succeed fallback | |
| 163 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 158 | 164 | |
| 159 | 165 | quickTypeToString : QuickType -> String |
| 160 | 166 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -193,7 +199,7 @@ datum = | ||
| 193 | 199 | |> Jpipe.required "source_tld" Jdec.string |
| 194 | 200 | |> Jpipe.required "trending_datetime" Jdec.string |
| 195 | 201 | |> Jpipe.required "url" Jdec.string |
| 196 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 202 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 197 | 203 | |> Jpipe.required "username" username |
| 198 | 204 | |
| 199 | 205 | encodeDatum : Datum -> Jenc.Value |
| @@ -257,7 +263,7 @@ images = | ||
| 257 | 263 | |> Jpipe.required "preview" downsizedSmall |
| 258 | 264 | |> Jpipe.required "preview_gif" the480WStill |
| 259 | 265 | |> Jpipe.required "preview_webp" the480WStill |
| 260 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 266 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 261 | 267 | |
| 262 | 268 | encodeImages : Images -> Jenc.Value |
| 263 | 269 | encodeImages x = |
| @@ -291,7 +297,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 291 | 297 | the480WStill = |
| 292 | 298 | Jdec.succeed The480_WStill |
| 293 | 299 | |> Jpipe.required "height" Jdec.string |
| 294 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 300 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 295 | 301 | |> Jpipe.required "url" Jdec.string |
| 296 | 302 | |> Jpipe.required "width" Jdec.string |
| 297 | 303 | |
| @@ -324,11 +330,11 @@ encodeDownsizedSmall x = | ||
| 324 | 330 | fixedHeight : Jdec.Decoder FixedHeight |
| 325 | 331 | fixedHeight = |
| 326 | 332 | Jdec.succeed FixedHeight |
| 327 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 328 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 333 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 334 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 329 | 335 | |> Jpipe.required "height" Jdec.string |
| 330 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 331 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 336 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 337 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 332 | 338 | |> Jpipe.required "size" Jdec.string |
| 333 | 339 | |> Jpipe.required "url" Jdec.string |
| 334 | 340 | |> Jpipe.required "webp" Jdec.string |
| @@ -387,7 +393,7 @@ user = | ||
| 387 | 393 | |> Jpipe.required "banner_url" Jdec.string |
| 388 | 394 | |> Jpipe.required "display_name" Jdec.string |
| 389 | 395 | |> Jpipe.required "profile_url" Jdec.string |
| 390 | - |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing | |
| 396 | + |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing) | |
| 391 | 397 | |> Jpipe.required "username" Jdec.string |
| 392 | 398 | |
| 393 | 399 | encodeUser : User -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/76ae1.json
Melmdefault / QuickType.elm+6 −0
| @@ -238,6 +238,12 @@ type SchemaType | ||
| 238 | 238 | = TypeArray |
| 239 | 239 | |
| 240 | 240 | -- decoders and encoders |
| 241 | +optionalField key decoder fallback = | |
| 242 | + Jdec.dict Jdec.value | |
| 243 | + |> Jdec.andThen (\m -> | |
| 244 | + case Dict.get key m of | |
| 245 | + Nothing -> Jdec.succeed fallback | |
| 246 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 241 | 247 | |
| 242 | 248 | quickTypeToString : QuickType -> String |
| 243 | 249 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +9 −3test/inputs/json/misc/77392.json
Melmdefault / QuickType.elm+9 −3
| @@ -57,6 +57,12 @@ type Pha | ||
| 57 | 57 | | NA |
| 58 | 58 | |
| 59 | 59 | -- decoders and encoders |
| 60 | +optionalField key decoder fallback = | |
| 61 | + Jdec.dict Jdec.value | |
| 62 | + |> Jdec.andThen (\m -> | |
| 63 | + case Dict.get key m of | |
| 64 | + Nothing -> Jdec.succeed fallback | |
| 65 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 60 | 66 | |
| 61 | 67 | quickType : Jdec.Decoder QuickType |
| 62 | 68 | quickType = Jdec.list quickTypeElement |
| @@ -69,14 +75,14 @@ quickTypeElement = | ||
| 69 | 75 | Jdec.succeed QuickTypeElement |
| 70 | 76 | |> Jpipe.required "designation" Jdec.string |
| 71 | 77 | |> Jpipe.required "discovery_date" Jdec.string |
| 72 | - |> Jpipe.optional "h_mag" (Jdec.nullable Jdec.string) Nothing | |
| 78 | + |> Jpipe.custom (optionalField "h_mag" (Jdec.nullable Jdec.string) Nothing) | |
| 73 | 79 | |> Jpipe.required "i_deg" Jdec.string |
| 74 | 80 | |> Jpipe.required "moid_au" Jdec.string |
| 75 | 81 | |> Jpipe.required "orbit_class" orbitClass |
| 76 | - |> Jpipe.optional "period_yr" (Jdec.nullable Jdec.string) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "period_yr" (Jdec.nullable Jdec.string) Nothing) | |
| 77 | 83 | |> Jpipe.required "pha" pha |
| 78 | 84 | |> Jpipe.required "q_au_1" Jdec.string |
| 79 | - |> Jpipe.optional "q_au_2" (Jdec.nullable Jdec.string) Nothing | |
| 85 | + |> Jpipe.custom (optionalField "q_au_2" (Jdec.nullable Jdec.string) Nothing) | |
| 80 | 86 | |
| 81 | 87 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| 82 | 88 | encodeQuickTypeElement x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/7d397.json
Melmdefault / QuickType.elm+6 −0
| @@ -116,6 +116,12 @@ type alias Items = | ||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | -- decoders and encoders |
| 119 | +optionalField key decoder fallback = | |
| 120 | + Jdec.dict Jdec.value | |
| 121 | + |> Jdec.andThen (\m -> | |
| 122 | + case Dict.get key m of | |
| 123 | + Nothing -> Jdec.succeed fallback | |
| 124 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 119 | 125 | |
| 120 | 126 | quickTypeToString : QuickType -> String |
| 121 | 127 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/7d722.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/7df41.json
Melmdefault / QuickType.elm+6 −0
| @@ -38,6 +38,12 @@ type alias PC = | ||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/7dfa6.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/misc/7eb30.json
Melmdefault / QuickType.elm+7 −1
| @@ -78,6 +78,12 @@ type TelEnum | ||
| 78 | 78 | | The022688899 |
| 79 | 79 | |
| 80 | 80 | -- decoders and encoders |
| 81 | +optionalField key decoder fallback = | |
| 82 | + Jdec.dict Jdec.value | |
| 83 | + |> Jdec.andThen (\m -> | |
| 84 | + case Dict.get key m of | |
| 85 | + Nothing -> Jdec.succeed fallback | |
| 86 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 81 | 87 | |
| 82 | 88 | quickTypeToString : QuickType -> String |
| 83 | 89 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -87,7 +93,7 @@ quickType = | ||
| 87 | 93 | Jdec.succeed QuickType |
| 88 | 94 | |> Jpipe.required "count" Jdec.int |
| 89 | 95 | |> Jpipe.required "next" Jdec.string |
| 90 | - |> Jpipe.optional "previous" (Jdec.null ()) () | |
| 96 | + |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ()) | |
| 91 | 97 | |> Jpipe.required "results" (Jdec.list result) |
| 92 | 98 | |
| 93 | 99 | encodeQuickType : QuickType -> Jenc.Value |
Test case
1 generated file · +9 −3test/inputs/json/misc/7f568.json
Melmdefault / QuickType.elm+9 −3
| @@ -62,6 +62,12 @@ type Language | ||
| 62 | 62 | = Markdown |
| 63 | 63 | |
| 64 | 64 | -- decoders and encoders |
| 65 | +optionalField key decoder fallback = | |
| 66 | + Jdec.dict Jdec.value | |
| 67 | + |> Jdec.andThen (\m -> | |
| 68 | + case Dict.get key m of | |
| 69 | + Nothing -> Jdec.succeed fallback | |
| 70 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 65 | 71 | |
| 66 | 72 | quickType : Jdec.Decoder QuickType |
| 67 | 73 | quickType = Jdec.list quickTypeElement |
| @@ -76,7 +82,7 @@ quickTypeElement = | ||
| 76 | 82 | |> Jpipe.required "comments_url" Jdec.string |
| 77 | 83 | |> Jpipe.required "commits_url" Jdec.string |
| 78 | 84 | |> Jpipe.required "created_at" Jdec.string |
| 79 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 85 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 80 | 86 | |> Jpipe.required "files" (Jdec.dict file) |
| 81 | 87 | |> Jpipe.required "forks_url" Jdec.string |
| 82 | 88 | |> Jpipe.required "git_pull_url" Jdec.string |
| @@ -87,7 +93,7 @@ quickTypeElement = | ||
| 87 | 93 | |> Jpipe.required "truncated" Jdec.bool |
| 88 | 94 | |> Jpipe.required "updated_at" Jdec.string |
| 89 | 95 | |> Jpipe.required "url" Jdec.string |
| 90 | - |> Jpipe.optional "user" (Jdec.null ()) () | |
| 96 | + |> Jpipe.custom (optionalField "user" (Jdec.null ()) ()) | |
| 91 | 97 | |
| 92 | 98 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| 93 | 99 | encodeQuickTypeElement x = |
| @@ -115,7 +121,7 @@ file = | ||
| 115 | 121 | Jdec.succeed File |
| 116 | 122 | |> Jpipe.required "type" purpleType |
| 117 | 123 | |> Jpipe.required "filename" Jdec.string |
| 118 | - |> Jpipe.optional "language" (Jdec.nullable language) Nothing | |
| 124 | + |> Jpipe.custom (optionalField "language" (Jdec.nullable language) Nothing) | |
| 119 | 125 | |> Jpipe.required "raw_url" Jdec.string |
| 120 | 126 | |> Jpipe.required "size" Jdec.int |
Test case
1 generated file · +6 −0test/inputs/json/misc/7fbfb.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias FluffyQuickType = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickType : Jdec.Decoder QuickType |
| 68 | 74 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +7 −1test/inputs/json/misc/80aff.json
Melmdefault / QuickType.elm+7 −1
| @@ -49,6 +49,12 @@ type alias Result = | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | -- decoders and encoders |
| 52 | +optionalField key decoder fallback = | |
| 53 | + Jdec.dict Jdec.value | |
| 54 | + |> Jdec.andThen (\m -> | |
| 55 | + case Dict.get key m of | |
| 56 | + Nothing -> Jdec.succeed fallback | |
| 57 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 52 | 58 | |
| 53 | 59 | quickTypeToString : QuickType -> String |
| 54 | 60 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -93,7 +99,7 @@ result = | ||
| 93 | 99 | |> Jpipe.required "id" Jdec.int |
| 94 | 100 | |> Jpipe.required "items" Jdec.int |
| 95 | 101 | |> Jpipe.required "name" Jdec.string |
| 96 | - |> Jpipe.optional "parent" (Jdec.nullable Jdec.int) Nothing | |
| 102 | + |> Jpipe.custom (optionalField "parent" (Jdec.nullable Jdec.int) Nothing) | |
| 97 | 103 | |> Jpipe.required "updated_at" Jdec.string |
| 98 | 104 | |> Jpipe.required "uri" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/82509.json
Melmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +26 −20test/inputs/json/misc/8592b.json
Melmdefault / QuickType.elm+26 −20
| @@ -165,6 +165,12 @@ type Kind | ||
| 165 | 165 | = T3 |
| 166 | 166 | |
| 167 | 167 | -- decoders and encoders |
| 168 | +optionalField key decoder fallback = | |
| 169 | + Jdec.dict Jdec.value | |
| 170 | + |> Jdec.andThen (\m -> | |
| 171 | + case Dict.get key m of | |
| 172 | + Nothing -> Jdec.succeed fallback | |
| 173 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 168 | 174 | |
| 169 | 175 | quickTypeToString : QuickType -> String |
| 170 | 176 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -186,7 +192,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 186 | 192 | quickTypeData = |
| 187 | 193 | Jdec.succeed QuickTypeData |
| 188 | 194 | |> Jpipe.required "after" Jdec.string |
| 189 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 195 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 190 | 196 | |> Jpipe.required "children" (Jdec.list child) |
| 191 | 197 | |> Jpipe.required "modhash" Jdec.string |
| 192 | 198 | |
| @@ -215,14 +221,14 @@ encodeChild x = | ||
| 215 | 221 | childData : Jdec.Decoder ChildData |
| 216 | 222 | childData = |
| 217 | 223 | Jdec.succeed ChildData |
| 218 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 219 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 224 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 225 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 220 | 226 | |> Jpipe.required "archived" Jdec.bool |
| 221 | 227 | |> Jpipe.required "author" Jdec.string |
| 222 | - |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 223 | - |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 224 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 225 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 228 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 229 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 230 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 231 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 226 | 232 | |> Jpipe.required "brand_safe" Jdec.bool |
| 227 | 233 | |> Jpipe.required "can_gild" Jdec.bool |
| 228 | 234 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -230,7 +236,7 @@ childData = | ||
| 230 | 236 | |> Jpipe.required "contest_mode" Jdec.bool |
| 231 | 237 | |> Jpipe.required "created" Jdec.float |
| 232 | 238 | |> Jpipe.required "created_utc" Jdec.float |
| 233 | - |> Jpipe.optional "distinguished" (Jdec.null ()) () | |
| 239 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ()) | |
| 234 | 240 | |> Jpipe.required "domain" Jdec.string |
| 235 | 241 | |> Jpipe.required "downs" Jdec.int |
| 236 | 242 | |> Jpipe.required "edited" Jdec.bool |
| @@ -240,29 +246,29 @@ childData = | ||
| 240 | 246 | |> Jpipe.required "id" Jdec.string |
| 241 | 247 | |> Jpipe.required "is_self" Jdec.bool |
| 242 | 248 | |> Jpipe.required "is_video" Jdec.bool |
| 243 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 249 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 244 | 250 | |> Jpipe.required "link_flair_css_class" Jdec.string |
| 245 | 251 | |> Jpipe.required "link_flair_text" Jdec.string |
| 246 | 252 | |> Jpipe.required "locked" Jdec.bool |
| 247 | - |> Jpipe.optional "media" (Jdec.null ()) () | |
| 253 | + |> Jpipe.custom (optionalField "media" (Jdec.null ()) ()) | |
| 248 | 254 | |> Jpipe.required "media_embed" mediaEmbed |
| 249 | 255 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 250 | 256 | |> Jpipe.required "name" Jdec.string |
| 251 | 257 | |> Jpipe.required "num_comments" Jdec.int |
| 252 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 258 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 253 | 259 | |> Jpipe.required "over_18" Jdec.bool |
| 254 | 260 | |> Jpipe.required "permalink" Jdec.string |
| 255 | - |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing | |
| 256 | - |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing | |
| 261 | + |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing) | |
| 262 | + |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing) | |
| 257 | 263 | |> Jpipe.required "quarantine" Jdec.bool |
| 258 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 259 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 264 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 265 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 260 | 266 | |> Jpipe.required "saved" Jdec.bool |
| 261 | 267 | |> Jpipe.required "score" Jdec.int |
| 262 | - |> Jpipe.optional "secure_media" (Jdec.null ()) () | |
| 268 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ()) | |
| 263 | 269 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 264 | 270 | |> Jpipe.required "selftext" Jdec.string |
| 265 | - |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing | |
| 271 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing) | |
| 266 | 272 | |> Jpipe.required "spoiler" Jdec.bool |
| 267 | 273 | |> Jpipe.required "stickied" Jdec.bool |
| 268 | 274 | |> Jpipe.required "subreddit" subreddit |
| @@ -271,13 +277,13 @@ childData = | ||
| 271 | 277 | |> Jpipe.required "subreddit_type" subredditType |
| 272 | 278 | |> Jpipe.required "suggested_sort" suggestedSort |
| 273 | 279 | |> Jpipe.required "thumbnail" Jdec.string |
| 274 | - |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing | |
| 275 | - |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing | |
| 280 | + |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing) | |
| 281 | + |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing) | |
| 276 | 282 | |> Jpipe.required "title" Jdec.string |
| 277 | 283 | |> Jpipe.required "ups" Jdec.int |
| 278 | 284 | |> Jpipe.required "url" Jdec.string |
| 279 | 285 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 280 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 286 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 281 | 287 | |> Jpipe.required "visited" Jdec.bool |
| 282 | 288 | |
| 283 | 289 | encodeChildData : ChildData -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/88130.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/8a62c.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/908db.json
Melmdefault / QuickType.elm+6 −0
| @@ -38,6 +38,12 @@ type alias StateState = | ||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/9617f.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/96f7c.json
Melmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type alias QuickType = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/9847b.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickTypeElement = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickType : Jdec.Decoder QuickType |
| 36 | 42 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/9929c.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/misc/996bd.json
Melmdefault / QuickType.elm+7 −1
| @@ -79,6 +79,12 @@ type Title | ||
| 79 | 79 | | HTML |
| 80 | 80 | |
| 81 | 81 | -- decoders and encoders |
| 82 | +optionalField key decoder fallback = | |
| 83 | + Jdec.dict Jdec.value | |
| 84 | + |> Jdec.andThen (\m -> | |
| 85 | + case Dict.get key m of | |
| 86 | + Nothing -> Jdec.succeed fallback | |
| 87 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 82 | 88 | |
| 83 | 89 | quickType : Jdec.Decoder QuickType |
| 84 | 90 | quickType = Jdec.list quickTypeElement |
| @@ -95,7 +101,7 @@ quickTypeElement = | ||
| 95 | 101 | |> Jpipe.required "links" (Jdec.list link) |
| 96 | 102 | |> Jpipe.required "name" Jdec.string |
| 97 | 103 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 98 | - |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing | |
| 104 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing) | |
| 99 | 105 | |> Jpipe.required "text" (Jdec.list text) |
| 100 | 106 | |
| 101 | 107 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +7 −1test/inputs/json/misc/9a503.json
Melmdefault / QuickType.elm+7 −1
| @@ -62,6 +62,12 @@ type alias Text = | ||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | -- decoders and encoders |
| 65 | +optionalField key decoder fallback = | |
| 66 | + Jdec.dict Jdec.value | |
| 67 | + |> Jdec.andThen (\m -> | |
| 68 | + case Dict.get key m of | |
| 69 | + Nothing -> Jdec.succeed fallback | |
| 70 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 65 | 71 | |
| 66 | 72 | quickType : Jdec.Decoder QuickType |
| 67 | 73 | quickType = Jdec.list quickTypeElement |
| @@ -78,7 +84,7 @@ quickTypeElement = | ||
| 78 | 84 | |> Jpipe.required "links" (Jdec.list link) |
| 79 | 85 | |> Jpipe.required "name" Jdec.string |
| 80 | 86 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 81 | - |> Jpipe.optional "superseded_by" (Jdec.null ()) () | |
| 87 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ()) | |
| 82 | 88 | |> Jpipe.required "text" (Jdec.list text) |
| 83 | 89 | |
| 84 | 90 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +8 −2test/inputs/json/misc/9ac3b.json
Melmdefault / QuickType.elm+8 −2
| @@ -63,6 +63,12 @@ type Title | ||
| 63 | 63 | | MS |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -109,9 +115,9 @@ result = | ||
| 109 | 115 | |> Jpipe.required "id" Jdec.string |
| 110 | 116 | |> Jpipe.required "last_name" Jdec.string |
| 111 | 117 | |> Jpipe.required "name" Jdec.string |
| 112 | - |> Jpipe.optional "position" (Jdec.nullable Jdec.string) Nothing | |
| 118 | + |> Jpipe.custom (optionalField "position" (Jdec.nullable Jdec.string) Nothing) | |
| 113 | 119 | |> Jpipe.required "status" status |
| 114 | - |> Jpipe.optional "title" (Jdec.nullable title) Nothing | |
| 120 | + |> Jpipe.custom (optionalField "title" (Jdec.nullable title) Nothing) | |
| 115 | 121 | |> Jpipe.required "updated_at" Jdec.string |
| 116 | 122 | |> Jpipe.required "uri" Jdec.string |
Test case
1 generated file · +7 −1test/inputs/json/misc/9eed5.json
Melmdefault / QuickType.elm+7 −1
| @@ -61,6 +61,12 @@ type alias Text = | ||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | -- decoders and encoders |
| 64 | +optionalField key decoder fallback = | |
| 65 | + Jdec.dict Jdec.value | |
| 66 | + |> Jdec.andThen (\m -> | |
| 67 | + case Dict.get key m of | |
| 68 | + Nothing -> Jdec.succeed fallback | |
| 69 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 64 | 70 | |
| 65 | 71 | quickType : Jdec.Decoder QuickType |
| 66 | 72 | quickType = Jdec.list quickTypeElement |
| @@ -77,7 +83,7 @@ quickTypeElement = | ||
| 77 | 83 | |> Jpipe.required "links" (Jdec.list link) |
| 78 | 84 | |> Jpipe.required "name" Jdec.string |
| 79 | 85 | |> Jpipe.required "other_names" (Jdec.list Jdec.value) |
| 80 | - |> Jpipe.optional "superseded_by" (Jdec.null ()) () | |
| 86 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ()) | |
| 81 | 87 | |> Jpipe.required "text" (Jdec.list text) |
| 82 | 88 | |
| 83 | 89 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/a0496.json
Melmdefault / QuickType.elm+6 −0
| @@ -54,6 +54,12 @@ type alias Errors = | ||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | -- decoders and encoders |
| 57 | +optionalField key decoder fallback = | |
| 58 | + Jdec.dict Jdec.value | |
| 59 | + |> Jdec.andThen (\m -> | |
| 60 | + case Dict.get key m of | |
| 61 | + Nothing -> Jdec.succeed fallback | |
| 62 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 57 | 63 | |
| 58 | 64 | quickTypeToString : QuickType -> String |
| 59 | 65 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/a1eca.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +12 −6test/inputs/json/misc/a3d8c.json
Melmdefault / QuickType.elm+12 −6
| @@ -161,6 +161,12 @@ type alias Owner = | ||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | -- decoders and encoders |
| 164 | +optionalField key decoder fallback = | |
| 165 | + Jdec.dict Jdec.value | |
| 166 | + |> Jdec.andThen (\m -> | |
| 167 | + case Dict.get key m of | |
| 168 | + Nothing -> Jdec.succeed fallback | |
| 169 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 164 | 170 | |
| 165 | 171 | quickTypeToString : QuickType -> String |
| 166 | 172 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -289,17 +295,17 @@ encodeView x = | ||
| 289 | 295 | column : Jdec.Decoder Column |
| 290 | 296 | column = |
| 291 | 297 | Jdec.succeed Column |
| 292 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 298 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 293 | 299 | |> Jpipe.required "dataTypeName" typeName |
| 294 | 300 | |> Jpipe.required "fieldName" Jdec.string |
| 295 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 301 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 296 | 302 | |> Jpipe.required "format" query |
| 297 | 303 | |> Jpipe.required "id" Jdec.int |
| 298 | 304 | |> Jpipe.required "name" Jdec.string |
| 299 | 305 | |> Jpipe.required "position" Jdec.int |
| 300 | 306 | |> Jpipe.required "renderTypeName" typeName |
| 301 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 302 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 307 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 308 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 303 | 309 | |
| 304 | 310 | encodeColumn : Column -> Jenc.Value |
| 305 | 311 | encodeColumn x = |
| @@ -320,12 +326,12 @@ encodeColumn x = | ||
| 320 | 326 | cachedContents : Jdec.Decoder CachedContents |
| 321 | 327 | cachedContents = |
| 322 | 328 | Jdec.succeed CachedContents |
| 323 | - |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing | |
| 329 | + |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing) | |
| 324 | 330 | |> Jpipe.required "largest" Jdec.string |
| 325 | 331 | |> Jpipe.required "non_null" Jdec.int |
| 326 | 332 | |> Jpipe.required "null" Jdec.int |
| 327 | 333 | |> Jpipe.required "smallest" Jdec.string |
| 328 | - |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing | |
| 334 | + |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing) | |
| 329 | 335 | |> Jpipe.required "top" (Jdec.list top) |
| 330 | 336 | |
| 331 | 337 | encodeCachedContents : CachedContents -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/a45b0.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/a71df.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/a9691.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/ab0d1.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/abb4b.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/ac944.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/misc/ad8be.json
Melmdefault / QuickType.elm+8 −2
| @@ -104,6 +104,12 @@ type Title | ||
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | -- decoders and encoders |
| 107 | +optionalField key decoder fallback = | |
| 108 | + Jdec.dict Jdec.value | |
| 109 | + |> Jdec.andThen (\m -> | |
| 110 | + case Dict.get key m of | |
| 111 | + Nothing -> Jdec.succeed fallback | |
| 112 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 107 | 113 | |
| 108 | 114 | quickType : Jdec.Decoder QuickType |
| 109 | 115 | quickType = Jdec.list quickTypeElement |
| @@ -120,7 +126,7 @@ quickTypeElement = | ||
| 120 | 126 | |> Jpipe.required "links" (Jdec.list link) |
| 121 | 127 | |> Jpipe.required "name" Jdec.string |
| 122 | 128 | |> Jpipe.required "other_names" (Jdec.list otherName) |
| 123 | - |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing | |
| 129 | + |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing) | |
| 124 | 130 | |> Jpipe.required "text" (Jdec.list text) |
| 125 | 131 | |
| 126 | 132 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| @@ -241,7 +247,7 @@ otherName : Jdec.Decoder OtherName | ||
| 241 | 247 | otherName = |
| 242 | 248 | Jdec.succeed OtherName |
| 243 | 249 | |> Jpipe.required "name" Jdec.string |
| 244 | - |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing | |
| 250 | + |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing) | |
| 245 | 251 | |
| 246 | 252 | encodeOtherName : OtherName -> Jenc.Value |
| 247 | 253 | encodeOtherName x = |
Test case
1 generated file · +25 −19test/inputs/json/misc/ae7f0.json
Melmdefault / QuickType.elm+25 −19
| @@ -135,6 +135,12 @@ type Kind | ||
| 135 | 135 | = T3 |
| 136 | 136 | |
| 137 | 137 | -- decoders and encoders |
| 138 | +optionalField key decoder fallback = | |
| 139 | + Jdec.dict Jdec.value | |
| 140 | + |> Jdec.andThen (\m -> | |
| 141 | + case Dict.get key m of | |
| 142 | + Nothing -> Jdec.succeed fallback | |
| 143 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 138 | 144 | |
| 139 | 145 | quickTypeToString : QuickType -> String |
| 140 | 146 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -156,7 +162,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 156 | 162 | quickTypeData = |
| 157 | 163 | Jdec.succeed QuickTypeData |
| 158 | 164 | |> Jpipe.required "after" Jdec.string |
| 159 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 165 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 160 | 166 | |> Jpipe.required "children" (Jdec.list child) |
| 161 | 167 | |> Jpipe.required "modhash" Jdec.string |
| 162 | 168 | |
| @@ -185,14 +191,14 @@ encodeChild x = | ||
| 185 | 191 | childData : Jdec.Decoder ChildData |
| 186 | 192 | childData = |
| 187 | 193 | Jdec.succeed ChildData |
| 188 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 189 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 194 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 195 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 190 | 196 | |> Jpipe.required "archived" Jdec.bool |
| 191 | 197 | |> Jpipe.required "author" Jdec.string |
| 192 | - |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) () | |
| 193 | - |> Jpipe.optional "author_flair_text" (Jdec.null ()) () | |
| 194 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 195 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 198 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ()) | |
| 199 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ()) | |
| 200 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 201 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 196 | 202 | |> Jpipe.required "brand_safe" Jdec.bool |
| 197 | 203 | |> Jpipe.required "can_gild" Jdec.bool |
| 198 | 204 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -200,7 +206,7 @@ childData = | ||
| 200 | 206 | |> Jpipe.required "contest_mode" Jdec.bool |
| 201 | 207 | |> Jpipe.required "created" Jdec.float |
| 202 | 208 | |> Jpipe.required "created_utc" Jdec.float |
| 203 | - |> Jpipe.optional "distinguished" (Jdec.null ()) () | |
| 209 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ()) | |
| 204 | 210 | |> Jpipe.required "domain" domain |
| 205 | 211 | |> Jpipe.required "downs" Jdec.int |
| 206 | 212 | |> Jpipe.required "edited" Jdec.bool |
| @@ -210,40 +216,40 @@ childData = | ||
| 210 | 216 | |> Jpipe.required "id" Jdec.string |
| 211 | 217 | |> Jpipe.required "is_self" Jdec.bool |
| 212 | 218 | |> Jpipe.required "is_video" Jdec.bool |
| 213 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 214 | - |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 215 | - |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 219 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 220 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 221 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 216 | 222 | |> Jpipe.required "locked" Jdec.bool |
| 217 | - |> Jpipe.optional "media" (Jdec.null ()) () | |
| 223 | + |> Jpipe.custom (optionalField "media" (Jdec.null ()) ()) | |
| 218 | 224 | |> Jpipe.required "media_embed" mediaEmbed |
| 219 | 225 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 220 | 226 | |> Jpipe.required "name" Jdec.string |
| 221 | 227 | |> Jpipe.required "num_comments" Jdec.int |
| 222 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 228 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 223 | 229 | |> Jpipe.required "over_18" Jdec.bool |
| 224 | 230 | |> Jpipe.required "permalink" Jdec.string |
| 225 | 231 | |> Jpipe.required "quarantine" Jdec.bool |
| 226 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 227 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 232 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 233 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 228 | 234 | |> Jpipe.required "saved" Jdec.bool |
| 229 | 235 | |> Jpipe.required "score" Jdec.int |
| 230 | - |> Jpipe.optional "secure_media" (Jdec.null ()) () | |
| 236 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ()) | |
| 231 | 237 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 232 | 238 | |> Jpipe.required "selftext" Jdec.string |
| 233 | - |> Jpipe.optional "selftext_html" (Jdec.null ()) () | |
| 239 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ()) | |
| 234 | 240 | |> Jpipe.required "spoiler" Jdec.bool |
| 235 | 241 | |> Jpipe.required "stickied" Jdec.bool |
| 236 | 242 | |> Jpipe.required "subreddit" subreddit |
| 237 | 243 | |> Jpipe.required "subreddit_id" subredditID |
| 238 | 244 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 239 | 245 | |> Jpipe.required "subreddit_type" subredditType |
| 240 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 246 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 241 | 247 | |> Jpipe.required "thumbnail" Jdec.string |
| 242 | 248 | |> Jpipe.required "title" Jdec.string |
| 243 | 249 | |> Jpipe.required "ups" Jdec.int |
| 244 | 250 | |> Jpipe.required "url" Jdec.string |
| 245 | 251 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 246 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 252 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 247 | 253 | |> Jpipe.required "visited" Jdec.bool |
| 248 | 254 | |
| 249 | 255 | encodeChildData : ChildData -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/ae9ca.json
Melmdefault / QuickType.elm+6 −0
| @@ -81,6 +81,12 @@ type Ward | ||
| 81 | 81 | | Central |
| 82 | 82 | |
| 83 | 83 | -- decoders and encoders |
| 84 | +optionalField key decoder fallback = | |
| 85 | + Jdec.dict Jdec.value | |
| 86 | + |> Jdec.andThen (\m -> | |
| 87 | + case Dict.get key m of | |
| 88 | + Nothing -> Jdec.succeed fallback | |
| 89 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 84 | 90 | |
| 85 | 91 | quickTypeToString : QuickType -> String |
| 86 | 92 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +27 −21test/inputs/json/misc/af2d1.json
Melmdefault / QuickType.elm+27 −21
| @@ -150,6 +150,12 @@ type Status | ||
| 150 | 150 | = Current |
| 151 | 151 | |
| 152 | 152 | -- decoders and encoders |
| 153 | +optionalField key decoder fallback = | |
| 154 | + Jdec.dict Jdec.value | |
| 155 | + |> Jdec.andThen (\m -> | |
| 156 | + case Dict.get key m of | |
| 157 | + Nothing -> Jdec.succeed fallback | |
| 158 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 153 | 159 | |
| 154 | 160 | quickTypeToString : QuickType -> String |
| 155 | 161 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -269,44 +275,44 @@ encodeGeometryName x = case x of | ||
| 269 | 275 | featureProperties : Jdec.Decoder FeatureProperties |
| 270 | 276 | featureProperties = |
| 271 | 277 | Jdec.succeed FeatureProperties |
| 272 | - |> Jpipe.optional "add_improv" (Jdec.nullable addImprov) Nothing | |
| 278 | + |> Jpipe.custom (optionalField "add_improv" (Jdec.nullable addImprov) Nothing) | |
| 273 | 279 | |> Jpipe.required "area_" Jdec.float |
| 274 | 280 | |> Jpipe.required "asset_numb" Jdec.string |
| 275 | - |> Jpipe.optional "comments" (Jdec.nullable Jdec.string) Nothing | |
| 281 | + |> Jpipe.custom (optionalField "comments" (Jdec.nullable Jdec.string) Nothing) | |
| 276 | 282 | |> Jpipe.required "condition" Jdec.int |
| 277 | - |> Jpipe.optional "constructi" (Jdec.nullable Jdec.string) Nothing | |
| 278 | - |> Jpipe.optional "createdate" (Jdec.null ()) () | |
| 279 | - |> Jpipe.optional "createuser" (Jdec.null ()) () | |
| 280 | - |> Jpipe.optional "disposal_d" (Jdec.null ()) () | |
| 283 | + |> Jpipe.custom (optionalField "constructi" (Jdec.nullable Jdec.string) Nothing) | |
| 284 | + |> Jpipe.custom (optionalField "createdate" (Jdec.null ()) ()) | |
| 285 | + |> Jpipe.custom (optionalField "createuser" (Jdec.null ()) ()) | |
| 286 | + |> Jpipe.custom (optionalField "disposal_d" (Jdec.null ()) ()) | |
| 281 | 287 | |> Jpipe.required "documents" Jdec.string |
| 282 | - |> Jpipe.optional "drawing_nu" (Jdec.nullable Jdec.string) Nothing | |
| 283 | - |> Jpipe.optional "file_numbe" (Jdec.nullable Jdec.string) Nothing | |
| 284 | - |> Jpipe.optional "folder_num" (Jdec.nullable Jdec.string) Nothing | |
| 285 | - |> Jpipe.optional "funding_ba" (Jdec.nullable fundingBa) Nothing | |
| 288 | + |> Jpipe.custom (optionalField "drawing_nu" (Jdec.nullable Jdec.string) Nothing) | |
| 289 | + |> Jpipe.custom (optionalField "file_numbe" (Jdec.nullable Jdec.string) Nothing) | |
| 290 | + |> Jpipe.custom (optionalField "folder_num" (Jdec.nullable Jdec.string) Nothing) | |
| 291 | + |> Jpipe.custom (optionalField "funding_ba" (Jdec.nullable fundingBa) Nothing) | |
| 286 | 292 | |> Jpipe.required "historic_c" Jdec.int |
| 287 | 293 | |> Jpipe.required "inspection" Jdec.string |
| 288 | - |> Jpipe.optional "inspectors" (Jdec.null ()) () | |
| 289 | - |> Jpipe.optional "last_updat" (Jdec.null ()) () | |
| 290 | - |> Jpipe.optional "level_accu" (Jdec.nullable levelAccu) Nothing | |
| 294 | + |> Jpipe.custom (optionalField "inspectors" (Jdec.null ()) ()) | |
| 295 | + |> Jpipe.custom (optionalField "last_updat" (Jdec.null ()) ()) | |
| 296 | + |> Jpipe.custom (optionalField "level_accu" (Jdec.nullable levelAccu) Nothing) | |
| 291 | 297 | |> Jpipe.required "material" material |
| 292 | 298 | |> Jpipe.required "mi_prinx" Jdec.int |
| 293 | 299 | |> Jpipe.required "mi_symbolo" miSymbolo |
| 294 | 300 | |> Jpipe.required "number_lan" Jdec.int |
| 295 | - |> Jpipe.optional "owner" (Jdec.nullable Jdec.string) Nothing | |
| 296 | - |> Jpipe.optional "positional" (Jdec.nullable levelAccu) Nothing | |
| 297 | - |> Jpipe.optional "project_nu" (Jdec.nullable Jdec.string) Nothing | |
| 298 | - |> Jpipe.optional "type" (Jdec.nullable propertiesType) Nothing | |
| 301 | + |> Jpipe.custom (optionalField "owner" (Jdec.nullable Jdec.string) Nothing) | |
| 302 | + |> Jpipe.custom (optionalField "positional" (Jdec.nullable levelAccu) Nothing) | |
| 303 | + |> Jpipe.custom (optionalField "project_nu" (Jdec.nullable Jdec.string) Nothing) | |
| 304 | + |> Jpipe.custom (optionalField "type" (Jdec.nullable propertiesType) Nothing) | |
| 299 | 305 | |> Jpipe.required "rec_id" Jdec.int |
| 300 | - |> Jpipe.optional "record_cre" (Jdec.nullable Jdec.string) Nothing | |
| 306 | + |> Jpipe.custom (optionalField "record_cre" (Jdec.nullable Jdec.string) Nothing) | |
| 301 | 307 | |> Jpipe.required "shape_area" Jdec.float |
| 302 | 308 | |> Jpipe.required "shape_leng" Jdec.float |
| 303 | 309 | |> Jpipe.required "status" status |
| 304 | - |> Jpipe.optional "survey_num" (Jdec.null ()) () | |
| 310 | + |> Jpipe.custom (optionalField "survey_num" (Jdec.null ()) ()) | |
| 305 | 311 | |> Jpipe.required "toe_rl" Jdec.float |
| 306 | 312 | |> Jpipe.required "top_rl" Jdec.float |
| 307 | 313 | |> Jpipe.required "update_dat" Jdec.string |
| 308 | - |> Jpipe.optional "updatedate" (Jdec.null ()) () | |
| 309 | - |> Jpipe.optional "updateuser" (Jdec.null ()) () | |
| 314 | + |> Jpipe.custom (optionalField "updatedate" (Jdec.null ()) ()) | |
| 315 | + |> Jpipe.custom (optionalField "updateuser" (Jdec.null ()) ()) | |
| 310 | 316 | |
| 311 | 317 | encodeFeatureProperties : FeatureProperties -> Jenc.Value |
| 312 | 318 | encodeFeatureProperties x = |
Test case
1 generated file · +13 −7test/inputs/json/misc/b4865.json
Melmdefault / QuickType.elm+13 −7
| @@ -60,6 +60,12 @@ type Nametype | ||
| 60 | 60 | = Valid |
| 61 | 61 | |
| 62 | 62 | -- decoders and encoders |
| 63 | +optionalField key decoder fallback = | |
| 64 | + Jdec.dict Jdec.value | |
| 65 | + |> Jdec.andThen (\m -> | |
| 66 | + case Dict.get key m of | |
| 67 | + Nothing -> Jdec.succeed fallback | |
| 68 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 63 | 69 | |
| 64 | 70 | quickType : Jdec.Decoder QuickType |
| 65 | 71 | quickType = Jdec.list quickTypeElement |
| @@ -70,18 +76,18 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r) | ||
| 70 | 76 | quickTypeElement : Jdec.Decoder QuickTypeElement |
| 71 | 77 | quickTypeElement = |
| 72 | 78 | Jdec.succeed QuickTypeElement |
| 73 | - |> Jpipe.optional ":@computed_region_cbhk_fwbd" (Jdec.nullable Jdec.string) Nothing | |
| 74 | - |> Jpipe.optional ":@computed_region_nnqa_25f4" (Jdec.nullable Jdec.string) Nothing | |
| 79 | + |> Jpipe.custom (optionalField ":@computed_region_cbhk_fwbd" (Jdec.nullable Jdec.string) Nothing) | |
| 80 | + |> Jpipe.custom (optionalField ":@computed_region_nnqa_25f4" (Jdec.nullable Jdec.string) Nothing) | |
| 75 | 81 | |> Jpipe.required "fall" fall |
| 76 | - |> Jpipe.optional "geolocation" (Jdec.nullable geolocation) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "geolocation" (Jdec.nullable geolocation) Nothing) | |
| 77 | 83 | |> Jpipe.required "id" Jdec.string |
| 78 | - |> Jpipe.optional "mass" (Jdec.nullable Jdec.string) Nothing | |
| 84 | + |> Jpipe.custom (optionalField "mass" (Jdec.nullable Jdec.string) Nothing) | |
| 79 | 85 | |> Jpipe.required "name" Jdec.string |
| 80 | 86 | |> Jpipe.required "nametype" nametype |
| 81 | 87 | |> Jpipe.required "recclass" Jdec.string |
| 82 | - |> Jpipe.optional "reclat" (Jdec.nullable Jdec.string) Nothing | |
| 83 | - |> Jpipe.optional "reclong" (Jdec.nullable Jdec.string) Nothing | |
| 84 | - |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing | |
| 88 | + |> Jpipe.custom (optionalField "reclat" (Jdec.nullable Jdec.string) Nothing) | |
| 89 | + |> Jpipe.custom (optionalField "reclong" (Jdec.nullable Jdec.string) Nothing) | |
| 90 | + |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing) | |
| 85 | 91 | |
| 86 | 92 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| 87 | 93 | encodeQuickTypeElement x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/b6f2c.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/b6fe5.json
Melmdefault / QuickType.elm+6 −0
| @@ -30,6 +30,12 @@ type alias QuickType = | ||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | -- decoders and encoders |
| 33 | +optionalField key decoder fallback = | |
| 34 | + Jdec.dict Jdec.value | |
| 35 | + |> Jdec.andThen (\m -> | |
| 36 | + case Dict.get key m of | |
| 37 | + Nothing -> Jdec.succeed fallback | |
| 38 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 33 | 39 | |
| 34 | 40 | quickTypeToString : QuickType -> String |
| 35 | 41 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/b9f64.json
Melmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/bb1ec.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +31 −25test/inputs/json/misc/be234.json
Melmdefault / QuickType.elm+31 −25
| @@ -207,6 +207,12 @@ type Kind | ||
| 207 | 207 | = T3 |
| 208 | 208 | |
| 209 | 209 | -- decoders and encoders |
| 210 | +optionalField key decoder fallback = | |
| 211 | + Jdec.dict Jdec.value | |
| 212 | + |> Jdec.andThen (\m -> | |
| 213 | + case Dict.get key m of | |
| 214 | + Nothing -> Jdec.succeed fallback | |
| 215 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 210 | 216 | |
| 211 | 217 | quickTypeToString : QuickType -> String |
| 212 | 218 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -228,7 +234,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 228 | 234 | quickTypeData = |
| 229 | 235 | Jdec.succeed QuickTypeData |
| 230 | 236 | |> Jpipe.required "after" Jdec.string |
| 231 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 237 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 232 | 238 | |> Jpipe.required "children" (Jdec.list child) |
| 233 | 239 | |> Jpipe.required "modhash" Jdec.string |
| 234 | 240 | |
| @@ -257,14 +263,14 @@ encodeChild x = | ||
| 257 | 263 | childData : Jdec.Decoder ChildData |
| 258 | 264 | childData = |
| 259 | 265 | Jdec.succeed ChildData |
| 260 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 261 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 266 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 267 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 262 | 268 | |> Jpipe.required "archived" Jdec.bool |
| 263 | 269 | |> Jpipe.required "author" Jdec.string |
| 264 | - |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) () | |
| 265 | - |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 266 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 267 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 270 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ()) | |
| 271 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 272 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 273 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 268 | 274 | |> Jpipe.required "brand_safe" Jdec.bool |
| 269 | 275 | |> Jpipe.required "can_gild" Jdec.bool |
| 270 | 276 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -272,7 +278,7 @@ childData = | ||
| 272 | 278 | |> Jpipe.required "contest_mode" Jdec.bool |
| 273 | 279 | |> Jpipe.required "created" Jdec.float |
| 274 | 280 | |> Jpipe.required "created_utc" Jdec.float |
| 275 | - |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing | |
| 281 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing) | |
| 276 | 282 | |> Jpipe.required "domain" domain |
| 277 | 283 | |> Jpipe.required "downs" Jdec.int |
| 278 | 284 | |> Jpipe.required "edited" Jdec.bool |
| @@ -282,36 +288,36 @@ childData = | ||
| 282 | 288 | |> Jpipe.required "id" Jdec.string |
| 283 | 289 | |> Jpipe.required "is_self" Jdec.bool |
| 284 | 290 | |> Jpipe.required "is_video" Jdec.bool |
| 285 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 286 | - |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) () | |
| 287 | - |> Jpipe.optional "link_flair_text" (Jdec.null ()) () | |
| 291 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 292 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ()) | |
| 293 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ()) | |
| 288 | 294 | |> Jpipe.required "locked" Jdec.bool |
| 289 | - |> Jpipe.optional "media" (Jdec.nullable media) Nothing | |
| 295 | + |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing) | |
| 290 | 296 | |> Jpipe.required "media_embed" mediaEmbed |
| 291 | 297 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 292 | 298 | |> Jpipe.required "name" Jdec.string |
| 293 | 299 | |> Jpipe.required "num_comments" Jdec.int |
| 294 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 300 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 295 | 301 | |> Jpipe.required "over_18" Jdec.bool |
| 296 | 302 | |> Jpipe.required "permalink" Jdec.string |
| 297 | 303 | |> Jpipe.required "post_hint" postHint |
| 298 | 304 | |> Jpipe.required "preview" preview |
| 299 | 305 | |> Jpipe.required "quarantine" Jdec.bool |
| 300 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 301 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 306 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 307 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 302 | 308 | |> Jpipe.required "saved" Jdec.bool |
| 303 | 309 | |> Jpipe.required "score" Jdec.int |
| 304 | - |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing | |
| 310 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing) | |
| 305 | 311 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 306 | 312 | |> Jpipe.required "selftext" Jdec.string |
| 307 | - |> Jpipe.optional "selftext_html" (Jdec.null ()) () | |
| 313 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ()) | |
| 308 | 314 | |> Jpipe.required "spoiler" Jdec.bool |
| 309 | 315 | |> Jpipe.required "stickied" Jdec.bool |
| 310 | 316 | |> Jpipe.required "subreddit" subreddit |
| 311 | 317 | |> Jpipe.required "subreddit_id" subredditID |
| 312 | 318 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 313 | 319 | |> Jpipe.required "subreddit_type" subredditType |
| 314 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 320 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 315 | 321 | |> Jpipe.required "thumbnail" Jdec.string |
| 316 | 322 | |> Jpipe.required "thumbnail_height" Jdec.int |
| 317 | 323 | |> Jpipe.required "thumbnail_width" Jdec.int |
| @@ -319,7 +325,7 @@ childData = | ||
| 319 | 325 | |> Jpipe.required "ups" Jdec.int |
| 320 | 326 | |> Jpipe.required "url" Jdec.string |
| 321 | 327 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 322 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 328 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 323 | 329 | |> Jpipe.required "visited" Jdec.bool |
| 324 | 330 | |
| 325 | 331 | encodeChildData : ChildData -> Jenc.Value |
| @@ -461,10 +467,10 @@ encodeOembed x = | ||
| 461 | 467 | mediaEmbed : Jdec.Decoder MediaEmbed |
| 462 | 468 | mediaEmbed = |
| 463 | 469 | Jdec.succeed MediaEmbed |
| 464 | - |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing | |
| 465 | - |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing | |
| 466 | - |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing | |
| 467 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 470 | + |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing) | |
| 471 | + |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing) | |
| 472 | + |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing) | |
| 473 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 468 | 474 | |
| 469 | 475 | encodeMediaEmbed : MediaEmbed -> Jenc.Value |
| 470 | 476 | encodeMediaEmbed x = |
| @@ -540,8 +546,8 @@ encodeSource x = | ||
| 540 | 546 | variants : Jdec.Decoder Variants |
| 541 | 547 | variants = |
| 542 | 548 | Jdec.succeed Variants |
| 543 | - |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing | |
| 544 | - |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing | |
| 549 | + |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing) | |
| 550 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing) | |
| 545 | 551 | |
| 546 | 552 | encodeVariants : Variants -> Jenc.Value |
| 547 | 553 | encodeVariants x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/c0356.json
Melmdefault / QuickType.elm+6 −0
| @@ -41,6 +41,12 @@ type alias Description = | ||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | -- decoders and encoders |
| 44 | +optionalField key decoder fallback = | |
| 45 | + Jdec.dict Jdec.value | |
| 46 | + |> Jdec.andThen (\m -> | |
| 47 | + case Dict.get key m of | |
| 48 | + Nothing -> Jdec.succeed fallback | |
| 49 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 44 | 50 | |
| 45 | 51 | quickTypeToString : QuickType -> String |
| 46 | 52 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/c0a3a.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +13 −7test/inputs/json/misc/c3303.json
Melmdefault / QuickType.elm+13 −7
| @@ -152,6 +152,12 @@ type alias Pagination = | ||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | -- decoders and encoders |
| 155 | +optionalField key decoder fallback = | |
| 156 | + Jdec.dict Jdec.value | |
| 157 | + |> Jdec.andThen (\m -> | |
| 158 | + case Dict.get key m of | |
| 159 | + Nothing -> Jdec.succeed fallback | |
| 160 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 155 | 161 | |
| 156 | 162 | quickTypeToString : QuickType -> String |
| 157 | 163 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -190,7 +196,7 @@ datum = | ||
| 190 | 196 | |> Jpipe.required "source_tld" Jdec.string |
| 191 | 197 | |> Jpipe.required "trending_datetime" Jdec.string |
| 192 | 198 | |> Jpipe.required "url" Jdec.string |
| 193 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 199 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 194 | 200 | |> Jpipe.required "username" username |
| 195 | 201 | |
| 196 | 202 | encodeDatum : Datum -> Jenc.Value |
| @@ -254,7 +260,7 @@ images = | ||
| 254 | 260 | |> Jpipe.required "preview" downsizedSmall |
| 255 | 261 | |> Jpipe.required "preview_gif" the480WStill |
| 256 | 262 | |> Jpipe.required "preview_webp" the480WStill |
| 257 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 263 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 258 | 264 | |
| 259 | 265 | encodeImages : Images -> Jenc.Value |
| 260 | 266 | encodeImages x = |
| @@ -288,7 +294,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 288 | 294 | the480WStill = |
| 289 | 295 | Jdec.succeed The480_WStill |
| 290 | 296 | |> Jpipe.required "height" Jdec.string |
| 291 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 297 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 292 | 298 | |> Jpipe.required "url" Jdec.string |
| 293 | 299 | |> Jpipe.required "width" Jdec.string |
| 294 | 300 | |
| @@ -321,11 +327,11 @@ encodeDownsizedSmall x = | ||
| 321 | 327 | fixedHeight : Jdec.Decoder FixedHeight |
| 322 | 328 | fixedHeight = |
| 323 | 329 | Jdec.succeed FixedHeight |
| 324 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 325 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 330 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 331 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 326 | 332 | |> Jpipe.required "height" Jdec.string |
| 327 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 328 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 333 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 334 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 329 | 335 | |> Jpipe.required "size" Jdec.string |
| 330 | 336 | |> Jpipe.required "url" Jdec.string |
| 331 | 337 | |> Jpipe.required "webp" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/c6cfd.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias Country = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/c8c7e.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias FluffyQuickType = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickType : Jdec.Decoder QuickType |
| 68 | 74 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +8 −2test/inputs/json/misc/cb0cc.json
Melmdefault / QuickType.elm+8 −2
| @@ -53,6 +53,12 @@ type alias Laureate = | ||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | -- decoders and encoders |
| 56 | +optionalField key decoder fallback = | |
| 57 | + Jdec.dict Jdec.value | |
| 58 | + |> Jdec.andThen (\m -> | |
| 59 | + case Dict.get key m of | |
| 60 | + Nothing -> Jdec.succeed fallback | |
| 61 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 56 | 62 | |
| 57 | 63 | quickTypeToString : QuickType -> String |
| 58 | 64 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -73,7 +79,7 @@ prize = | ||
| 73 | 79 | Jdec.succeed Prize |
| 74 | 80 | |> Jpipe.required "category" category |
| 75 | 81 | |> Jpipe.required "laureates" (Jdec.list laureate) |
| 76 | - |> Jpipe.optional "overallMotivation" (Jdec.nullable Jdec.string) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "overallMotivation" (Jdec.nullable Jdec.string) Nothing) | |
| 77 | 83 | |> Jpipe.required "year" Jdec.string |
| 78 | 84 | |
| 79 | 85 | encodePrize : Prize -> Jenc.Value |
| @@ -113,7 +119,7 @@ laureate = | ||
| 113 | 119 | Jdec.succeed Laureate |
| 114 | 120 | |> Jpipe.required "firstname" Jdec.string |
| 115 | 121 | |> Jpipe.required "id" Jdec.string |
| 116 | - |> Jpipe.optional "motivation" (Jdec.nullable Jdec.string) Nothing | |
| 122 | + |> Jpipe.custom (optionalField "motivation" (Jdec.nullable Jdec.string) Nothing) | |
| 117 | 123 | |> Jpipe.required "share" Jdec.string |
| 118 | 124 | |> Jpipe.required "surname" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/cb81e.json
Melmdefault / QuickType.elm+6 −0
| @@ -36,6 +36,12 @@ type alias Description = | ||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | -- decoders and encoders |
| 39 | +optionalField key decoder fallback = | |
| 40 | + Jdec.dict Jdec.value | |
| 41 | + |> Jdec.andThen (\m -> | |
| 42 | + case Dict.get key m of | |
| 43 | + Nothing -> Jdec.succeed fallback | |
| 44 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 39 | 45 | |
| 40 | 46 | quickTypeToString : QuickType -> String |
| 41 | 47 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/ccd18.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/cd238.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias Meta = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickTypeToString : QuickType -> String |
| 68 | 74 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/cd463.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/cda6c.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias FluffyQuickType = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickType : Jdec.Decoder QuickType |
| 68 | 74 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +6 −0test/inputs/json/misc/cf0d8.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/cfbce.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/d0908.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias TotalPopulation = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/misc/d23d5.json
Melmdefault / QuickType.elm+7 −1
| @@ -48,6 +48,12 @@ type alias Result = | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | -- decoders and encoders |
| 51 | +optionalField key decoder fallback = | |
| 52 | + Jdec.dict Jdec.value | |
| 53 | + |> Jdec.andThen (\m -> | |
| 54 | + case Dict.get key m of | |
| 55 | + Nothing -> Jdec.succeed fallback | |
| 56 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 51 | 57 | |
| 52 | 58 | quickTypeToString : QuickType -> String |
| 53 | 59 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -88,7 +94,7 @@ encodeFacets x = | ||
| 88 | 94 | result : Jdec.Decoder Result |
| 89 | 95 | result = |
| 90 | 96 | Jdec.succeed Result |
| 91 | - |> Jpipe.optional "acronym" (Jdec.nullable Jdec.string) Nothing | |
| 97 | + |> Jpipe.custom (optionalField "acronym" (Jdec.nullable Jdec.string) Nothing) | |
| 92 | 98 | |> Jpipe.required "created_at" Jdec.string |
| 93 | 99 | |> Jpipe.required "id" Jdec.string |
| 94 | 100 | |> Jpipe.required "name" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/dbfb3.json
Melmdefault / QuickType.elm+6 −0
| @@ -143,6 +143,12 @@ type alias Wind = | ||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | -- decoders and encoders |
| 146 | +optionalField key decoder fallback = | |
| 147 | + Jdec.dict Jdec.value | |
| 148 | + |> Jdec.andThen (\m -> | |
| 149 | + case Dict.get key m of | |
| 150 | + Nothing -> Jdec.succeed fallback | |
| 151 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 146 | 152 | |
| 147 | 153 | quickTypeToString : QuickType -> String |
| 148 | 154 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +20 −14test/inputs/json/misc/dc44f.json
Melmdefault / QuickType.elm+20 −14
| @@ -165,6 +165,12 @@ type Type | ||
| 165 | 165 | | Land |
| 166 | 166 | |
| 167 | 167 | -- decoders and encoders |
| 168 | +optionalField key decoder fallback = | |
| 169 | + Jdec.dict Jdec.value | |
| 170 | + |> Jdec.andThen (\m -> | |
| 171 | + case Dict.get key m of | |
| 172 | + Nothing -> Jdec.succeed fallback | |
| 173 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 168 | 174 | |
| 169 | 175 | quickTypeToString : QuickType -> String |
| 170 | 176 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -223,30 +229,30 @@ card = | ||
| 223 | 229 | |> Jpipe.required "artist" Jdec.string |
| 224 | 230 | |> Jpipe.required "type" Jdec.string |
| 225 | 231 | |> Jpipe.required "cmc" Jdec.int |
| 226 | - |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing | |
| 227 | - |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list color)) Nothing | |
| 228 | - |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing | |
| 232 | + |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing) | |
| 233 | + |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list color)) Nothing) | |
| 234 | + |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing) | |
| 229 | 235 | |> Jpipe.required "id" Jdec.string |
| 230 | 236 | |> Jpipe.required "imageName" Jdec.string |
| 231 | 237 | |> Jpipe.required "layout" layout |
| 232 | 238 | |> Jpipe.required "legalities" (Jdec.list legalityElement) |
| 233 | - |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing | |
| 234 | - |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing | |
| 239 | + |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing) | |
| 240 | + |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing) | |
| 235 | 241 | |> Jpipe.required "multiverseid" Jdec.int |
| 236 | 242 | |> Jpipe.required "name" Jdec.string |
| 237 | - |> Jpipe.optional "originalText" (Jdec.nullable Jdec.string) Nothing | |
| 243 | + |> Jpipe.custom (optionalField "originalText" (Jdec.nullable Jdec.string) Nothing) | |
| 238 | 244 | |> Jpipe.required "originalType" Jdec.string |
| 239 | - |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing | |
| 245 | + |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing) | |
| 240 | 246 | |> Jpipe.required "printings" (Jdec.list Jdec.string) |
| 241 | 247 | |> Jpipe.required "rarity" rarity |
| 242 | - |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing | |
| 243 | - |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing | |
| 244 | - |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 245 | - |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing | |
| 246 | - |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing | |
| 247 | - |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing | |
| 248 | + |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing) | |
| 249 | + |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing) | |
| 250 | + |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 251 | + |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing) | |
| 252 | + |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing) | |
| 253 | + |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing) | |
| 248 | 254 | |> Jpipe.required "types" (Jdec.list purpleType) |
| 249 | - |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing | |
| 255 | + |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing) | |
| 250 | 256 | |
| 251 | 257 | encodeCard : Card -> Jenc.Value |
| 252 | 258 | encodeCard x = |
Test case
1 generated file · +20 −14test/inputs/json/misc/dd1ce.json
Melmdefault / QuickType.elm+20 −14
| @@ -165,6 +165,12 @@ type Type | ||
| 165 | 165 | | Land |
| 166 | 166 | |
| 167 | 167 | -- decoders and encoders |
| 168 | +optionalField key decoder fallback = | |
| 169 | + Jdec.dict Jdec.value | |
| 170 | + |> Jdec.andThen (\m -> | |
| 171 | + case Dict.get key m of | |
| 172 | + Nothing -> Jdec.succeed fallback | |
| 173 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 168 | 174 | |
| 169 | 175 | quickTypeToString : QuickType -> String |
| 170 | 176 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -223,30 +229,30 @@ card = | ||
| 223 | 229 | |> Jpipe.required "artist" Jdec.string |
| 224 | 230 | |> Jpipe.required "type" Jdec.string |
| 225 | 231 | |> Jpipe.required "cmc" Jdec.int |
| 226 | - |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing | |
| 227 | - |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list color)) Nothing | |
| 228 | - |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing | |
| 232 | + |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing) | |
| 233 | + |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list color)) Nothing) | |
| 234 | + |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing) | |
| 229 | 235 | |> Jpipe.required "id" Jdec.string |
| 230 | 236 | |> Jpipe.required "imageName" Jdec.string |
| 231 | 237 | |> Jpipe.required "layout" layout |
| 232 | 238 | |> Jpipe.required "legalities" (Jdec.list legalityElement) |
| 233 | - |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing | |
| 234 | - |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing | |
| 239 | + |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing) | |
| 240 | + |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing) | |
| 235 | 241 | |> Jpipe.required "multiverseid" Jdec.int |
| 236 | 242 | |> Jpipe.required "name" Jdec.string |
| 237 | - |> Jpipe.optional "originalText" (Jdec.nullable Jdec.string) Nothing | |
| 243 | + |> Jpipe.custom (optionalField "originalText" (Jdec.nullable Jdec.string) Nothing) | |
| 238 | 244 | |> Jpipe.required "originalType" Jdec.string |
| 239 | - |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing | |
| 245 | + |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing) | |
| 240 | 246 | |> Jpipe.required "printings" (Jdec.list Jdec.string) |
| 241 | 247 | |> Jpipe.required "rarity" rarity |
| 242 | - |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing | |
| 243 | - |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing | |
| 244 | - |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 245 | - |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing | |
| 246 | - |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing | |
| 247 | - |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing | |
| 248 | + |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing) | |
| 249 | + |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing) | |
| 250 | + |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 251 | + |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing) | |
| 252 | + |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing) | |
| 253 | + |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing) | |
| 248 | 254 | |> Jpipe.required "types" (Jdec.list purpleType) |
| 249 | - |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing | |
| 255 | + |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing) | |
| 250 | 256 | |
| 251 | 257 | encodeCard : Card -> Jenc.Value |
| 252 | 258 | encodeCard x = |
Test case
1 generated file · +11 −5test/inputs/json/misc/dec3a.json
Melmdefault / QuickType.elm+11 −5
| @@ -94,6 +94,12 @@ type alias Location = | ||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | -- decoders and encoders |
| 97 | +optionalField key decoder fallback = | |
| 98 | + Jdec.dict Jdec.value | |
| 99 | + |> Jdec.andThen (\m -> | |
| 100 | + case Dict.get key m of | |
| 101 | + Nothing -> Jdec.succeed fallback | |
| 102 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 97 | 103 | |
| 98 | 104 | quickTypeToString : QuickType -> String |
| 99 | 105 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -162,17 +168,17 @@ result = | ||
| 162 | 168 | |> Jpipe.required "body" Jdec.string |
| 163 | 169 | |> Jpipe.required "changed" Jdec.string |
| 164 | 170 | |> Jpipe.required "created" Jdec.string |
| 165 | - |> Jpipe.optional "deadline" (Jdec.null ()) () | |
| 166 | - |> Jpipe.optional "hiring_office" (Jdec.null ()) () | |
| 171 | + |> Jpipe.custom (optionalField "deadline" (Jdec.null ()) ()) | |
| 172 | + |> Jpipe.custom (optionalField "hiring_office" (Jdec.null ()) ()) | |
| 167 | 173 | |> Jpipe.required "hiring_org" hiringOrg |
| 168 | - |> Jpipe.optional "job_id" (Jdec.null ()) () | |
| 174 | + |> Jpipe.custom (optionalField "job_id" (Jdec.null ()) ()) | |
| 169 | 175 | |> Jpipe.required "language" Jdec.string |
| 170 | 176 | |> Jpipe.required "location" location |
| 171 | 177 | |> Jpipe.required "num_positions" Jdec.string |
| 172 | 178 | |> Jpipe.required "position" Jdec.string |
| 173 | 179 | |> Jpipe.required "practice_area" Jdec.string |
| 174 | 180 | |> Jpipe.required "qualifications" Jdec.string |
| 175 | - |> Jpipe.optional "relocation_expenses" (Jdec.null ()) () | |
| 181 | + |> Jpipe.custom (optionalField "relocation_expenses" (Jdec.null ()) ()) | |
| 176 | 182 | |> Jpipe.required "salary" Jdec.string |
| 177 | 183 | |> Jpipe.required "title" Jdec.string |
| 178 | 184 | |> Jpipe.required "travel" Jdec.string |
| @@ -231,7 +237,7 @@ location = | ||
| 231 | 237 | |> Jpipe.required "phone_number" Jdec.string |
| 232 | 238 | |> Jpipe.required "phone_number_extension" Jdec.string |
| 233 | 239 | |> Jpipe.required "postal_code" Jdec.string |
| 234 | - |> Jpipe.optional "sub_premise" (Jdec.null ()) () | |
| 240 | + |> Jpipe.custom (optionalField "sub_premise" (Jdec.null ()) ()) | |
| 235 | 241 | |> Jpipe.required "thoroughfare" Jdec.string |
| 236 | 242 | |
| 237 | 243 | encodeLocation : Location -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/df957.json
Melmdefault / QuickType.elm+6 −0
| @@ -138,6 +138,12 @@ type alias Wind = | ||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | -- decoders and encoders |
| 141 | +optionalField key decoder fallback = | |
| 142 | + Jdec.dict Jdec.value | |
| 143 | + |> Jdec.andThen (\m -> | |
| 144 | + case Dict.get key m of | |
| 145 | + Nothing -> Jdec.succeed fallback | |
| 146 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 141 | 147 | |
| 142 | 148 | quickTypeToString : QuickType -> String |
| 143 | 149 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +13 −7test/inputs/json/misc/e0ac7.json
Melmdefault / QuickType.elm+13 −7
| @@ -148,6 +148,12 @@ type alias Pagination = | ||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | -- decoders and encoders |
| 151 | +optionalField key decoder fallback = | |
| 152 | + Jdec.dict Jdec.value | |
| 153 | + |> Jdec.andThen (\m -> | |
| 154 | + case Dict.get key m of | |
| 155 | + Nothing -> Jdec.succeed fallback | |
| 156 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 151 | 157 | |
| 152 | 158 | quickTypeToString : QuickType -> String |
| 153 | 159 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -186,7 +192,7 @@ datum = | ||
| 186 | 192 | |> Jpipe.required "source_tld" Jdec.string |
| 187 | 193 | |> Jpipe.required "trending_datetime" Jdec.string |
| 188 | 194 | |> Jpipe.required "url" Jdec.string |
| 189 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 195 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 190 | 196 | |> Jpipe.required "username" Jdec.string |
| 191 | 197 | |
| 192 | 198 | encodeDatum : Datum -> Jenc.Value |
| @@ -243,7 +249,7 @@ images = | ||
| 243 | 249 | |> Jpipe.required "fixed_width_small" fixedHeight |
| 244 | 250 | |> Jpipe.required "fixed_width_small_still" downsized |
| 245 | 251 | |> Jpipe.required "fixed_width_still" downsized |
| 246 | - |> Jpipe.optional "hd" (Jdec.nullable downsizedSmall) Nothing | |
| 252 | + |> Jpipe.custom (optionalField "hd" (Jdec.nullable downsizedSmall) Nothing) | |
| 247 | 253 | |> Jpipe.required "looping" looping |
| 248 | 254 | |> Jpipe.required "original" fixedHeight |
| 249 | 255 | |> Jpipe.required "original_mp4" downsizedSmall |
| @@ -284,7 +290,7 @@ downsized : Jdec.Decoder Downsized | ||
| 284 | 290 | downsized = |
| 285 | 291 | Jdec.succeed Downsized |
| 286 | 292 | |> Jpipe.required "height" Jdec.string |
| 287 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 293 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 288 | 294 | |> Jpipe.required "url" Jdec.string |
| 289 | 295 | |> Jpipe.required "width" Jdec.string |
| 290 | 296 | |
| @@ -317,11 +323,11 @@ encodeDownsizedSmall x = | ||
| 317 | 323 | fixedHeight : Jdec.Decoder FixedHeight |
| 318 | 324 | fixedHeight = |
| 319 | 325 | Jdec.succeed FixedHeight |
| 320 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 321 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 326 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 327 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 322 | 328 | |> Jpipe.required "height" Jdec.string |
| 323 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 324 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 329 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 330 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 325 | 331 | |> Jpipe.required "size" Jdec.string |
| 326 | 332 | |> Jpipe.required "url" Jdec.string |
| 327 | 333 | |> Jpipe.required "webp" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/misc/e2915.json
Melmdefault / QuickType.elm+6 −0
| @@ -142,6 +142,12 @@ type alias Wind = | ||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | -- decoders and encoders |
| 145 | +optionalField key decoder fallback = | |
| 146 | + Jdec.dict Jdec.value | |
| 147 | + |> Jdec.andThen (\m -> | |
| 148 | + case Dict.get key m of | |
| 149 | + Nothing -> Jdec.succeed fallback | |
| 150 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 145 | 151 | |
| 146 | 152 | quickTypeToString : QuickType -> String |
| 147 | 153 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/e2a58.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickTypeElement = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickType : Jdec.Decoder QuickType |
| 36 | 42 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/e324e.json
Melmdefault / QuickType.elm+6 −0
| @@ -112,6 +112,12 @@ type alias Items = | ||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | -- decoders and encoders |
| 115 | +optionalField key decoder fallback = | |
| 116 | + Jdec.dict Jdec.value | |
| 117 | + |> Jdec.andThen (\m -> | |
| 118 | + case Dict.get key m of | |
| 119 | + Nothing -> Jdec.succeed fallback | |
| 120 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 115 | 121 | |
| 116 | 122 | quickTypeToString : QuickType -> String |
| 117 | 123 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/e53b5.json
Melmdefault / QuickType.elm+6 −0
| @@ -63,6 +63,12 @@ type alias FluffyQuickType = | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | -- decoders and encoders |
| 66 | +optionalField key decoder fallback = | |
| 67 | + Jdec.dict Jdec.value | |
| 68 | + |> Jdec.andThen (\m -> | |
| 69 | + case Dict.get key m of | |
| 70 | + Nothing -> Jdec.succeed fallback | |
| 71 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 66 | 72 | |
| 67 | 73 | quickType : Jdec.Decoder QuickType |
| 68 | 74 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +6 −0test/inputs/json/misc/e64a0.json
Melmdefault / QuickType.elm+6 −0
| @@ -43,6 +43,12 @@ type alias Headers = | ||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | -- decoders and encoders |
| 46 | +optionalField key decoder fallback = | |
| 47 | + Jdec.dict Jdec.value | |
| 48 | + |> Jdec.andThen (\m -> | |
| 49 | + case Dict.get key m of | |
| 50 | + Nothing -> Jdec.succeed fallback | |
| 51 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 46 | 52 | |
| 47 | 53 | quickTypeToString : QuickType -> String |
| 48 | 54 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/e8a0b.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +59 −53test/inputs/json/misc/e8b04.json
Melmdefault / QuickType.elm+59 −53
| @@ -343,6 +343,12 @@ type ViewType | ||
| 343 | 343 | = Tabular |
| 344 | 344 | |
| 345 | 345 | -- decoders and encoders |
| 346 | +optionalField key decoder fallback = | |
| 347 | + Jdec.dict Jdec.value | |
| 348 | + |> Jdec.andThen (\m -> | |
| 349 | + case Dict.get key m of | |
| 350 | + Nothing -> Jdec.succeed fallback | |
| 351 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 346 | 352 | |
| 347 | 353 | quickType : Jdec.Decoder QuickType |
| 348 | 354 | quickType = Jdec.list quickTypeElement |
| @@ -354,21 +360,21 @@ quickTypeElement : Jdec.Decoder QuickTypeElement | ||
| 354 | 360 | quickTypeElement = |
| 355 | 361 | Jdec.succeed QuickTypeElement |
| 356 | 362 | |> Jpipe.required "averageRating" Jdec.int |
| 357 | - |> Jpipe.optional "category" (Jdec.nullable Jdec.string) Nothing | |
| 363 | + |> Jpipe.custom (optionalField "category" (Jdec.nullable Jdec.string) Nothing) | |
| 358 | 364 | |> Jpipe.required "createdAt" Jdec.int |
| 359 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 360 | - |> Jpipe.optional "displayType" (Jdec.nullable displayType) Nothing | |
| 365 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 366 | + |> Jpipe.custom (optionalField "displayType" (Jdec.nullable displayType) Nothing) | |
| 361 | 367 | |> Jpipe.required "downloadCount" Jdec.int |
| 362 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list quickTypeFlag)) Nothing | |
| 368 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list quickTypeFlag)) Nothing) | |
| 363 | 369 | |> Jpipe.required "grants" (Jdec.list grant) |
| 364 | 370 | |> Jpipe.required "hideFromCatalog" Jdec.bool |
| 365 | 371 | |> Jpipe.required "hideFromDataJson" Jdec.bool |
| 366 | 372 | |> Jpipe.required "id" Jdec.string |
| 367 | - |> Jpipe.optional "indexUpdatedAt" (Jdec.nullable Jdec.int) Nothing | |
| 373 | + |> Jpipe.custom (optionalField "indexUpdatedAt" (Jdec.nullable Jdec.int) Nothing) | |
| 368 | 374 | |> Jpipe.required "locale" Jdec.string |
| 369 | 375 | |> Jpipe.required "metadata" quickTypeMetadata |
| 370 | - |> Jpipe.optional "moderationStatus" (Jdec.nullable Jdec.bool) Nothing | |
| 371 | - |> Jpipe.optional "modifyingViewUid" (Jdec.nullable modifyingViewUid) Nothing | |
| 376 | + |> Jpipe.custom (optionalField "moderationStatus" (Jdec.nullable Jdec.bool) Nothing) | |
| 377 | + |> Jpipe.custom (optionalField "modifyingViewUid" (Jdec.nullable modifyingViewUid) Nothing) | |
| 372 | 378 | |> Jpipe.required "name" Jdec.string |
| 373 | 379 | |> Jpipe.required "newBackend" Jdec.bool |
| 374 | 380 | |> Jpipe.required "numberOfComments" Jdec.int |
| @@ -376,19 +382,19 @@ quickTypeElement = | ||
| 376 | 382 | |> Jpipe.required "owner" owner |
| 377 | 383 | |> Jpipe.required "provenance" provenance |
| 378 | 384 | |> Jpipe.required "publicationAppendEnabled" Jdec.bool |
| 379 | - |> Jpipe.optional "publicationDate" (Jdec.nullable Jdec.int) Nothing | |
| 385 | + |> Jpipe.custom (optionalField "publicationDate" (Jdec.nullable Jdec.int) Nothing) | |
| 380 | 386 | |> Jpipe.required "publicationGroup" Jdec.int |
| 381 | 387 | |> Jpipe.required "publicationStage" publicationStage |
| 382 | - |> Jpipe.optional "ratings" (Jdec.nullable ratings) Nothing | |
| 383 | - |> Jpipe.optional "resourceName" (Jdec.nullable Jdec.string) Nothing | |
| 388 | + |> Jpipe.custom (optionalField "ratings" (Jdec.nullable ratings) Nothing) | |
| 389 | + |> Jpipe.custom (optionalField "resourceName" (Jdec.nullable Jdec.string) Nothing) | |
| 384 | 390 | |> Jpipe.required "rights" (Jdec.list right) |
| 385 | - |> Jpipe.optional "rowClass" (Jdec.nullable Jdec.string) Nothing | |
| 386 | - |> Jpipe.optional "rowIdentifierColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 387 | - |> Jpipe.optional "rowsUpdatedAt" (Jdec.nullable Jdec.int) Nothing | |
| 388 | - |> Jpipe.optional "rowsUpdatedBy" (Jdec.nullable rowsUpdatedBy) Nothing | |
| 391 | + |> Jpipe.custom (optionalField "rowClass" (Jdec.nullable Jdec.string) Nothing) | |
| 392 | + |> Jpipe.custom (optionalField "rowIdentifierColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 393 | + |> Jpipe.custom (optionalField "rowsUpdatedAt" (Jdec.nullable Jdec.int) Nothing) | |
| 394 | + |> Jpipe.custom (optionalField "rowsUpdatedBy" (Jdec.nullable rowsUpdatedBy) Nothing) | |
| 389 | 395 | |> Jpipe.required "tableAuthor" tableAuthor |
| 390 | 396 | |> Jpipe.required "tableId" Jdec.int |
| 391 | - |> Jpipe.optional "tags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 397 | + |> Jpipe.custom (optionalField "tags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 392 | 398 | |> Jpipe.required "totalTimesRated" Jdec.int |
| 393 | 399 | |> Jpipe.required "viewCount" Jdec.int |
| 394 | 400 | |> Jpipe.required "viewLastModified" Jdec.int |
| @@ -519,16 +525,16 @@ encodeGrantType x = case x of | ||
| 519 | 525 | quickTypeMetadata : Jdec.Decoder QuickTypeMetadata |
| 520 | 526 | quickTypeMetadata = |
| 521 | 527 | Jdec.succeed QuickTypeMetadata |
| 522 | - |> Jpipe.optional "availableDisplayTypes" (Jdec.nullable (Jdec.list displayType)) Nothing | |
| 523 | - |> Jpipe.optional "custom_fields" (Jdec.nullable customFields) Nothing | |
| 524 | - |> Jpipe.optional "jsonQuery" (Jdec.nullable jsonQuery) Nothing | |
| 525 | - |> Jpipe.optional "rdfClass" (Jdec.nullable Jdec.string) Nothing | |
| 526 | - |> Jpipe.optional "rdfSubject" (Jdec.nullable Jdec.string) Nothing | |
| 527 | - |> Jpipe.optional "renderTypeConfig" (Jdec.nullable metadataRenderTypeConfig) Nothing | |
| 528 | - |> Jpipe.optional "richRendererConfigs" (Jdec.nullable richRendererConfigs) Nothing | |
| 529 | - |> Jpipe.optional "rowIdentifier" (Jdec.nullable Jdec.string) Nothing | |
| 530 | - |> Jpipe.optional "rowLabel" (Jdec.nullable Jdec.string) Nothing | |
| 531 | - |> Jpipe.optional "v1_archived_properties" (Jdec.nullable v1ArchivedProperties) Nothing | |
| 528 | + |> Jpipe.custom (optionalField "availableDisplayTypes" (Jdec.nullable (Jdec.list displayType)) Nothing) | |
| 529 | + |> Jpipe.custom (optionalField "custom_fields" (Jdec.nullable customFields) Nothing) | |
| 530 | + |> Jpipe.custom (optionalField "jsonQuery" (Jdec.nullable jsonQuery) Nothing) | |
| 531 | + |> Jpipe.custom (optionalField "rdfClass" (Jdec.nullable Jdec.string) Nothing) | |
| 532 | + |> Jpipe.custom (optionalField "rdfSubject" (Jdec.nullable Jdec.string) Nothing) | |
| 533 | + |> Jpipe.custom (optionalField "renderTypeConfig" (Jdec.nullable metadataRenderTypeConfig) Nothing) | |
| 534 | + |> Jpipe.custom (optionalField "richRendererConfigs" (Jdec.nullable richRendererConfigs) Nothing) | |
| 535 | + |> Jpipe.custom (optionalField "rowIdentifier" (Jdec.nullable Jdec.string) Nothing) | |
| 536 | + |> Jpipe.custom (optionalField "rowLabel" (Jdec.nullable Jdec.string) Nothing) | |
| 537 | + |> Jpipe.custom (optionalField "v1_archived_properties" (Jdec.nullable v1ArchivedProperties) Nothing) | |
| 532 | 538 | |
| 533 | 539 | encodeQuickTypeMetadata : QuickTypeMetadata -> Jenc.Value |
| 534 | 540 | encodeQuickTypeMetadata x = |
| @@ -570,10 +576,10 @@ encodeTest x = | ||
| 570 | 576 | jsonQuery : Jdec.Decoder JSONQuery |
| 571 | 577 | jsonQuery = |
| 572 | 578 | Jdec.succeed JSONQuery |
| 573 | - |> Jpipe.optional "group" (Jdec.nullable (Jdec.list group)) Nothing | |
| 574 | - |> Jpipe.optional "where" (Jdec.nullable purpleWhere) Nothing | |
| 575 | - |> Jpipe.optional "order" (Jdec.nullable (Jdec.list order)) Nothing | |
| 576 | - |> Jpipe.optional "select" (Jdec.nullable (Jdec.list select)) Nothing | |
| 579 | + |> Jpipe.custom (optionalField "group" (Jdec.nullable (Jdec.list group)) Nothing) | |
| 580 | + |> Jpipe.custom (optionalField "where" (Jdec.nullable purpleWhere) Nothing) | |
| 581 | + |> Jpipe.custom (optionalField "order" (Jdec.nullable (Jdec.list order)) Nothing) | |
| 582 | + |> Jpipe.custom (optionalField "select" (Jdec.nullable (Jdec.list select)) Nothing) | |
| 577 | 583 | |
| 578 | 584 | encodeJSONQuery : JSONQuery -> Jenc.Value |
| 579 | 585 | encodeJSONQuery x = |
| @@ -598,11 +604,11 @@ encodeGroup x = | ||
| 598 | 604 | purpleWhere : Jdec.Decoder Where |
| 599 | 605 | purpleWhere = |
| 600 | 606 | Jdec.succeed Where |
| 601 | - |> Jpipe.optional "children" (Jdec.nullable (Jdec.list child)) Nothing | |
| 602 | - |> Jpipe.optional "columnFieldName" (Jdec.nullable childColumnFieldName) Nothing | |
| 603 | - |> Jpipe.optional "metadata" (Jdec.nullable childMetadata) Nothing | |
| 607 | + |> Jpipe.custom (optionalField "children" (Jdec.nullable (Jdec.list child)) Nothing) | |
| 608 | + |> Jpipe.custom (optionalField "columnFieldName" (Jdec.nullable childColumnFieldName) Nothing) | |
| 609 | + |> Jpipe.custom (optionalField "metadata" (Jdec.nullable childMetadata) Nothing) | |
| 604 | 610 | |> Jpipe.required "operator" whereOperator |
| 605 | - |> Jpipe.optional "value" (Jdec.nullable Jdec.string) Nothing | |
| 611 | + |> Jpipe.custom (optionalField "value" (Jdec.nullable Jdec.string) Nothing) | |
| 606 | 612 | |
| 607 | 613 | encodeWhere : Where -> Jenc.Value |
| 608 | 614 | encodeWhere x = |
| @@ -618,9 +624,9 @@ child : Jdec.Decoder Child | ||
| 618 | 624 | child = |
| 619 | 625 | Jdec.succeed Child |
| 620 | 626 | |> Jpipe.required "columnFieldName" childColumnFieldName |
| 621 | - |> Jpipe.optional "metadata" (Jdec.nullable childMetadata) Nothing | |
| 627 | + |> Jpipe.custom (optionalField "metadata" (Jdec.nullable childMetadata) Nothing) | |
| 622 | 628 | |> Jpipe.required "operator" childOperator |
| 623 | - |> Jpipe.optional "value" (Jdec.nullable Jdec.string) Nothing | |
| 629 | + |> Jpipe.custom (optionalField "value" (Jdec.nullable Jdec.string) Nothing) | |
| 624 | 630 | |
| 625 | 631 | encodeChild : Child -> Jenc.Value |
| 626 | 632 | encodeChild x = |
| @@ -653,12 +659,12 @@ encodeChildColumnFieldName x = case x of | ||
| 653 | 659 | childMetadata : Jdec.Decoder ChildMetadata |
| 654 | 660 | childMetadata = |
| 655 | 661 | Jdec.succeed ChildMetadata |
| 656 | - |> Jpipe.optional "customValues" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 657 | - |> Jpipe.optional "freeform" (Jdec.nullable Jdec.bool) Nothing | |
| 658 | - |> Jpipe.optional "includeAuto" (Jdec.nullable Jdec.int) Nothing | |
| 659 | - |> Jpipe.optional "operator" (Jdec.nullable metadataOperator) Nothing | |
| 660 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable tableColumnID) Nothing | |
| 661 | - |> Jpipe.optional "unifiedVersion" (Jdec.nullable Jdec.int) Nothing | |
| 662 | + |> Jpipe.custom (optionalField "customValues" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 663 | + |> Jpipe.custom (optionalField "freeform" (Jdec.nullable Jdec.bool) Nothing) | |
| 664 | + |> Jpipe.custom (optionalField "includeAuto" (Jdec.nullable Jdec.int) Nothing) | |
| 665 | + |> Jpipe.custom (optionalField "operator" (Jdec.nullable metadataOperator) Nothing) | |
| 666 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable tableColumnID) Nothing) | |
| 667 | + |> Jpipe.custom (optionalField "unifiedVersion" (Jdec.nullable Jdec.int) Nothing) | |
| 662 | 668 | |
| 663 | 669 | encodeChildMetadata : ChildMetadata -> Jenc.Value |
| 664 | 670 | encodeChildMetadata x = |
| @@ -760,7 +766,7 @@ encodeOrderColumnFieldName x = case x of | ||
| 760 | 766 | select : Jdec.Decoder Select |
| 761 | 767 | select = |
| 762 | 768 | Jdec.succeed Select |
| 763 | - |> Jpipe.optional "aggregate" (Jdec.nullable Jdec.string) Nothing | |
| 769 | + |> Jpipe.custom (optionalField "aggregate" (Jdec.nullable Jdec.string) Nothing) | |
| 764 | 770 | |> Jpipe.required "columnFieldName" Jdec.string |
| 765 | 771 | |
| 766 | 772 | encodeSelect : Select -> Jenc.Value |
| @@ -784,8 +790,8 @@ encodeMetadataRenderTypeConfig x = | ||
| 784 | 790 | purpleVisible : Jdec.Decoder PurpleVisible |
| 785 | 791 | purpleVisible = |
| 786 | 792 | Jdec.succeed PurpleVisible |
| 787 | - |> Jpipe.optional "fatrow" (Jdec.nullable Jdec.bool) Nothing | |
| 788 | - |> Jpipe.optional "table" (Jdec.nullable Jdec.bool) Nothing | |
| 793 | + |> Jpipe.custom (optionalField "fatrow" (Jdec.nullable Jdec.bool) Nothing) | |
| 794 | + |> Jpipe.custom (optionalField "table" (Jdec.nullable Jdec.bool) Nothing) | |
| 789 | 795 | |
| 790 | 796 | encodePurpleVisible : PurpleVisible -> Jenc.Value |
| 791 | 797 | encodePurpleVisible x = |
| @@ -963,14 +969,14 @@ owner : Jdec.Decoder Owner | ||
| 963 | 969 | owner = |
| 964 | 970 | Jdec.succeed Owner |
| 965 | 971 | |> Jpipe.required "displayName" Jdec.string |
| 966 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 972 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 967 | 973 | |> Jpipe.required "id" Jdec.string |
| 968 | - |> Jpipe.optional "lastNotificationSeenAt" (Jdec.nullable Jdec.int) Nothing | |
| 969 | - |> Jpipe.optional "profileImageUrlLarge" (Jdec.nullable Jdec.string) Nothing | |
| 970 | - |> Jpipe.optional "profileImageUrlMedium" (Jdec.nullable Jdec.string) Nothing | |
| 971 | - |> Jpipe.optional "profileImageUrlSmall" (Jdec.nullable Jdec.string) Nothing | |
| 972 | - |> Jpipe.optional "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 973 | - |> Jpipe.optional "roleName" (Jdec.nullable roleName) Nothing | |
| 974 | + |> Jpipe.custom (optionalField "lastNotificationSeenAt" (Jdec.nullable Jdec.int) Nothing) | |
| 975 | + |> Jpipe.custom (optionalField "profileImageUrlLarge" (Jdec.nullable Jdec.string) Nothing) | |
| 976 | + |> Jpipe.custom (optionalField "profileImageUrlMedium" (Jdec.nullable Jdec.string) Nothing) | |
| 977 | + |> Jpipe.custom (optionalField "profileImageUrlSmall" (Jdec.nullable Jdec.string) Nothing) | |
| 978 | + |> Jpipe.custom (optionalField "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 979 | + |> Jpipe.custom (optionalField "roleName" (Jdec.nullable roleName) Nothing) | |
| 974 | 980 | |> Jpipe.required "screenName" Jdec.string |
| 975 | 981 | |
| 976 | 982 | encodeOwner : Owner -> Jenc.Value |
| @@ -1077,8 +1083,8 @@ tableAuthor = | ||
| 1077 | 1083 | Jdec.succeed TableAuthor |
| 1078 | 1084 | |> Jpipe.required "displayName" Jdec.string |
| 1079 | 1085 | |> Jpipe.required "id" Jdec.string |
| 1080 | - |> Jpipe.optional "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 1081 | - |> Jpipe.optional "roleName" (Jdec.nullable roleName) Nothing | |
| 1086 | + |> Jpipe.custom (optionalField "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 1087 | + |> Jpipe.custom (optionalField "roleName" (Jdec.nullable roleName) Nothing) | |
| 1082 | 1088 | |> Jpipe.required "screenName" Jdec.string |
| 1083 | 1089 | |
| 1084 | 1090 | encodeTableAuthor : TableAuthor -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/ed095.json
Melmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = Dict String String |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.dict Jdec.string |
Test case
1 generated file · +25 −19test/inputs/json/misc/f22f5.json
Melmdefault / QuickType.elm+25 −19
| @@ -131,6 +131,12 @@ type Kind | ||
| 131 | 131 | = T3 |
| 132 | 132 | |
| 133 | 133 | -- decoders and encoders |
| 134 | +optionalField key decoder fallback = | |
| 135 | + Jdec.dict Jdec.value | |
| 136 | + |> Jdec.andThen (\m -> | |
| 137 | + case Dict.get key m of | |
| 138 | + Nothing -> Jdec.succeed fallback | |
| 139 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 134 | 140 | |
| 135 | 141 | quickTypeToString : QuickType -> String |
| 136 | 142 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -152,7 +158,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 152 | 158 | quickTypeData = |
| 153 | 159 | Jdec.succeed QuickTypeData |
| 154 | 160 | |> Jpipe.required "after" Jdec.string |
| 155 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 161 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 156 | 162 | |> Jpipe.required "children" (Jdec.list child) |
| 157 | 163 | |> Jpipe.required "modhash" Jdec.string |
| 158 | 164 | |
| @@ -181,14 +187,14 @@ encodeChild x = | ||
| 181 | 187 | childData : Jdec.Decoder ChildData |
| 182 | 188 | childData = |
| 183 | 189 | Jdec.succeed ChildData |
| 184 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 185 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 190 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 191 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 186 | 192 | |> Jpipe.required "archived" Jdec.bool |
| 187 | 193 | |> Jpipe.required "author" Jdec.string |
| 188 | - |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) () | |
| 189 | - |> Jpipe.optional "author_flair_text" (Jdec.null ()) () | |
| 190 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 191 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 194 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ()) | |
| 195 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ()) | |
| 196 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 197 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 192 | 198 | |> Jpipe.required "brand_safe" Jdec.bool |
| 193 | 199 | |> Jpipe.required "can_gild" Jdec.bool |
| 194 | 200 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -196,7 +202,7 @@ childData = | ||
| 196 | 202 | |> Jpipe.required "contest_mode" Jdec.bool |
| 197 | 203 | |> Jpipe.required "created" Jdec.float |
| 198 | 204 | |> Jpipe.required "created_utc" Jdec.float |
| 199 | - |> Jpipe.optional "distinguished" (Jdec.null ()) () | |
| 205 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ()) | |
| 200 | 206 | |> Jpipe.required "domain" Jdec.string |
| 201 | 207 | |> Jpipe.required "downs" Jdec.int |
| 202 | 208 | |> Jpipe.required "edited" Jdec.bool |
| @@ -206,40 +212,40 @@ childData = | ||
| 206 | 212 | |> Jpipe.required "id" Jdec.string |
| 207 | 213 | |> Jpipe.required "is_self" Jdec.bool |
| 208 | 214 | |> Jpipe.required "is_video" Jdec.bool |
| 209 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 210 | - |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 211 | - |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 215 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 216 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 217 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 212 | 218 | |> Jpipe.required "locked" Jdec.bool |
| 213 | - |> Jpipe.optional "media" (Jdec.null ()) () | |
| 219 | + |> Jpipe.custom (optionalField "media" (Jdec.null ()) ()) | |
| 214 | 220 | |> Jpipe.required "media_embed" mediaEmbed |
| 215 | 221 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 216 | 222 | |> Jpipe.required "name" Jdec.string |
| 217 | 223 | |> Jpipe.required "num_comments" Jdec.int |
| 218 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 224 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 219 | 225 | |> Jpipe.required "over_18" Jdec.bool |
| 220 | 226 | |> Jpipe.required "permalink" Jdec.string |
| 221 | 227 | |> Jpipe.required "quarantine" Jdec.bool |
| 222 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 223 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 228 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 229 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 224 | 230 | |> Jpipe.required "saved" Jdec.bool |
| 225 | 231 | |> Jpipe.required "score" Jdec.int |
| 226 | - |> Jpipe.optional "secure_media" (Jdec.null ()) () | |
| 232 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ()) | |
| 227 | 233 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 228 | 234 | |> Jpipe.required "selftext" Jdec.string |
| 229 | - |> Jpipe.optional "selftext_html" (Jdec.null ()) () | |
| 235 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ()) | |
| 230 | 236 | |> Jpipe.required "spoiler" Jdec.bool |
| 231 | 237 | |> Jpipe.required "stickied" Jdec.bool |
| 232 | 238 | |> Jpipe.required "subreddit" subreddit |
| 233 | 239 | |> Jpipe.required "subreddit_id" subredditID |
| 234 | 240 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 235 | 241 | |> Jpipe.required "subreddit_type" subredditType |
| 236 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 242 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 237 | 243 | |> Jpipe.required "thumbnail" Jdec.string |
| 238 | 244 | |> Jpipe.required "title" Jdec.string |
| 239 | 245 | |> Jpipe.required "ups" Jdec.int |
| 240 | 246 | |> Jpipe.required "url" Jdec.string |
| 241 | 247 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 242 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 248 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 243 | 249 | |> Jpipe.required "visited" Jdec.bool |
| 244 | 250 | |
| 245 | 251 | encodeChildData : ChildData -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/f3139.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickTypeElement = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickType : Jdec.Decoder QuickType |
| 36 | 42 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/f3edf.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/misc/f466a.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type Country | ||
| 39 | 39 | = UnitedStates |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickType : Jdec.Decoder QuickType |
| 44 | 50 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +13 −7test/inputs/json/misc/f6a65.json
Melmdefault / QuickType.elm+13 −7
| @@ -156,6 +156,12 @@ type alias Pagination = | ||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | -- decoders and encoders |
| 159 | +optionalField key decoder fallback = | |
| 160 | + Jdec.dict Jdec.value | |
| 161 | + |> Jdec.andThen (\m -> | |
| 162 | + case Dict.get key m of | |
| 163 | + Nothing -> Jdec.succeed fallback | |
| 164 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 159 | 165 | |
| 160 | 166 | quickTypeToString : QuickType -> String |
| 161 | 167 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -194,7 +200,7 @@ datum = | ||
| 194 | 200 | |> Jpipe.required "source_tld" Jdec.string |
| 195 | 201 | |> Jpipe.required "trending_datetime" Jdec.string |
| 196 | 202 | |> Jpipe.required "url" Jdec.string |
| 197 | - |> Jpipe.optional "user" (Jdec.nullable user) Nothing | |
| 203 | + |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing) | |
| 198 | 204 | |> Jpipe.required "username" username |
| 199 | 205 | |
| 200 | 206 | encodeDatum : Datum -> Jenc.Value |
| @@ -258,7 +264,7 @@ images = | ||
| 258 | 264 | |> Jpipe.required "preview" downsizedSmall |
| 259 | 265 | |> Jpipe.required "preview_gif" the480WStill |
| 260 | 266 | |> Jpipe.required "preview_webp" the480WStill |
| 261 | - |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing | |
| 267 | + |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing) | |
| 262 | 268 | |
| 263 | 269 | encodeImages : Images -> Jenc.Value |
| 264 | 270 | encodeImages x = |
| @@ -292,7 +298,7 @@ the480WStill : Jdec.Decoder The480_WStill | ||
| 292 | 298 | the480WStill = |
| 293 | 299 | Jdec.succeed The480_WStill |
| 294 | 300 | |> Jpipe.required "height" Jdec.string |
| 295 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing | |
| 301 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing) | |
| 296 | 302 | |> Jpipe.required "url" Jdec.string |
| 297 | 303 | |> Jpipe.required "width" Jdec.string |
| 298 | 304 | |
| @@ -325,11 +331,11 @@ encodeDownsizedSmall x = | ||
| 325 | 331 | fixedHeight : Jdec.Decoder FixedHeight |
| 326 | 332 | fixedHeight = |
| 327 | 333 | Jdec.succeed FixedHeight |
| 328 | - |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing | |
| 329 | - |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing | |
| 334 | + |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing) | |
| 335 | + |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing) | |
| 330 | 336 | |> Jpipe.required "height" Jdec.string |
| 331 | - |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing | |
| 332 | - |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing | |
| 337 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing) | |
| 338 | + |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing) | |
| 333 | 339 | |> Jpipe.required "size" Jdec.string |
| 334 | 340 | |> Jpipe.required "url" Jdec.string |
| 335 | 341 | |> Jpipe.required "webp" Jdec.string |
Test case
1 generated file · +12 −6test/inputs/json/misc/f74d5.json
Melmdefault / QuickType.elm+12 −6
| @@ -160,6 +160,12 @@ type alias Owner = | ||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | -- decoders and encoders |
| 163 | +optionalField key decoder fallback = | |
| 164 | + Jdec.dict Jdec.value | |
| 165 | + |> Jdec.andThen (\m -> | |
| 166 | + case Dict.get key m of | |
| 167 | + Nothing -> Jdec.succeed fallback | |
| 168 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 163 | 169 | |
| 164 | 170 | quickTypeToString : QuickType -> String |
| 165 | 171 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -286,17 +292,17 @@ encodeView x = | ||
| 286 | 292 | column : Jdec.Decoder Column |
| 287 | 293 | column = |
| 288 | 294 | Jdec.succeed Column |
| 289 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 295 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 290 | 296 | |> Jpipe.required "dataTypeName" typeName |
| 291 | 297 | |> Jpipe.required "fieldName" Jdec.string |
| 292 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 298 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 293 | 299 | |> Jpipe.required "format" query |
| 294 | 300 | |> Jpipe.required "id" Jdec.int |
| 295 | 301 | |> Jpipe.required "name" Jdec.string |
| 296 | 302 | |> Jpipe.required "position" Jdec.int |
| 297 | 303 | |> Jpipe.required "renderTypeName" typeName |
| 298 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 299 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 304 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 305 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 300 | 306 | |
| 301 | 307 | encodeColumn : Column -> Jenc.Value |
| 302 | 308 | encodeColumn x = |
| @@ -317,12 +323,12 @@ encodeColumn x = | ||
| 317 | 323 | cachedContents : Jdec.Decoder CachedContents |
| 318 | 324 | cachedContents = |
| 319 | 325 | Jdec.succeed CachedContents |
| 320 | - |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing | |
| 326 | + |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing) | |
| 321 | 327 | |> Jpipe.required "largest" Jdec.string |
| 322 | 328 | |> Jpipe.required "non_null" Jdec.int |
| 323 | 329 | |> Jpipe.required "null" Jdec.int |
| 324 | 330 | |> Jpipe.required "smallest" Jdec.string |
| 325 | - |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing | |
| 331 | + |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing) | |
| 326 | 332 | |> Jpipe.required "top" (Jdec.list top) |
| 327 | 333 | |
| 328 | 334 | encodeCachedContents : CachedContents -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/misc/f82d9.json
Melmdefault / QuickType.elm+6 −0
| @@ -126,6 +126,12 @@ type alias Items = | ||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | -- decoders and encoders |
| 129 | +optionalField key decoder fallback = | |
| 130 | + Jdec.dict Jdec.value | |
| 131 | + |> Jdec.andThen (\m -> | |
| 132 | + case Dict.get key m of | |
| 133 | + Nothing -> Jdec.succeed fallback | |
| 134 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 129 | 135 | |
| 130 | 136 | quickTypeToString : QuickType -> String |
| 131 | 137 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/f974d.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickType = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickTypeToString : QuickType -> String |
| 36 | 42 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/misc/faff5.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias Response = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +16 −10test/inputs/json/misc/fcca3.json
Melmdefault / QuickType.elm+16 −10
| @@ -272,6 +272,12 @@ type alias Expression = | ||
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | -- decoders and encoders |
| 275 | +optionalField key decoder fallback = | |
| 276 | + Jdec.dict Jdec.value | |
| 277 | + |> Jdec.andThen (\m -> | |
| 278 | + case Dict.get key m of | |
| 279 | + Nothing -> Jdec.succeed fallback | |
| 280 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 275 | 281 | |
| 276 | 282 | quickTypeToString : QuickType -> String |
| 277 | 283 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -400,18 +406,18 @@ encodeView x = | ||
| 400 | 406 | column : Jdec.Decoder Column |
| 401 | 407 | column = |
| 402 | 408 | Jdec.succeed Column |
| 403 | - |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing | |
| 409 | + |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing) | |
| 404 | 410 | |> Jpipe.required "dataTypeName" typeName |
| 405 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 411 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 406 | 412 | |> Jpipe.required "fieldName" Jdec.string |
| 407 | - |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 413 | + |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 408 | 414 | |> Jpipe.required "format" format |
| 409 | 415 | |> Jpipe.required "id" Jdec.int |
| 410 | 416 | |> Jpipe.required "name" Jdec.string |
| 411 | 417 | |> Jpipe.required "position" Jdec.int |
| 412 | 418 | |> Jpipe.required "renderTypeName" typeName |
| 413 | - |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing | |
| 414 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing | |
| 419 | + |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing) | |
| 420 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing) | |
| 415 | 421 | |
| 416 | 422 | encodeColumn : Column -> Jenc.Value |
| 417 | 423 | encodeColumn x = |
| @@ -433,12 +439,12 @@ encodeColumn x = | ||
| 433 | 439 | cachedContents : Jdec.Decoder CachedContents |
| 434 | 440 | cachedContents = |
| 435 | 441 | Jdec.succeed CachedContents |
| 436 | - |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing | |
| 442 | + |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing) | |
| 437 | 443 | |> Jpipe.required "largest" Jdec.string |
| 438 | 444 | |> Jpipe.required "non_null" Jdec.int |
| 439 | 445 | |> Jpipe.required "null" Jdec.int |
| 440 | 446 | |> Jpipe.required "smallest" Jdec.string |
| 441 | - |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing | |
| 447 | + |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing) | |
| 442 | 448 | |> Jpipe.required "top" (Jdec.list top) |
| 443 | 449 | |
| 444 | 450 | encodeCachedContents : CachedContents -> Jenc.Value |
| @@ -486,9 +492,9 @@ encodeTypeName x = case x of | ||
| 486 | 492 | format : Jdec.Decoder Format |
| 487 | 493 | format = |
| 488 | 494 | Jdec.succeed Format |
| 489 | - |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing | |
| 490 | - |> Jpipe.optional "noCommas" (Jdec.nullable Jdec.string) Nothing | |
| 491 | - |> Jpipe.optional "precisionStyle" (Jdec.nullable Jdec.string) Nothing | |
| 495 | + |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing) | |
| 496 | + |> Jpipe.custom (optionalField "noCommas" (Jdec.nullable Jdec.string) Nothing) | |
| 497 | + |> Jpipe.custom (optionalField "precisionStyle" (Jdec.nullable Jdec.string) Nothing) | |
| 492 | 498 | |
| 493 | 499 | encodeFormat : Format -> Jenc.Value |
| 494 | 500 | encodeFormat x = |
Test case
1 generated file · +6 −0test/inputs/json/misc/fd329.json
Melmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type alias Description = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/blns-object.json
Melmdefault / QuickType.elm+6 −0
| @@ -625,6 +625,12 @@ type alias C = | ||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | -- decoders and encoders |
| 628 | +optionalField key decoder fallback = | |
| 629 | + Jdec.dict Jdec.value | |
| 630 | + |> Jdec.andThen (\m -> | |
| 631 | + case Dict.get key m of | |
| 632 | + Nothing -> Jdec.succeed fallback | |
| 633 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 628 | 634 | |
| 629 | 635 | quickTypeToString : QuickType -> String |
| 630 | 636 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/bug2037.json
Melmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type alias Reward = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/priority/bug2521.json
Melmdefault / QuickType.elm+7 −1
| @@ -33,6 +33,12 @@ type alias Option = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -51,7 +57,7 @@ encodeQuickType x = | ||
| 51 | 57 | option : Jdec.Decoder Option |
| 52 | 58 | option = |
| 53 | 59 | Jdec.succeed Option |
| 54 | - |> Jpipe.optional "foo" (Jdec.nullable Jdec.string) Nothing | |
| 60 | + |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.string) Nothing) | |
| 55 | 61 | |> Jpipe.required "name" Jdec.string |
| 56 | 62 | |
| 57 | 63 | encodeOption : Option -> Jenc.Value |
Test case
1 generated file · +8 −2test/inputs/json/priority/bug2590.json
Melmdefault / QuickType.elm+8 −2
| @@ -34,6 +34,12 @@ type alias Invoice = | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | -- decoders and encoders |
| 37 | +optionalField key decoder fallback = | |
| 38 | + Jdec.dict Jdec.value | |
| 39 | + |> Jdec.andThen (\m -> | |
| 40 | + case Dict.get key m of | |
| 41 | + Nothing -> Jdec.succeed fallback | |
| 42 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 37 | 43 | |
| 38 | 44 | quickTypeToString : QuickType -> String |
| 39 | 45 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -52,8 +58,8 @@ encodeQuickType x = | ||
| 52 | 58 | invoice : Jdec.Decoder Invoice |
| 53 | 59 | invoice = |
| 54 | 60 | Jdec.succeed Invoice |
| 55 | - |> Jpipe.optional "createdAt" (Jdec.nullable Jdec.string) Nothing | |
| 56 | - |> Jpipe.optional "dueDate" (Jdec.nullable Jdec.string) Nothing | |
| 61 | + |> Jpipe.custom (optionalField "createdAt" (Jdec.nullable Jdec.string) Nothing) | |
| 62 | + |> Jpipe.custom (optionalField "dueDate" (Jdec.nullable Jdec.string) Nothing) | |
| 57 | 63 | |> Jpipe.required "name" Jdec.string |
| 58 | 64 | |
| 59 | 65 | encodeInvoice : Invoice -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/priority/bug2663.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/bug2793.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type alias Labels = | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickTypeToString : QuickType -> String |
| 44 | 50 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/bug855-short.json
Melmdefault / QuickType.elm+6 −0
| @@ -34,6 +34,12 @@ type alias QuickTypeValue = | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | -- decoders and encoders |
| 37 | +optionalField key decoder fallback = | |
| 38 | + Jdec.dict Jdec.value | |
| 39 | + |> Jdec.andThen (\m -> | |
| 40 | + case Dict.get key m of | |
| 41 | + Nothing -> Jdec.succeed fallback | |
| 42 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 37 | 43 | |
| 38 | 44 | quickType : Jdec.Decoder QuickType |
| 39 | 45 | quickType = Jdec.dict quickTypeValue |
Test case
1 generated file · +6 −0test/inputs/json/priority/bug863.json
Melmdefault / QuickType.elm+6 −0
| @@ -125,6 +125,12 @@ type alias FluffyQuickType = | ||
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | -- decoders and encoders |
| 128 | +optionalField key decoder fallback = | |
| 129 | + Jdec.dict Jdec.value | |
| 130 | + |> Jdec.andThen (\m -> | |
| 131 | + case Dict.get key m of | |
| 132 | + Nothing -> Jdec.succeed fallback | |
| 133 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 128 | 134 | |
| 129 | 135 | quickType : Jdec.Decoder QuickType |
| 130 | 136 | quickType = Jdec.list quickTypeUnion |
Test case
1 generated file · +6 −0test/inputs/json/priority/coin-pairs.json
Melmdefault / QuickType.elm+6 −0
| @@ -40,6 +40,12 @@ type alias Pair = | ||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | -- decoders and encoders |
| 43 | +optionalField key decoder fallback = | |
| 44 | + Jdec.dict Jdec.value | |
| 45 | + |> Jdec.andThen (\m -> | |
| 46 | + case Dict.get key m of | |
| 47 | + Nothing -> Jdec.succeed fallback | |
| 48 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 43 | 49 | |
| 44 | 50 | quickTypeToString : QuickType -> String |
| 45 | 51 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
2 generated files · +486 −474test/inputs/json/priority/combinations1.json
Melmarray-type-array--eed288b23e27 / QuickType.elm+243 −237
| @@ -551,6 +551,12 @@ type Jacutinga | ||
| 551 | 551 | | UnionMapInJacutinga (Dict String (Maybe Int)) |
| 552 | 552 | |
| 553 | 553 | -- decoders and encoders |
| 554 | +optionalField key decoder fallback = | |
| 555 | + Jdec.dict Jdec.value | |
| 556 | + |> Jdec.andThen (\m -> | |
| 557 | + case Dict.get key m of | |
| 558 | + Nothing -> Jdec.succeed fallback | |
| 559 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 554 | 560 | |
| 555 | 561 | quickTypeToString : QuickType -> String |
| 556 | 562 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -667,26 +673,26 @@ encodeCerographElement x = case x of | ||
| 667 | 673 | cerographClass : Jdec.Decoder CerographClass |
| 668 | 674 | cerographClass = |
| 669 | 675 | Jdec.succeed CerographClass |
| 670 | - |> Jpipe.optional "apotropaion" (Jdec.null ()) () | |
| 671 | - |> Jpipe.optional "casuary" (Jdec.null ()) () | |
| 672 | - |> Jpipe.optional "creaker" (Jdec.null ()) () | |
| 673 | - |> Jpipe.optional "disqualification" (Jdec.null ()) () | |
| 674 | - |> Jpipe.optional "imperatorious" (Jdec.null ()) () | |
| 675 | - |> Jpipe.optional "impermeabilize" (Jdec.null ()) () | |
| 676 | - |> Jpipe.optional "metastoma" (Jdec.null ()) () | |
| 677 | - |> Jpipe.optional "noctidiurnal" (Jdec.null ()) () | |
| 678 | - |> Jpipe.optional "nonreserve" (Jdec.null ()) () | |
| 679 | - |> Jpipe.optional "ophthalmotonometry" (Jdec.null ()) () | |
| 680 | - |> Jpipe.optional "pailful" (Jdec.null ()) () | |
| 681 | - |> Jpipe.optional "pigfish" (Jdec.null ()) () | |
| 682 | - |> Jpipe.optional "pongee" (Jdec.null ()) () | |
| 683 | - |> Jpipe.optional "prosodical" (Jdec.null ()) () | |
| 684 | - |> Jpipe.optional "scrofuloderm" (Jdec.null ()) () | |
| 685 | - |> Jpipe.optional "storekeeping" (Jdec.null ()) () | |
| 686 | - |> Jpipe.optional "therologist" (Jdec.null ()) () | |
| 687 | - |> Jpipe.optional "Tolowa" (Jdec.null ()) () | |
| 688 | - |> Jpipe.optional "tradeful" (Jdec.null ()) () | |
| 689 | - |> Jpipe.optional "unriveting" (Jdec.null ()) () | |
| 676 | + |> Jpipe.custom (optionalField "apotropaion" (Jdec.null ()) ()) | |
| 677 | + |> Jpipe.custom (optionalField "casuary" (Jdec.null ()) ()) | |
| 678 | + |> Jpipe.custom (optionalField "creaker" (Jdec.null ()) ()) | |
| 679 | + |> Jpipe.custom (optionalField "disqualification" (Jdec.null ()) ()) | |
| 680 | + |> Jpipe.custom (optionalField "imperatorious" (Jdec.null ()) ()) | |
| 681 | + |> Jpipe.custom (optionalField "impermeabilize" (Jdec.null ()) ()) | |
| 682 | + |> Jpipe.custom (optionalField "metastoma" (Jdec.null ()) ()) | |
| 683 | + |> Jpipe.custom (optionalField "noctidiurnal" (Jdec.null ()) ()) | |
| 684 | + |> Jpipe.custom (optionalField "nonreserve" (Jdec.null ()) ()) | |
| 685 | + |> Jpipe.custom (optionalField "ophthalmotonometry" (Jdec.null ()) ()) | |
| 686 | + |> Jpipe.custom (optionalField "pailful" (Jdec.null ()) ()) | |
| 687 | + |> Jpipe.custom (optionalField "pigfish" (Jdec.null ()) ()) | |
| 688 | + |> Jpipe.custom (optionalField "pongee" (Jdec.null ()) ()) | |
| 689 | + |> Jpipe.custom (optionalField "prosodical" (Jdec.null ()) ()) | |
| 690 | + |> Jpipe.custom (optionalField "scrofuloderm" (Jdec.null ()) ()) | |
| 691 | + |> Jpipe.custom (optionalField "storekeeping" (Jdec.null ()) ()) | |
| 692 | + |> Jpipe.custom (optionalField "therologist" (Jdec.null ()) ()) | |
| 693 | + |> Jpipe.custom (optionalField "Tolowa" (Jdec.null ()) ()) | |
| 694 | + |> Jpipe.custom (optionalField "tradeful" (Jdec.null ()) ()) | |
| 695 | + |> Jpipe.custom (optionalField "unriveting" (Jdec.null ()) ()) | |
| 690 | 696 | |
| 691 | 697 | encodeCerographClass : CerographClass -> Jenc.Value |
| 692 | 698 | encodeCerographClass x = |
| @@ -728,31 +734,31 @@ encodeChemotherapeuticElement x = case x of | ||
| 728 | 734 | chemotherapeuticClass : Jdec.Decoder ChemotherapeuticClass |
| 729 | 735 | chemotherapeuticClass = |
| 730 | 736 | Jdec.succeed ChemotherapeuticClass |
| 731 | - |> Jpipe.optional "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 732 | - |> Jpipe.optional "availment" (Jdec.nullable (Jdec.null ())) Nothing | |
| 733 | - |> Jpipe.optional "bladelet" (Jdec.nullable (Jdec.null ())) Nothing | |
| 734 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 735 | - |> Jpipe.optional "caulis" (Jdec.nullable (Jdec.null ())) Nothing | |
| 736 | - |> Jpipe.optional "chalcus" (Jdec.nullable (Jdec.null ())) Nothing | |
| 737 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 738 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 739 | - |> Jpipe.optional "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing | |
| 740 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 741 | - |> Jpipe.optional "imporosity" (Jdec.nullable (Jdec.null ())) Nothing | |
| 742 | - |> Jpipe.optional "insistently" (Jdec.nullable (Jdec.null ())) Nothing | |
| 743 | - |> Jpipe.optional "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 744 | - |> Jpipe.optional "ivied" (Jdec.nullable (Jdec.null ())) Nothing | |
| 745 | - |> Jpipe.optional "Maureen" (Jdec.nullable (Jdec.null ())) Nothing | |
| 746 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 747 | - |> Jpipe.optional "nostochine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 748 | - |> Jpipe.optional "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing | |
| 749 | - |> Jpipe.optional "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing | |
| 750 | - |> Jpipe.optional "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing | |
| 751 | - |> Jpipe.optional "precoincident" (Jdec.nullable (Jdec.null ())) Nothing | |
| 752 | - |> Jpipe.optional "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 753 | - |> Jpipe.optional "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 754 | - |> Jpipe.optional "tetherball" (Jdec.nullable (Jdec.null ())) Nothing | |
| 755 | - |> Jpipe.optional "unshy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 737 | + |> Jpipe.custom (optionalField "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 738 | + |> Jpipe.custom (optionalField "availment" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 739 | + |> Jpipe.custom (optionalField "bladelet" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 740 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 741 | + |> Jpipe.custom (optionalField "caulis" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 742 | + |> Jpipe.custom (optionalField "chalcus" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 743 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 744 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 745 | + |> Jpipe.custom (optionalField "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 746 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 747 | + |> Jpipe.custom (optionalField "imporosity" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 748 | + |> Jpipe.custom (optionalField "insistently" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 749 | + |> Jpipe.custom (optionalField "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 750 | + |> Jpipe.custom (optionalField "ivied" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 751 | + |> Jpipe.custom (optionalField "Maureen" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 752 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 753 | + |> Jpipe.custom (optionalField "nostochine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 754 | + |> Jpipe.custom (optionalField "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 755 | + |> Jpipe.custom (optionalField "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 756 | + |> Jpipe.custom (optionalField "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 757 | + |> Jpipe.custom (optionalField "precoincident" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 758 | + |> Jpipe.custom (optionalField "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 759 | + |> Jpipe.custom (optionalField "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 760 | + |> Jpipe.custom (optionalField "tetherball" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 761 | + |> Jpipe.custom (optionalField "unshy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 756 | 762 | |
| 757 | 763 | encodeChemotherapeuticClass : ChemotherapeuticClass -> Jenc.Value |
| 758 | 764 | encodeChemotherapeuticClass x = |
| @@ -805,7 +811,7 @@ cimeliaClass = | ||
| 805 | 811 | |> Jpipe.required "Chirotherium" Jdec.int |
| 806 | 812 | |> Jpipe.required "disdiapason" Jdec.string |
| 807 | 813 | |> Jpipe.required "homocerc" Jdec.bool |
| 808 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 814 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 809 | 815 | |
| 810 | 816 | encodeCimeliaClass : CimeliaClass -> Jenc.Value |
| 811 | 817 | encodeCimeliaClass x = |
| @@ -844,31 +850,31 @@ encodeCoadjustElement x = case x of | ||
| 844 | 850 | coadjustClass : Jdec.Decoder CoadjustClass |
| 845 | 851 | coadjustClass = |
| 846 | 852 | Jdec.succeed CoadjustClass |
| 847 | - |> Jpipe.optional "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 848 | - |> Jpipe.optional "Benny" (Jdec.nullable (Jdec.null ())) Nothing | |
| 849 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 850 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 851 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 852 | - |> Jpipe.optional "ensnare" (Jdec.nullable (Jdec.null ())) Nothing | |
| 853 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 854 | - |> Jpipe.optional "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 855 | - |> Jpipe.optional "leastwise" (Jdec.nullable (Jdec.null ())) Nothing | |
| 856 | - |> Jpipe.optional "lof" (Jdec.nullable (Jdec.null ())) Nothing | |
| 857 | - |> Jpipe.optional "monkhood" (Jdec.nullable (Jdec.null ())) Nothing | |
| 858 | - |> Jpipe.optional "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 859 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 860 | - |> Jpipe.optional "peonism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 861 | - |> Jpipe.optional "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing | |
| 862 | - |> Jpipe.optional "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing | |
| 863 | - |> Jpipe.optional "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing | |
| 864 | - |> Jpipe.optional "rosal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 865 | - |> Jpipe.optional "scalenous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 866 | - |> Jpipe.optional "scopine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 867 | - |> Jpipe.optional "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing | |
| 868 | - |> Jpipe.optional "suberinize" (Jdec.nullable (Jdec.null ())) Nothing | |
| 869 | - |> Jpipe.optional "symbiot" (Jdec.nullable (Jdec.null ())) Nothing | |
| 870 | - |> Jpipe.optional "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing | |
| 871 | - |> Jpipe.optional "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing | |
| 853 | + |> Jpipe.custom (optionalField "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 854 | + |> Jpipe.custom (optionalField "Benny" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 855 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 856 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 857 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 858 | + |> Jpipe.custom (optionalField "ensnare" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 859 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 860 | + |> Jpipe.custom (optionalField "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 861 | + |> Jpipe.custom (optionalField "leastwise" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 862 | + |> Jpipe.custom (optionalField "lof" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 863 | + |> Jpipe.custom (optionalField "monkhood" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 864 | + |> Jpipe.custom (optionalField "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 865 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 866 | + |> Jpipe.custom (optionalField "peonism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 867 | + |> Jpipe.custom (optionalField "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 868 | + |> Jpipe.custom (optionalField "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 869 | + |> Jpipe.custom (optionalField "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 870 | + |> Jpipe.custom (optionalField "rosal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 871 | + |> Jpipe.custom (optionalField "scalenous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 872 | + |> Jpipe.custom (optionalField "scopine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 873 | + |> Jpipe.custom (optionalField "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 874 | + |> Jpipe.custom (optionalField "suberinize" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 875 | + |> Jpipe.custom (optionalField "symbiot" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 876 | + |> Jpipe.custom (optionalField "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 877 | + |> Jpipe.custom (optionalField "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 872 | 878 | |
| 873 | 879 | encodeCoadjustClass : CoadjustClass -> Jenc.Value |
| 874 | 880 | encodeCoadjustClass x = |
| @@ -953,26 +959,26 @@ encodeCredulityElement x = case x of | ||
| 953 | 959 | credulityClass : Jdec.Decoder CredulityClass |
| 954 | 960 | credulityClass = |
| 955 | 961 | Jdec.succeed CredulityClass |
| 956 | - |> Jpipe.optional "ammonolytic" (Jdec.null ()) () | |
| 957 | - |> Jpipe.optional "bushmaster" (Jdec.null ()) () | |
| 958 | - |> Jpipe.optional "considering" (Jdec.null ()) () | |
| 959 | - |> Jpipe.optional "consuetudinary" (Jdec.null ()) () | |
| 960 | - |> Jpipe.optional "embarras" (Jdec.null ()) () | |
| 961 | - |> Jpipe.optional "fineness" (Jdec.null ()) () | |
| 962 | - |> Jpipe.optional "flaithship" (Jdec.null ()) () | |
| 963 | - |> Jpipe.optional "Flavia" (Jdec.null ()) () | |
| 964 | - |> Jpipe.optional "gruffly" (Jdec.null ()) () | |
| 965 | - |> Jpipe.optional "Hedychium" (Jdec.null ()) () | |
| 966 | - |> Jpipe.optional "leadwort" (Jdec.null ()) () | |
| 967 | - |> Jpipe.optional "overseriously" (Jdec.null ()) () | |
| 968 | - |> Jpipe.optional "parabola" (Jdec.null ()) () | |
| 969 | - |> Jpipe.optional "pectinatodenticulate" (Jdec.null ()) () | |
| 970 | - |> Jpipe.optional "Popean" (Jdec.null ()) () | |
| 971 | - |> Jpipe.optional "pornocrat" (Jdec.null ()) () | |
| 972 | - |> Jpipe.optional "quadrisect" (Jdec.null ()) () | |
| 973 | - |> Jpipe.optional "seriality" (Jdec.null ()) () | |
| 974 | - |> Jpipe.optional "vamphorn" (Jdec.null ()) () | |
| 975 | - |> Jpipe.optional "wharp" (Jdec.null ()) () | |
| 962 | + |> Jpipe.custom (optionalField "ammonolytic" (Jdec.null ()) ()) | |
| 963 | + |> Jpipe.custom (optionalField "bushmaster" (Jdec.null ()) ()) | |
| 964 | + |> Jpipe.custom (optionalField "considering" (Jdec.null ()) ()) | |
| 965 | + |> Jpipe.custom (optionalField "consuetudinary" (Jdec.null ()) ()) | |
| 966 | + |> Jpipe.custom (optionalField "embarras" (Jdec.null ()) ()) | |
| 967 | + |> Jpipe.custom (optionalField "fineness" (Jdec.null ()) ()) | |
| 968 | + |> Jpipe.custom (optionalField "flaithship" (Jdec.null ()) ()) | |
| 969 | + |> Jpipe.custom (optionalField "Flavia" (Jdec.null ()) ()) | |
| 970 | + |> Jpipe.custom (optionalField "gruffly" (Jdec.null ()) ()) | |
| 971 | + |> Jpipe.custom (optionalField "Hedychium" (Jdec.null ()) ()) | |
| 972 | + |> Jpipe.custom (optionalField "leadwort" (Jdec.null ()) ()) | |
| 973 | + |> Jpipe.custom (optionalField "overseriously" (Jdec.null ()) ()) | |
| 974 | + |> Jpipe.custom (optionalField "parabola" (Jdec.null ()) ()) | |
| 975 | + |> Jpipe.custom (optionalField "pectinatodenticulate" (Jdec.null ()) ()) | |
| 976 | + |> Jpipe.custom (optionalField "Popean" (Jdec.null ()) ()) | |
| 977 | + |> Jpipe.custom (optionalField "pornocrat" (Jdec.null ()) ()) | |
| 978 | + |> Jpipe.custom (optionalField "quadrisect" (Jdec.null ()) ()) | |
| 979 | + |> Jpipe.custom (optionalField "seriality" (Jdec.null ()) ()) | |
| 980 | + |> Jpipe.custom (optionalField "vamphorn" (Jdec.null ()) ()) | |
| 981 | + |> Jpipe.custom (optionalField "wharp" (Jdec.null ()) ()) | |
| 976 | 982 | |
| 977 | 983 | encodeCredulityClass : CredulityClass -> Jenc.Value |
| 978 | 984 | encodeCredulityClass x = |
| @@ -1030,26 +1036,26 @@ encodeDeruralizeElement x = case x of | ||
| 1030 | 1036 | deruralizeClass : Jdec.Decoder DeruralizeClass |
| 1031 | 1037 | deruralizeClass = |
| 1032 | 1038 | Jdec.succeed DeruralizeClass |
| 1033 | - |> Jpipe.optional "bockerel" (Jdec.null ()) () | |
| 1034 | - |> Jpipe.optional "boulder" (Jdec.null ()) () | |
| 1035 | - |> Jpipe.optional "churrus" (Jdec.null ()) () | |
| 1036 | - |> Jpipe.optional "counterdigged" (Jdec.null ()) () | |
| 1037 | - |> Jpipe.optional "dialogite" (Jdec.null ()) () | |
| 1038 | - |> Jpipe.optional "digenic" (Jdec.null ()) () | |
| 1039 | - |> Jpipe.optional "dunbird" (Jdec.null ()) () | |
| 1040 | - |> Jpipe.optional "ergatogyne" (Jdec.null ()) () | |
| 1041 | - |> Jpipe.optional "fiendful" (Jdec.null ()) () | |
| 1042 | - |> Jpipe.optional "jackrod" (Jdec.null ()) () | |
| 1043 | - |> Jpipe.optional "Jehovistic" (Jdec.null ()) () | |
| 1044 | - |> Jpipe.optional "Paninean" (Jdec.null ()) () | |
| 1045 | - |> Jpipe.optional "panther" (Jdec.null ()) () | |
| 1046 | - |> Jpipe.optional "placentigerous" (Jdec.null ()) () | |
| 1047 | - |> Jpipe.optional "Romney" (Jdec.null ()) () | |
| 1048 | - |> Jpipe.optional "sparm" (Jdec.null ()) () | |
| 1049 | - |> Jpipe.optional "tocsin" (Jdec.null ()) () | |
| 1050 | - |> Jpipe.optional "unnicked" (Jdec.null ()) () | |
| 1051 | - |> Jpipe.optional "unstavable" (Jdec.null ()) () | |
| 1052 | - |> Jpipe.optional "windfirm" (Jdec.null ()) () | |
| 1039 | + |> Jpipe.custom (optionalField "bockerel" (Jdec.null ()) ()) | |
| 1040 | + |> Jpipe.custom (optionalField "boulder" (Jdec.null ()) ()) | |
| 1041 | + |> Jpipe.custom (optionalField "churrus" (Jdec.null ()) ()) | |
| 1042 | + |> Jpipe.custom (optionalField "counterdigged" (Jdec.null ()) ()) | |
| 1043 | + |> Jpipe.custom (optionalField "dialogite" (Jdec.null ()) ()) | |
| 1044 | + |> Jpipe.custom (optionalField "digenic" (Jdec.null ()) ()) | |
| 1045 | + |> Jpipe.custom (optionalField "dunbird" (Jdec.null ()) ()) | |
| 1046 | + |> Jpipe.custom (optionalField "ergatogyne" (Jdec.null ()) ()) | |
| 1047 | + |> Jpipe.custom (optionalField "fiendful" (Jdec.null ()) ()) | |
| 1048 | + |> Jpipe.custom (optionalField "jackrod" (Jdec.null ()) ()) | |
| 1049 | + |> Jpipe.custom (optionalField "Jehovistic" (Jdec.null ()) ()) | |
| 1050 | + |> Jpipe.custom (optionalField "Paninean" (Jdec.null ()) ()) | |
| 1051 | + |> Jpipe.custom (optionalField "panther" (Jdec.null ()) ()) | |
| 1052 | + |> Jpipe.custom (optionalField "placentigerous" (Jdec.null ()) ()) | |
| 1053 | + |> Jpipe.custom (optionalField "Romney" (Jdec.null ()) ()) | |
| 1054 | + |> Jpipe.custom (optionalField "sparm" (Jdec.null ()) ()) | |
| 1055 | + |> Jpipe.custom (optionalField "tocsin" (Jdec.null ()) ()) | |
| 1056 | + |> Jpipe.custom (optionalField "unnicked" (Jdec.null ()) ()) | |
| 1057 | + |> Jpipe.custom (optionalField "unstavable" (Jdec.null ()) ()) | |
| 1058 | + |> Jpipe.custom (optionalField "windfirm" (Jdec.null ()) ()) | |
| 1053 | 1059 | |
| 1054 | 1060 | encodeDeruralizeClass : DeruralizeClass -> Jenc.Value |
| 1055 | 1061 | encodeDeruralizeClass x = |
| @@ -1093,26 +1099,26 @@ encodeDiaereseElement x = case x of | ||
| 1093 | 1099 | diaereseClass : Jdec.Decoder DiaereseClass |
| 1094 | 1100 | diaereseClass = |
| 1095 | 1101 | Jdec.succeed DiaereseClass |
| 1096 | - |> Jpipe.optional "Amoreuxia" (Jdec.null ()) () | |
| 1097 | - |> Jpipe.optional "ani" (Jdec.null ()) () | |
| 1098 | - |> Jpipe.optional "bernicle" (Jdec.null ()) () | |
| 1099 | - |> Jpipe.optional "blackwasher" (Jdec.null ()) () | |
| 1100 | - |> Jpipe.optional "blowhard" (Jdec.null ()) () | |
| 1101 | - |> Jpipe.optional "broma" (Jdec.null ()) () | |
| 1102 | - |> Jpipe.optional "closecross" (Jdec.null ()) () | |
| 1103 | - |> Jpipe.optional "congregationalism" (Jdec.null ()) () | |
| 1104 | - |> Jpipe.optional "grayly" (Jdec.null ()) () | |
| 1105 | - |> Jpipe.optional "historically" (Jdec.null ()) () | |
| 1106 | - |> Jpipe.optional "hoast" (Jdec.null ()) () | |
| 1107 | - |> Jpipe.optional "irretentive" (Jdec.null ()) () | |
| 1108 | - |> Jpipe.optional "parcener" (Jdec.null ()) () | |
| 1109 | - |> Jpipe.optional "pedder" (Jdec.null ()) () | |
| 1110 | - |> Jpipe.optional "pseudoanatomic" (Jdec.null ()) () | |
| 1111 | - |> Jpipe.optional "rhizocarpian" (Jdec.null ()) () | |
| 1112 | - |> Jpipe.optional "samel" (Jdec.null ()) () | |
| 1113 | - |> Jpipe.optional "silker" (Jdec.null ()) () | |
| 1114 | - |> Jpipe.optional "subdentated" (Jdec.null ()) () | |
| 1115 | - |> Jpipe.optional "subobscure" (Jdec.null ()) () | |
| 1102 | + |> Jpipe.custom (optionalField "Amoreuxia" (Jdec.null ()) ()) | |
| 1103 | + |> Jpipe.custom (optionalField "ani" (Jdec.null ()) ()) | |
| 1104 | + |> Jpipe.custom (optionalField "bernicle" (Jdec.null ()) ()) | |
| 1105 | + |> Jpipe.custom (optionalField "blackwasher" (Jdec.null ()) ()) | |
| 1106 | + |> Jpipe.custom (optionalField "blowhard" (Jdec.null ()) ()) | |
| 1107 | + |> Jpipe.custom (optionalField "broma" (Jdec.null ()) ()) | |
| 1108 | + |> Jpipe.custom (optionalField "closecross" (Jdec.null ()) ()) | |
| 1109 | + |> Jpipe.custom (optionalField "congregationalism" (Jdec.null ()) ()) | |
| 1110 | + |> Jpipe.custom (optionalField "grayly" (Jdec.null ()) ()) | |
| 1111 | + |> Jpipe.custom (optionalField "historically" (Jdec.null ()) ()) | |
| 1112 | + |> Jpipe.custom (optionalField "hoast" (Jdec.null ()) ()) | |
| 1113 | + |> Jpipe.custom (optionalField "irretentive" (Jdec.null ()) ()) | |
| 1114 | + |> Jpipe.custom (optionalField "parcener" (Jdec.null ()) ()) | |
| 1115 | + |> Jpipe.custom (optionalField "pedder" (Jdec.null ()) ()) | |
| 1116 | + |> Jpipe.custom (optionalField "pseudoanatomic" (Jdec.null ()) ()) | |
| 1117 | + |> Jpipe.custom (optionalField "rhizocarpian" (Jdec.null ()) ()) | |
| 1118 | + |> Jpipe.custom (optionalField "samel" (Jdec.null ()) ()) | |
| 1119 | + |> Jpipe.custom (optionalField "silker" (Jdec.null ()) ()) | |
| 1120 | + |> Jpipe.custom (optionalField "subdentated" (Jdec.null ()) ()) | |
| 1121 | + |> Jpipe.custom (optionalField "subobscure" (Jdec.null ()) ()) | |
| 1116 | 1122 | |
| 1117 | 1123 | encodeDiaereseClass : DiaereseClass -> Jenc.Value |
| 1118 | 1124 | encodeDiaereseClass x = |
| @@ -1170,26 +1176,26 @@ encodeEleutheromania x = case x of | ||
| 1170 | 1176 | encrust : Jdec.Decoder Encrust |
| 1171 | 1177 | encrust = |
| 1172 | 1178 | Jdec.succeed Encrust |
| 1173 | - |> Jpipe.optional "comradely" (Jdec.null ()) () | |
| 1174 | - |> Jpipe.optional "diacanthous" (Jdec.null ()) () | |
| 1175 | - |> Jpipe.optional "feminineness" (Jdec.null ()) () | |
| 1176 | - |> Jpipe.optional "gossamered" (Jdec.null ()) () | |
| 1177 | - |> Jpipe.optional "Hibernia" (Jdec.null ()) () | |
| 1178 | - |> Jpipe.optional "Hibiscus" (Jdec.null ()) () | |
| 1179 | - |> Jpipe.optional "Lepidosauria" (Jdec.null ()) () | |
| 1180 | - |> Jpipe.optional "lollingly" (Jdec.null ()) () | |
| 1181 | - |> Jpipe.optional "manager" (Jdec.null ()) () | |
| 1182 | - |> Jpipe.optional "mechanic" (Jdec.null ()) () | |
| 1183 | - |> Jpipe.optional "overminuteness" (Jdec.null ()) () | |
| 1184 | - |> Jpipe.optional "papelonne" (Jdec.null ()) () | |
| 1185 | - |> Jpipe.optional "plebification" (Jdec.null ()) () | |
| 1186 | - |> Jpipe.optional "pugmiller" (Jdec.null ()) () | |
| 1187 | - |> Jpipe.optional "recoveror" (Jdec.null ()) () | |
| 1188 | - |> Jpipe.optional "spermatoblastic" (Jdec.null ()) () | |
| 1189 | - |> Jpipe.optional "Syllidae" (Jdec.null ()) () | |
| 1190 | - |> Jpipe.optional "ungyved" (Jdec.null ()) () | |
| 1191 | - |> Jpipe.optional "whirlabout" (Jdec.null ()) () | |
| 1192 | - |> Jpipe.optional "woodenware" (Jdec.null ()) () | |
| 1179 | + |> Jpipe.custom (optionalField "comradely" (Jdec.null ()) ()) | |
| 1180 | + |> Jpipe.custom (optionalField "diacanthous" (Jdec.null ()) ()) | |
| 1181 | + |> Jpipe.custom (optionalField "feminineness" (Jdec.null ()) ()) | |
| 1182 | + |> Jpipe.custom (optionalField "gossamered" (Jdec.null ()) ()) | |
| 1183 | + |> Jpipe.custom (optionalField "Hibernia" (Jdec.null ()) ()) | |
| 1184 | + |> Jpipe.custom (optionalField "Hibiscus" (Jdec.null ()) ()) | |
| 1185 | + |> Jpipe.custom (optionalField "Lepidosauria" (Jdec.null ()) ()) | |
| 1186 | + |> Jpipe.custom (optionalField "lollingly" (Jdec.null ()) ()) | |
| 1187 | + |> Jpipe.custom (optionalField "manager" (Jdec.null ()) ()) | |
| 1188 | + |> Jpipe.custom (optionalField "mechanic" (Jdec.null ()) ()) | |
| 1189 | + |> Jpipe.custom (optionalField "overminuteness" (Jdec.null ()) ()) | |
| 1190 | + |> Jpipe.custom (optionalField "papelonne" (Jdec.null ()) ()) | |
| 1191 | + |> Jpipe.custom (optionalField "plebification" (Jdec.null ()) ()) | |
| 1192 | + |> Jpipe.custom (optionalField "pugmiller" (Jdec.null ()) ()) | |
| 1193 | + |> Jpipe.custom (optionalField "recoveror" (Jdec.null ()) ()) | |
| 1194 | + |> Jpipe.custom (optionalField "spermatoblastic" (Jdec.null ()) ()) | |
| 1195 | + |> Jpipe.custom (optionalField "Syllidae" (Jdec.null ()) ()) | |
| 1196 | + |> Jpipe.custom (optionalField "ungyved" (Jdec.null ()) ()) | |
| 1197 | + |> Jpipe.custom (optionalField "whirlabout" (Jdec.null ()) ()) | |
| 1198 | + |> Jpipe.custom (optionalField "woodenware" (Jdec.null ()) ()) | |
| 1193 | 1199 | |
| 1194 | 1200 | encodeEncrust : Encrust -> Jenc.Value |
| 1195 | 1201 | encodeEncrust x = |
| @@ -1269,26 +1275,26 @@ encodeFagginglyElement x = case x of | ||
| 1269 | 1275 | fagginglyClass : Jdec.Decoder FagginglyClass |
| 1270 | 1276 | fagginglyClass = |
| 1271 | 1277 | Jdec.succeed FagginglyClass |
| 1272 | - |> Jpipe.optional "abranchian" (Jdec.null ()) () | |
| 1273 | - |> Jpipe.optional "aculeiform" (Jdec.null ()) () | |
| 1274 | - |> Jpipe.optional "adiaphoristic" (Jdec.null ()) () | |
| 1275 | - |> Jpipe.optional "adoptionism" (Jdec.null ()) () | |
| 1276 | - |> Jpipe.optional "Anglic" (Jdec.null ()) () | |
| 1277 | - |> Jpipe.optional "antrotomy" (Jdec.null ()) () | |
| 1278 | - |> Jpipe.optional "coerciveness" (Jdec.null ()) () | |
| 1279 | - |> Jpipe.optional "decorist" (Jdec.null ()) () | |
| 1280 | - |> Jpipe.optional "duckhood" (Jdec.null ()) () | |
| 1281 | - |> Jpipe.optional "Heteromeri" (Jdec.null ()) () | |
| 1282 | - |> Jpipe.optional "hypochnose" (Jdec.null ()) () | |
| 1283 | - |> Jpipe.optional "lochage" (Jdec.null ()) () | |
| 1284 | - |> Jpipe.optional "melee" (Jdec.null ()) () | |
| 1285 | - |> Jpipe.optional "nonconformitant" (Jdec.null ()) () | |
| 1286 | - |> Jpipe.optional "Poinsettia" (Jdec.null ()) () | |
| 1287 | - |> Jpipe.optional "putatively" (Jdec.null ()) () | |
| 1288 | - |> Jpipe.optional "semivolatile" (Jdec.null ()) () | |
| 1289 | - |> Jpipe.optional "soleas" (Jdec.null ()) () | |
| 1290 | - |> Jpipe.optional "unfastenable" (Jdec.null ()) () | |
| 1291 | - |> Jpipe.optional "unmillinered" (Jdec.null ()) () | |
| 1278 | + |> Jpipe.custom (optionalField "abranchian" (Jdec.null ()) ()) | |
| 1279 | + |> Jpipe.custom (optionalField "aculeiform" (Jdec.null ()) ()) | |
| 1280 | + |> Jpipe.custom (optionalField "adiaphoristic" (Jdec.null ()) ()) | |
| 1281 | + |> Jpipe.custom (optionalField "adoptionism" (Jdec.null ()) ()) | |
| 1282 | + |> Jpipe.custom (optionalField "Anglic" (Jdec.null ()) ()) | |
| 1283 | + |> Jpipe.custom (optionalField "antrotomy" (Jdec.null ()) ()) | |
| 1284 | + |> Jpipe.custom (optionalField "coerciveness" (Jdec.null ()) ()) | |
| 1285 | + |> Jpipe.custom (optionalField "decorist" (Jdec.null ()) ()) | |
| 1286 | + |> Jpipe.custom (optionalField "duckhood" (Jdec.null ()) ()) | |
| 1287 | + |> Jpipe.custom (optionalField "Heteromeri" (Jdec.null ()) ()) | |
| 1288 | + |> Jpipe.custom (optionalField "hypochnose" (Jdec.null ()) ()) | |
| 1289 | + |> Jpipe.custom (optionalField "lochage" (Jdec.null ()) ()) | |
| 1290 | + |> Jpipe.custom (optionalField "melee" (Jdec.null ()) ()) | |
| 1291 | + |> Jpipe.custom (optionalField "nonconformitant" (Jdec.null ()) ()) | |
| 1292 | + |> Jpipe.custom (optionalField "Poinsettia" (Jdec.null ()) ()) | |
| 1293 | + |> Jpipe.custom (optionalField "putatively" (Jdec.null ()) ()) | |
| 1294 | + |> Jpipe.custom (optionalField "semivolatile" (Jdec.null ()) ()) | |
| 1295 | + |> Jpipe.custom (optionalField "soleas" (Jdec.null ()) ()) | |
| 1296 | + |> Jpipe.custom (optionalField "unfastenable" (Jdec.null ()) ()) | |
| 1297 | + |> Jpipe.custom (optionalField "unmillinered" (Jdec.null ()) ()) | |
| 1292 | 1298 | |
| 1293 | 1299 | encodeFagginglyClass : FagginglyClass -> Jenc.Value |
| 1294 | 1300 | encodeFagginglyClass x = |
| @@ -1330,26 +1336,26 @@ encodeFenkElement x = case x of | ||
| 1330 | 1336 | fenkClass : Jdec.Decoder FenkClass |
| 1331 | 1337 | fenkClass = |
| 1332 | 1338 | Jdec.succeed FenkClass |
| 1333 | - |> Jpipe.optional "apoise" (Jdec.null ()) () | |
| 1334 | - |> Jpipe.optional "astronomize" (Jdec.null ()) () | |
| 1335 | - |> Jpipe.optional "cockhorse" (Jdec.null ()) () | |
| 1336 | - |> Jpipe.optional "copular" (Jdec.null ()) () | |
| 1337 | - |> Jpipe.optional "Dagomba" (Jdec.null ()) () | |
| 1338 | - |> Jpipe.optional "draffy" (Jdec.null ()) () | |
| 1339 | - |> Jpipe.optional "foreigner" (Jdec.null ()) () | |
| 1340 | - |> Jpipe.optional "Guyandot" (Jdec.null ()) () | |
| 1341 | - |> Jpipe.optional "neurogliosis" (Jdec.null ()) () | |
| 1342 | - |> Jpipe.optional "osmious" (Jdec.null ()) () | |
| 1343 | - |> Jpipe.optional "palpitate" (Jdec.null ()) () | |
| 1344 | - |> Jpipe.optional "rebukeable" (Jdec.null ()) () | |
| 1345 | - |> Jpipe.optional "Reinwardtia" (Jdec.null ()) () | |
| 1346 | - |> Jpipe.optional "reservatory" (Jdec.null ()) () | |
| 1347 | - |> Jpipe.optional "scalt" (Jdec.null ()) () | |
| 1348 | - |> Jpipe.optional "scripturalize" (Jdec.null ()) () | |
| 1349 | - |> Jpipe.optional "tintometer" (Jdec.null ()) () | |
| 1350 | - |> Jpipe.optional "Tritoness" (Jdec.null ()) () | |
| 1351 | - |> Jpipe.optional "undergrade" (Jdec.null ()) () | |
| 1352 | - |> Jpipe.optional "undermountain" (Jdec.null ()) () | |
| 1339 | + |> Jpipe.custom (optionalField "apoise" (Jdec.null ()) ()) | |
| 1340 | + |> Jpipe.custom (optionalField "astronomize" (Jdec.null ()) ()) | |
| 1341 | + |> Jpipe.custom (optionalField "cockhorse" (Jdec.null ()) ()) | |
| 1342 | + |> Jpipe.custom (optionalField "copular" (Jdec.null ()) ()) | |
| 1343 | + |> Jpipe.custom (optionalField "Dagomba" (Jdec.null ()) ()) | |
| 1344 | + |> Jpipe.custom (optionalField "draffy" (Jdec.null ()) ()) | |
| 1345 | + |> Jpipe.custom (optionalField "foreigner" (Jdec.null ()) ()) | |
| 1346 | + |> Jpipe.custom (optionalField "Guyandot" (Jdec.null ()) ()) | |
| 1347 | + |> Jpipe.custom (optionalField "neurogliosis" (Jdec.null ()) ()) | |
| 1348 | + |> Jpipe.custom (optionalField "osmious" (Jdec.null ()) ()) | |
| 1349 | + |> Jpipe.custom (optionalField "palpitate" (Jdec.null ()) ()) | |
| 1350 | + |> Jpipe.custom (optionalField "rebukeable" (Jdec.null ()) ()) | |
| 1351 | + |> Jpipe.custom (optionalField "Reinwardtia" (Jdec.null ()) ()) | |
| 1352 | + |> Jpipe.custom (optionalField "reservatory" (Jdec.null ()) ()) | |
| 1353 | + |> Jpipe.custom (optionalField "scalt" (Jdec.null ()) ()) | |
| 1354 | + |> Jpipe.custom (optionalField "scripturalize" (Jdec.null ()) ()) | |
| 1355 | + |> Jpipe.custom (optionalField "tintometer" (Jdec.null ()) ()) | |
| 1356 | + |> Jpipe.custom (optionalField "Tritoness" (Jdec.null ()) ()) | |
| 1357 | + |> Jpipe.custom (optionalField "undergrade" (Jdec.null ()) ()) | |
| 1358 | + |> Jpipe.custom (optionalField "undermountain" (Jdec.null ()) ()) | |
| 1353 | 1359 | |
| 1354 | 1360 | encodeFenkClass : FenkClass -> Jenc.Value |
| 1355 | 1361 | encodeFenkClass x = |
| @@ -1393,26 +1399,26 @@ encodeFlagmakingElement x = case x of | ||
| 1393 | 1399 | flagmakingClass : Jdec.Decoder FlagmakingClass |
| 1394 | 1400 | flagmakingClass = |
| 1395 | 1401 | Jdec.succeed FlagmakingClass |
| 1396 | - |> Jpipe.optional "albarco" (Jdec.null ()) () | |
| 1397 | - |> Jpipe.optional "Bunodonta" (Jdec.null ()) () | |
| 1398 | - |> Jpipe.optional "hornify" (Jdec.null ()) () | |
| 1399 | - |> Jpipe.optional "Hydrocorisae" (Jdec.null ()) () | |
| 1400 | - |> Jpipe.optional "hypoglossus" (Jdec.null ()) () | |
| 1401 | - |> Jpipe.optional "inexpiably" (Jdec.null ()) () | |
| 1402 | - |> Jpipe.optional "ingratitude" (Jdec.null ()) () | |
| 1403 | - |> Jpipe.optional "ladyfly" (Jdec.null ()) () | |
| 1404 | - |> Jpipe.optional "medicament" (Jdec.null ()) () | |
| 1405 | - |> Jpipe.optional "monogrammatic" (Jdec.null ()) () | |
| 1406 | - |> Jpipe.optional "nobbut" (Jdec.null ()) () | |
| 1407 | - |> Jpipe.optional "Notacanthidae" (Jdec.null ()) () | |
| 1408 | - |> Jpipe.optional "polyplacophore" (Jdec.null ()) () | |
| 1409 | - |> Jpipe.optional "proexercise" (Jdec.null ()) () | |
| 1410 | - |> Jpipe.optional "protoplast" (Jdec.null ()) () | |
| 1411 | - |> Jpipe.optional "puzzling" (Jdec.null ()) () | |
| 1412 | - |> Jpipe.optional "splanchnoskeleton" (Jdec.null ()) () | |
| 1413 | - |> Jpipe.optional "unloveliness" (Jdec.null ()) () | |
| 1414 | - |> Jpipe.optional "unquarantined" (Jdec.null ()) () | |
| 1415 | - |> Jpipe.optional "unrenounceable" (Jdec.null ()) () | |
| 1402 | + |> Jpipe.custom (optionalField "albarco" (Jdec.null ()) ()) | |
| 1403 | + |> Jpipe.custom (optionalField "Bunodonta" (Jdec.null ()) ()) | |
| 1404 | + |> Jpipe.custom (optionalField "hornify" (Jdec.null ()) ()) | |
| 1405 | + |> Jpipe.custom (optionalField "Hydrocorisae" (Jdec.null ()) ()) | |
| 1406 | + |> Jpipe.custom (optionalField "hypoglossus" (Jdec.null ()) ()) | |
| 1407 | + |> Jpipe.custom (optionalField "inexpiably" (Jdec.null ()) ()) | |
| 1408 | + |> Jpipe.custom (optionalField "ingratitude" (Jdec.null ()) ()) | |
| 1409 | + |> Jpipe.custom (optionalField "ladyfly" (Jdec.null ()) ()) | |
| 1410 | + |> Jpipe.custom (optionalField "medicament" (Jdec.null ()) ()) | |
| 1411 | + |> Jpipe.custom (optionalField "monogrammatic" (Jdec.null ()) ()) | |
| 1412 | + |> Jpipe.custom (optionalField "nobbut" (Jdec.null ()) ()) | |
| 1413 | + |> Jpipe.custom (optionalField "Notacanthidae" (Jdec.null ()) ()) | |
| 1414 | + |> Jpipe.custom (optionalField "polyplacophore" (Jdec.null ()) ()) | |
| 1415 | + |> Jpipe.custom (optionalField "proexercise" (Jdec.null ()) ()) | |
| 1416 | + |> Jpipe.custom (optionalField "protoplast" (Jdec.null ()) ()) | |
| 1417 | + |> Jpipe.custom (optionalField "puzzling" (Jdec.null ()) ()) | |
| 1418 | + |> Jpipe.custom (optionalField "splanchnoskeleton" (Jdec.null ()) ()) | |
| 1419 | + |> Jpipe.custom (optionalField "unloveliness" (Jdec.null ()) ()) | |
| 1420 | + |> Jpipe.custom (optionalField "unquarantined" (Jdec.null ()) ()) | |
| 1421 | + |> Jpipe.custom (optionalField "unrenounceable" (Jdec.null ()) ()) | |
| 1416 | 1422 | |
| 1417 | 1423 | encodeFlagmakingClass : FlagmakingClass -> Jenc.Value |
| 1418 | 1424 | encodeFlagmakingClass x = |
| @@ -1520,31 +1526,31 @@ encodeHemocoeleElement x = case x of | ||
| 1520 | 1526 | hemocoeleClass : Jdec.Decoder HemocoeleClass |
| 1521 | 1527 | hemocoeleClass = |
| 1522 | 1528 | Jdec.succeed HemocoeleClass |
| 1523 | - |> Jpipe.optional "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1524 | - |> Jpipe.optional "amelification" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1525 | - |> Jpipe.optional "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1526 | - |> Jpipe.optional "berat" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1527 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1528 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1529 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1530 | - |> Jpipe.optional "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1531 | - |> Jpipe.optional "erythrite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1532 | - |> Jpipe.optional "graphic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1533 | - |> Jpipe.optional "hepatological" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1534 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1535 | - |> Jpipe.optional "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1536 | - |> Jpipe.optional "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1537 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1538 | - |> Jpipe.optional "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1539 | - |> Jpipe.optional "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1540 | - |> Jpipe.optional "stambouline" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1541 | - |> Jpipe.optional "stickpin" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1542 | - |> Jpipe.optional "tubulure" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1543 | - |> Jpipe.optional "undelated" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1544 | - |> Jpipe.optional "unsalt" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1545 | - |> Jpipe.optional "untutelar" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1546 | - |> Jpipe.optional "vagrant" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1547 | - |> Jpipe.optional "Walt" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1529 | + |> Jpipe.custom (optionalField "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1530 | + |> Jpipe.custom (optionalField "amelification" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1531 | + |> Jpipe.custom (optionalField "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1532 | + |> Jpipe.custom (optionalField "berat" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1533 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1534 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1535 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1536 | + |> Jpipe.custom (optionalField "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1537 | + |> Jpipe.custom (optionalField "erythrite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1538 | + |> Jpipe.custom (optionalField "graphic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1539 | + |> Jpipe.custom (optionalField "hepatological" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1540 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1541 | + |> Jpipe.custom (optionalField "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1542 | + |> Jpipe.custom (optionalField "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1543 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1544 | + |> Jpipe.custom (optionalField "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1545 | + |> Jpipe.custom (optionalField "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1546 | + |> Jpipe.custom (optionalField "stambouline" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1547 | + |> Jpipe.custom (optionalField "stickpin" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1548 | + |> Jpipe.custom (optionalField "tubulure" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1549 | + |> Jpipe.custom (optionalField "undelated" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1550 | + |> Jpipe.custom (optionalField "unsalt" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1551 | + |> Jpipe.custom (optionalField "untutelar" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1552 | + |> Jpipe.custom (optionalField "vagrant" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1553 | + |> Jpipe.custom (optionalField "Walt" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1548 | 1554 | |
| 1549 | 1555 | encodeHemocoeleClass : HemocoeleClass -> Jenc.Value |
| 1550 | 1556 | encodeHemocoeleClass x = |
| @@ -1667,7 +1673,7 @@ interacinar = | ||
| 1667 | 1673 | |> Jpipe.required "benefactorship" Jdec.bool |
| 1668 | 1674 | |> Jpipe.required "triseriatim" Jdec.string |
| 1669 | 1675 | |> Jpipe.required "tubbing" Jdec.int |
| 1670 | - |> Jpipe.optional "untrimmed" (Jdec.null ()) () | |
| 1676 | + |> Jpipe.custom (optionalField "untrimmed" (Jdec.null ()) ()) | |
| 1671 | 1677 | |
| 1672 | 1678 | encodeInteracinar : Interacinar -> Jenc.Value |
| 1673 | 1679 | encodeInteracinar x = |
Melmdefault / QuickType.elm+243 −237
| @@ -550,6 +550,12 @@ type Jacutinga | ||
| 550 | 550 | | UnionMapInJacutinga (Dict String (Maybe Int)) |
| 551 | 551 | |
| 552 | 552 | -- decoders and encoders |
| 553 | +optionalField key decoder fallback = | |
| 554 | + Jdec.dict Jdec.value | |
| 555 | + |> Jdec.andThen (\m -> | |
| 556 | + case Dict.get key m of | |
| 557 | + Nothing -> Jdec.succeed fallback | |
| 558 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 553 | 559 | |
| 554 | 560 | quickTypeToString : QuickType -> String |
| 555 | 561 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -666,26 +672,26 @@ encodeCerographElement x = case x of | ||
| 666 | 672 | cerographClass : Jdec.Decoder CerographClass |
| 667 | 673 | cerographClass = |
| 668 | 674 | Jdec.succeed CerographClass |
| 669 | - |> Jpipe.optional "apotropaion" (Jdec.null ()) () | |
| 670 | - |> Jpipe.optional "casuary" (Jdec.null ()) () | |
| 671 | - |> Jpipe.optional "creaker" (Jdec.null ()) () | |
| 672 | - |> Jpipe.optional "disqualification" (Jdec.null ()) () | |
| 673 | - |> Jpipe.optional "imperatorious" (Jdec.null ()) () | |
| 674 | - |> Jpipe.optional "impermeabilize" (Jdec.null ()) () | |
| 675 | - |> Jpipe.optional "metastoma" (Jdec.null ()) () | |
| 676 | - |> Jpipe.optional "noctidiurnal" (Jdec.null ()) () | |
| 677 | - |> Jpipe.optional "nonreserve" (Jdec.null ()) () | |
| 678 | - |> Jpipe.optional "ophthalmotonometry" (Jdec.null ()) () | |
| 679 | - |> Jpipe.optional "pailful" (Jdec.null ()) () | |
| 680 | - |> Jpipe.optional "pigfish" (Jdec.null ()) () | |
| 681 | - |> Jpipe.optional "pongee" (Jdec.null ()) () | |
| 682 | - |> Jpipe.optional "prosodical" (Jdec.null ()) () | |
| 683 | - |> Jpipe.optional "scrofuloderm" (Jdec.null ()) () | |
| 684 | - |> Jpipe.optional "storekeeping" (Jdec.null ()) () | |
| 685 | - |> Jpipe.optional "therologist" (Jdec.null ()) () | |
| 686 | - |> Jpipe.optional "Tolowa" (Jdec.null ()) () | |
| 687 | - |> Jpipe.optional "tradeful" (Jdec.null ()) () | |
| 688 | - |> Jpipe.optional "unriveting" (Jdec.null ()) () | |
| 675 | + |> Jpipe.custom (optionalField "apotropaion" (Jdec.null ()) ()) | |
| 676 | + |> Jpipe.custom (optionalField "casuary" (Jdec.null ()) ()) | |
| 677 | + |> Jpipe.custom (optionalField "creaker" (Jdec.null ()) ()) | |
| 678 | + |> Jpipe.custom (optionalField "disqualification" (Jdec.null ()) ()) | |
| 679 | + |> Jpipe.custom (optionalField "imperatorious" (Jdec.null ()) ()) | |
| 680 | + |> Jpipe.custom (optionalField "impermeabilize" (Jdec.null ()) ()) | |
| 681 | + |> Jpipe.custom (optionalField "metastoma" (Jdec.null ()) ()) | |
| 682 | + |> Jpipe.custom (optionalField "noctidiurnal" (Jdec.null ()) ()) | |
| 683 | + |> Jpipe.custom (optionalField "nonreserve" (Jdec.null ()) ()) | |
| 684 | + |> Jpipe.custom (optionalField "ophthalmotonometry" (Jdec.null ()) ()) | |
| 685 | + |> Jpipe.custom (optionalField "pailful" (Jdec.null ()) ()) | |
| 686 | + |> Jpipe.custom (optionalField "pigfish" (Jdec.null ()) ()) | |
| 687 | + |> Jpipe.custom (optionalField "pongee" (Jdec.null ()) ()) | |
| 688 | + |> Jpipe.custom (optionalField "prosodical" (Jdec.null ()) ()) | |
| 689 | + |> Jpipe.custom (optionalField "scrofuloderm" (Jdec.null ()) ()) | |
| 690 | + |> Jpipe.custom (optionalField "storekeeping" (Jdec.null ()) ()) | |
| 691 | + |> Jpipe.custom (optionalField "therologist" (Jdec.null ()) ()) | |
| 692 | + |> Jpipe.custom (optionalField "Tolowa" (Jdec.null ()) ()) | |
| 693 | + |> Jpipe.custom (optionalField "tradeful" (Jdec.null ()) ()) | |
| 694 | + |> Jpipe.custom (optionalField "unriveting" (Jdec.null ()) ()) | |
| 689 | 695 | |
| 690 | 696 | encodeCerographClass : CerographClass -> Jenc.Value |
| 691 | 697 | encodeCerographClass x = |
| @@ -727,31 +733,31 @@ encodeChemotherapeuticElement x = case x of | ||
| 727 | 733 | chemotherapeuticClass : Jdec.Decoder ChemotherapeuticClass |
| 728 | 734 | chemotherapeuticClass = |
| 729 | 735 | Jdec.succeed ChemotherapeuticClass |
| 730 | - |> Jpipe.optional "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 731 | - |> Jpipe.optional "availment" (Jdec.nullable (Jdec.null ())) Nothing | |
| 732 | - |> Jpipe.optional "bladelet" (Jdec.nullable (Jdec.null ())) Nothing | |
| 733 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 734 | - |> Jpipe.optional "caulis" (Jdec.nullable (Jdec.null ())) Nothing | |
| 735 | - |> Jpipe.optional "chalcus" (Jdec.nullable (Jdec.null ())) Nothing | |
| 736 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 737 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 738 | - |> Jpipe.optional "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing | |
| 739 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 740 | - |> Jpipe.optional "imporosity" (Jdec.nullable (Jdec.null ())) Nothing | |
| 741 | - |> Jpipe.optional "insistently" (Jdec.nullable (Jdec.null ())) Nothing | |
| 742 | - |> Jpipe.optional "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 743 | - |> Jpipe.optional "ivied" (Jdec.nullable (Jdec.null ())) Nothing | |
| 744 | - |> Jpipe.optional "Maureen" (Jdec.nullable (Jdec.null ())) Nothing | |
| 745 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 746 | - |> Jpipe.optional "nostochine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 747 | - |> Jpipe.optional "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing | |
| 748 | - |> Jpipe.optional "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing | |
| 749 | - |> Jpipe.optional "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing | |
| 750 | - |> Jpipe.optional "precoincident" (Jdec.nullable (Jdec.null ())) Nothing | |
| 751 | - |> Jpipe.optional "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 752 | - |> Jpipe.optional "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 753 | - |> Jpipe.optional "tetherball" (Jdec.nullable (Jdec.null ())) Nothing | |
| 754 | - |> Jpipe.optional "unshy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 736 | + |> Jpipe.custom (optionalField "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 737 | + |> Jpipe.custom (optionalField "availment" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 738 | + |> Jpipe.custom (optionalField "bladelet" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 739 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 740 | + |> Jpipe.custom (optionalField "caulis" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 741 | + |> Jpipe.custom (optionalField "chalcus" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 742 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 743 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 744 | + |> Jpipe.custom (optionalField "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 745 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 746 | + |> Jpipe.custom (optionalField "imporosity" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 747 | + |> Jpipe.custom (optionalField "insistently" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 748 | + |> Jpipe.custom (optionalField "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 749 | + |> Jpipe.custom (optionalField "ivied" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 750 | + |> Jpipe.custom (optionalField "Maureen" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 751 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 752 | + |> Jpipe.custom (optionalField "nostochine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 753 | + |> Jpipe.custom (optionalField "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 754 | + |> Jpipe.custom (optionalField "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 755 | + |> Jpipe.custom (optionalField "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 756 | + |> Jpipe.custom (optionalField "precoincident" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 757 | + |> Jpipe.custom (optionalField "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 758 | + |> Jpipe.custom (optionalField "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 759 | + |> Jpipe.custom (optionalField "tetherball" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 760 | + |> Jpipe.custom (optionalField "unshy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 755 | 761 | |
| 756 | 762 | encodeChemotherapeuticClass : ChemotherapeuticClass -> Jenc.Value |
| 757 | 763 | encodeChemotherapeuticClass x = |
| @@ -804,7 +810,7 @@ cimeliaClass = | ||
| 804 | 810 | |> Jpipe.required "Chirotherium" Jdec.int |
| 805 | 811 | |> Jpipe.required "disdiapason" Jdec.string |
| 806 | 812 | |> Jpipe.required "homocerc" Jdec.bool |
| 807 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 813 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 808 | 814 | |
| 809 | 815 | encodeCimeliaClass : CimeliaClass -> Jenc.Value |
| 810 | 816 | encodeCimeliaClass x = |
| @@ -843,31 +849,31 @@ encodeCoadjustElement x = case x of | ||
| 843 | 849 | coadjustClass : Jdec.Decoder CoadjustClass |
| 844 | 850 | coadjustClass = |
| 845 | 851 | Jdec.succeed CoadjustClass |
| 846 | - |> Jpipe.optional "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 847 | - |> Jpipe.optional "Benny" (Jdec.nullable (Jdec.null ())) Nothing | |
| 848 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 849 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 850 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 851 | - |> Jpipe.optional "ensnare" (Jdec.nullable (Jdec.null ())) Nothing | |
| 852 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 853 | - |> Jpipe.optional "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 854 | - |> Jpipe.optional "leastwise" (Jdec.nullable (Jdec.null ())) Nothing | |
| 855 | - |> Jpipe.optional "lof" (Jdec.nullable (Jdec.null ())) Nothing | |
| 856 | - |> Jpipe.optional "monkhood" (Jdec.nullable (Jdec.null ())) Nothing | |
| 857 | - |> Jpipe.optional "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 858 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 859 | - |> Jpipe.optional "peonism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 860 | - |> Jpipe.optional "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing | |
| 861 | - |> Jpipe.optional "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing | |
| 862 | - |> Jpipe.optional "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing | |
| 863 | - |> Jpipe.optional "rosal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 864 | - |> Jpipe.optional "scalenous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 865 | - |> Jpipe.optional "scopine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 866 | - |> Jpipe.optional "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing | |
| 867 | - |> Jpipe.optional "suberinize" (Jdec.nullable (Jdec.null ())) Nothing | |
| 868 | - |> Jpipe.optional "symbiot" (Jdec.nullable (Jdec.null ())) Nothing | |
| 869 | - |> Jpipe.optional "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing | |
| 870 | - |> Jpipe.optional "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing | |
| 852 | + |> Jpipe.custom (optionalField "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 853 | + |> Jpipe.custom (optionalField "Benny" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 854 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 855 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 856 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 857 | + |> Jpipe.custom (optionalField "ensnare" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 858 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 859 | + |> Jpipe.custom (optionalField "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 860 | + |> Jpipe.custom (optionalField "leastwise" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 861 | + |> Jpipe.custom (optionalField "lof" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 862 | + |> Jpipe.custom (optionalField "monkhood" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 863 | + |> Jpipe.custom (optionalField "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 864 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 865 | + |> Jpipe.custom (optionalField "peonism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 866 | + |> Jpipe.custom (optionalField "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 867 | + |> Jpipe.custom (optionalField "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 868 | + |> Jpipe.custom (optionalField "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 869 | + |> Jpipe.custom (optionalField "rosal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 870 | + |> Jpipe.custom (optionalField "scalenous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 871 | + |> Jpipe.custom (optionalField "scopine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 872 | + |> Jpipe.custom (optionalField "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 873 | + |> Jpipe.custom (optionalField "suberinize" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 874 | + |> Jpipe.custom (optionalField "symbiot" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 875 | + |> Jpipe.custom (optionalField "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 876 | + |> Jpipe.custom (optionalField "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 871 | 877 | |
| 872 | 878 | encodeCoadjustClass : CoadjustClass -> Jenc.Value |
| 873 | 879 | encodeCoadjustClass x = |
| @@ -952,26 +958,26 @@ encodeCredulityElement x = case x of | ||
| 952 | 958 | credulityClass : Jdec.Decoder CredulityClass |
| 953 | 959 | credulityClass = |
| 954 | 960 | Jdec.succeed CredulityClass |
| 955 | - |> Jpipe.optional "ammonolytic" (Jdec.null ()) () | |
| 956 | - |> Jpipe.optional "bushmaster" (Jdec.null ()) () | |
| 957 | - |> Jpipe.optional "considering" (Jdec.null ()) () | |
| 958 | - |> Jpipe.optional "consuetudinary" (Jdec.null ()) () | |
| 959 | - |> Jpipe.optional "embarras" (Jdec.null ()) () | |
| 960 | - |> Jpipe.optional "fineness" (Jdec.null ()) () | |
| 961 | - |> Jpipe.optional "flaithship" (Jdec.null ()) () | |
| 962 | - |> Jpipe.optional "Flavia" (Jdec.null ()) () | |
| 963 | - |> Jpipe.optional "gruffly" (Jdec.null ()) () | |
| 964 | - |> Jpipe.optional "Hedychium" (Jdec.null ()) () | |
| 965 | - |> Jpipe.optional "leadwort" (Jdec.null ()) () | |
| 966 | - |> Jpipe.optional "overseriously" (Jdec.null ()) () | |
| 967 | - |> Jpipe.optional "parabola" (Jdec.null ()) () | |
| 968 | - |> Jpipe.optional "pectinatodenticulate" (Jdec.null ()) () | |
| 969 | - |> Jpipe.optional "Popean" (Jdec.null ()) () | |
| 970 | - |> Jpipe.optional "pornocrat" (Jdec.null ()) () | |
| 971 | - |> Jpipe.optional "quadrisect" (Jdec.null ()) () | |
| 972 | - |> Jpipe.optional "seriality" (Jdec.null ()) () | |
| 973 | - |> Jpipe.optional "vamphorn" (Jdec.null ()) () | |
| 974 | - |> Jpipe.optional "wharp" (Jdec.null ()) () | |
| 961 | + |> Jpipe.custom (optionalField "ammonolytic" (Jdec.null ()) ()) | |
| 962 | + |> Jpipe.custom (optionalField "bushmaster" (Jdec.null ()) ()) | |
| 963 | + |> Jpipe.custom (optionalField "considering" (Jdec.null ()) ()) | |
| 964 | + |> Jpipe.custom (optionalField "consuetudinary" (Jdec.null ()) ()) | |
| 965 | + |> Jpipe.custom (optionalField "embarras" (Jdec.null ()) ()) | |
| 966 | + |> Jpipe.custom (optionalField "fineness" (Jdec.null ()) ()) | |
| 967 | + |> Jpipe.custom (optionalField "flaithship" (Jdec.null ()) ()) | |
| 968 | + |> Jpipe.custom (optionalField "Flavia" (Jdec.null ()) ()) | |
| 969 | + |> Jpipe.custom (optionalField "gruffly" (Jdec.null ()) ()) | |
| 970 | + |> Jpipe.custom (optionalField "Hedychium" (Jdec.null ()) ()) | |
| 971 | + |> Jpipe.custom (optionalField "leadwort" (Jdec.null ()) ()) | |
| 972 | + |> Jpipe.custom (optionalField "overseriously" (Jdec.null ()) ()) | |
| 973 | + |> Jpipe.custom (optionalField "parabola" (Jdec.null ()) ()) | |
| 974 | + |> Jpipe.custom (optionalField "pectinatodenticulate" (Jdec.null ()) ()) | |
| 975 | + |> Jpipe.custom (optionalField "Popean" (Jdec.null ()) ()) | |
| 976 | + |> Jpipe.custom (optionalField "pornocrat" (Jdec.null ()) ()) | |
| 977 | + |> Jpipe.custom (optionalField "quadrisect" (Jdec.null ()) ()) | |
| 978 | + |> Jpipe.custom (optionalField "seriality" (Jdec.null ()) ()) | |
| 979 | + |> Jpipe.custom (optionalField "vamphorn" (Jdec.null ()) ()) | |
| 980 | + |> Jpipe.custom (optionalField "wharp" (Jdec.null ()) ()) | |
| 975 | 981 | |
| 976 | 982 | encodeCredulityClass : CredulityClass -> Jenc.Value |
| 977 | 983 | encodeCredulityClass x = |
| @@ -1029,26 +1035,26 @@ encodeDeruralizeElement x = case x of | ||
| 1029 | 1035 | deruralizeClass : Jdec.Decoder DeruralizeClass |
| 1030 | 1036 | deruralizeClass = |
| 1031 | 1037 | Jdec.succeed DeruralizeClass |
| 1032 | - |> Jpipe.optional "bockerel" (Jdec.null ()) () | |
| 1033 | - |> Jpipe.optional "boulder" (Jdec.null ()) () | |
| 1034 | - |> Jpipe.optional "churrus" (Jdec.null ()) () | |
| 1035 | - |> Jpipe.optional "counterdigged" (Jdec.null ()) () | |
| 1036 | - |> Jpipe.optional "dialogite" (Jdec.null ()) () | |
| 1037 | - |> Jpipe.optional "digenic" (Jdec.null ()) () | |
| 1038 | - |> Jpipe.optional "dunbird" (Jdec.null ()) () | |
| 1039 | - |> Jpipe.optional "ergatogyne" (Jdec.null ()) () | |
| 1040 | - |> Jpipe.optional "fiendful" (Jdec.null ()) () | |
| 1041 | - |> Jpipe.optional "jackrod" (Jdec.null ()) () | |
| 1042 | - |> Jpipe.optional "Jehovistic" (Jdec.null ()) () | |
| 1043 | - |> Jpipe.optional "Paninean" (Jdec.null ()) () | |
| 1044 | - |> Jpipe.optional "panther" (Jdec.null ()) () | |
| 1045 | - |> Jpipe.optional "placentigerous" (Jdec.null ()) () | |
| 1046 | - |> Jpipe.optional "Romney" (Jdec.null ()) () | |
| 1047 | - |> Jpipe.optional "sparm" (Jdec.null ()) () | |
| 1048 | - |> Jpipe.optional "tocsin" (Jdec.null ()) () | |
| 1049 | - |> Jpipe.optional "unnicked" (Jdec.null ()) () | |
| 1050 | - |> Jpipe.optional "unstavable" (Jdec.null ()) () | |
| 1051 | - |> Jpipe.optional "windfirm" (Jdec.null ()) () | |
| 1038 | + |> Jpipe.custom (optionalField "bockerel" (Jdec.null ()) ()) | |
| 1039 | + |> Jpipe.custom (optionalField "boulder" (Jdec.null ()) ()) | |
| 1040 | + |> Jpipe.custom (optionalField "churrus" (Jdec.null ()) ()) | |
| 1041 | + |> Jpipe.custom (optionalField "counterdigged" (Jdec.null ()) ()) | |
| 1042 | + |> Jpipe.custom (optionalField "dialogite" (Jdec.null ()) ()) | |
| 1043 | + |> Jpipe.custom (optionalField "digenic" (Jdec.null ()) ()) | |
| 1044 | + |> Jpipe.custom (optionalField "dunbird" (Jdec.null ()) ()) | |
| 1045 | + |> Jpipe.custom (optionalField "ergatogyne" (Jdec.null ()) ()) | |
| 1046 | + |> Jpipe.custom (optionalField "fiendful" (Jdec.null ()) ()) | |
| 1047 | + |> Jpipe.custom (optionalField "jackrod" (Jdec.null ()) ()) | |
| 1048 | + |> Jpipe.custom (optionalField "Jehovistic" (Jdec.null ()) ()) | |
| 1049 | + |> Jpipe.custom (optionalField "Paninean" (Jdec.null ()) ()) | |
| 1050 | + |> Jpipe.custom (optionalField "panther" (Jdec.null ()) ()) | |
| 1051 | + |> Jpipe.custom (optionalField "placentigerous" (Jdec.null ()) ()) | |
| 1052 | + |> Jpipe.custom (optionalField "Romney" (Jdec.null ()) ()) | |
| 1053 | + |> Jpipe.custom (optionalField "sparm" (Jdec.null ()) ()) | |
| 1054 | + |> Jpipe.custom (optionalField "tocsin" (Jdec.null ()) ()) | |
| 1055 | + |> Jpipe.custom (optionalField "unnicked" (Jdec.null ()) ()) | |
| 1056 | + |> Jpipe.custom (optionalField "unstavable" (Jdec.null ()) ()) | |
| 1057 | + |> Jpipe.custom (optionalField "windfirm" (Jdec.null ()) ()) | |
| 1052 | 1058 | |
| 1053 | 1059 | encodeDeruralizeClass : DeruralizeClass -> Jenc.Value |
| 1054 | 1060 | encodeDeruralizeClass x = |
| @@ -1092,26 +1098,26 @@ encodeDiaereseElement x = case x of | ||
| 1092 | 1098 | diaereseClass : Jdec.Decoder DiaereseClass |
| 1093 | 1099 | diaereseClass = |
| 1094 | 1100 | Jdec.succeed DiaereseClass |
| 1095 | - |> Jpipe.optional "Amoreuxia" (Jdec.null ()) () | |
| 1096 | - |> Jpipe.optional "ani" (Jdec.null ()) () | |
| 1097 | - |> Jpipe.optional "bernicle" (Jdec.null ()) () | |
| 1098 | - |> Jpipe.optional "blackwasher" (Jdec.null ()) () | |
| 1099 | - |> Jpipe.optional "blowhard" (Jdec.null ()) () | |
| 1100 | - |> Jpipe.optional "broma" (Jdec.null ()) () | |
| 1101 | - |> Jpipe.optional "closecross" (Jdec.null ()) () | |
| 1102 | - |> Jpipe.optional "congregationalism" (Jdec.null ()) () | |
| 1103 | - |> Jpipe.optional "grayly" (Jdec.null ()) () | |
| 1104 | - |> Jpipe.optional "historically" (Jdec.null ()) () | |
| 1105 | - |> Jpipe.optional "hoast" (Jdec.null ()) () | |
| 1106 | - |> Jpipe.optional "irretentive" (Jdec.null ()) () | |
| 1107 | - |> Jpipe.optional "parcener" (Jdec.null ()) () | |
| 1108 | - |> Jpipe.optional "pedder" (Jdec.null ()) () | |
| 1109 | - |> Jpipe.optional "pseudoanatomic" (Jdec.null ()) () | |
| 1110 | - |> Jpipe.optional "rhizocarpian" (Jdec.null ()) () | |
| 1111 | - |> Jpipe.optional "samel" (Jdec.null ()) () | |
| 1112 | - |> Jpipe.optional "silker" (Jdec.null ()) () | |
| 1113 | - |> Jpipe.optional "subdentated" (Jdec.null ()) () | |
| 1114 | - |> Jpipe.optional "subobscure" (Jdec.null ()) () | |
| 1101 | + |> Jpipe.custom (optionalField "Amoreuxia" (Jdec.null ()) ()) | |
| 1102 | + |> Jpipe.custom (optionalField "ani" (Jdec.null ()) ()) | |
| 1103 | + |> Jpipe.custom (optionalField "bernicle" (Jdec.null ()) ()) | |
| 1104 | + |> Jpipe.custom (optionalField "blackwasher" (Jdec.null ()) ()) | |
| 1105 | + |> Jpipe.custom (optionalField "blowhard" (Jdec.null ()) ()) | |
| 1106 | + |> Jpipe.custom (optionalField "broma" (Jdec.null ()) ()) | |
| 1107 | + |> Jpipe.custom (optionalField "closecross" (Jdec.null ()) ()) | |
| 1108 | + |> Jpipe.custom (optionalField "congregationalism" (Jdec.null ()) ()) | |
| 1109 | + |> Jpipe.custom (optionalField "grayly" (Jdec.null ()) ()) | |
| 1110 | + |> Jpipe.custom (optionalField "historically" (Jdec.null ()) ()) | |
| 1111 | + |> Jpipe.custom (optionalField "hoast" (Jdec.null ()) ()) | |
| 1112 | + |> Jpipe.custom (optionalField "irretentive" (Jdec.null ()) ()) | |
| 1113 | + |> Jpipe.custom (optionalField "parcener" (Jdec.null ()) ()) | |
| 1114 | + |> Jpipe.custom (optionalField "pedder" (Jdec.null ()) ()) | |
| 1115 | + |> Jpipe.custom (optionalField "pseudoanatomic" (Jdec.null ()) ()) | |
| 1116 | + |> Jpipe.custom (optionalField "rhizocarpian" (Jdec.null ()) ()) | |
| 1117 | + |> Jpipe.custom (optionalField "samel" (Jdec.null ()) ()) | |
| 1118 | + |> Jpipe.custom (optionalField "silker" (Jdec.null ()) ()) | |
| 1119 | + |> Jpipe.custom (optionalField "subdentated" (Jdec.null ()) ()) | |
| 1120 | + |> Jpipe.custom (optionalField "subobscure" (Jdec.null ()) ()) | |
| 1115 | 1121 | |
| 1116 | 1122 | encodeDiaereseClass : DiaereseClass -> Jenc.Value |
| 1117 | 1123 | encodeDiaereseClass x = |
| @@ -1169,26 +1175,26 @@ encodeEleutheromania x = case x of | ||
| 1169 | 1175 | encrust : Jdec.Decoder Encrust |
| 1170 | 1176 | encrust = |
| 1171 | 1177 | Jdec.succeed Encrust |
| 1172 | - |> Jpipe.optional "comradely" (Jdec.null ()) () | |
| 1173 | - |> Jpipe.optional "diacanthous" (Jdec.null ()) () | |
| 1174 | - |> Jpipe.optional "feminineness" (Jdec.null ()) () | |
| 1175 | - |> Jpipe.optional "gossamered" (Jdec.null ()) () | |
| 1176 | - |> Jpipe.optional "Hibernia" (Jdec.null ()) () | |
| 1177 | - |> Jpipe.optional "Hibiscus" (Jdec.null ()) () | |
| 1178 | - |> Jpipe.optional "Lepidosauria" (Jdec.null ()) () | |
| 1179 | - |> Jpipe.optional "lollingly" (Jdec.null ()) () | |
| 1180 | - |> Jpipe.optional "manager" (Jdec.null ()) () | |
| 1181 | - |> Jpipe.optional "mechanic" (Jdec.null ()) () | |
| 1182 | - |> Jpipe.optional "overminuteness" (Jdec.null ()) () | |
| 1183 | - |> Jpipe.optional "papelonne" (Jdec.null ()) () | |
| 1184 | - |> Jpipe.optional "plebification" (Jdec.null ()) () | |
| 1185 | - |> Jpipe.optional "pugmiller" (Jdec.null ()) () | |
| 1186 | - |> Jpipe.optional "recoveror" (Jdec.null ()) () | |
| 1187 | - |> Jpipe.optional "spermatoblastic" (Jdec.null ()) () | |
| 1188 | - |> Jpipe.optional "Syllidae" (Jdec.null ()) () | |
| 1189 | - |> Jpipe.optional "ungyved" (Jdec.null ()) () | |
| 1190 | - |> Jpipe.optional "whirlabout" (Jdec.null ()) () | |
| 1191 | - |> Jpipe.optional "woodenware" (Jdec.null ()) () | |
| 1178 | + |> Jpipe.custom (optionalField "comradely" (Jdec.null ()) ()) | |
| 1179 | + |> Jpipe.custom (optionalField "diacanthous" (Jdec.null ()) ()) | |
| 1180 | + |> Jpipe.custom (optionalField "feminineness" (Jdec.null ()) ()) | |
| 1181 | + |> Jpipe.custom (optionalField "gossamered" (Jdec.null ()) ()) | |
| 1182 | + |> Jpipe.custom (optionalField "Hibernia" (Jdec.null ()) ()) | |
| 1183 | + |> Jpipe.custom (optionalField "Hibiscus" (Jdec.null ()) ()) | |
| 1184 | + |> Jpipe.custom (optionalField "Lepidosauria" (Jdec.null ()) ()) | |
| 1185 | + |> Jpipe.custom (optionalField "lollingly" (Jdec.null ()) ()) | |
| 1186 | + |> Jpipe.custom (optionalField "manager" (Jdec.null ()) ()) | |
| 1187 | + |> Jpipe.custom (optionalField "mechanic" (Jdec.null ()) ()) | |
| 1188 | + |> Jpipe.custom (optionalField "overminuteness" (Jdec.null ()) ()) | |
| 1189 | + |> Jpipe.custom (optionalField "papelonne" (Jdec.null ()) ()) | |
| 1190 | + |> Jpipe.custom (optionalField "plebification" (Jdec.null ()) ()) | |
| 1191 | + |> Jpipe.custom (optionalField "pugmiller" (Jdec.null ()) ()) | |
| 1192 | + |> Jpipe.custom (optionalField "recoveror" (Jdec.null ()) ()) | |
| 1193 | + |> Jpipe.custom (optionalField "spermatoblastic" (Jdec.null ()) ()) | |
| 1194 | + |> Jpipe.custom (optionalField "Syllidae" (Jdec.null ()) ()) | |
| 1195 | + |> Jpipe.custom (optionalField "ungyved" (Jdec.null ()) ()) | |
| 1196 | + |> Jpipe.custom (optionalField "whirlabout" (Jdec.null ()) ()) | |
| 1197 | + |> Jpipe.custom (optionalField "woodenware" (Jdec.null ()) ()) | |
| 1192 | 1198 | |
| 1193 | 1199 | encodeEncrust : Encrust -> Jenc.Value |
| 1194 | 1200 | encodeEncrust x = |
| @@ -1268,26 +1274,26 @@ encodeFagginglyElement x = case x of | ||
| 1268 | 1274 | fagginglyClass : Jdec.Decoder FagginglyClass |
| 1269 | 1275 | fagginglyClass = |
| 1270 | 1276 | Jdec.succeed FagginglyClass |
| 1271 | - |> Jpipe.optional "abranchian" (Jdec.null ()) () | |
| 1272 | - |> Jpipe.optional "aculeiform" (Jdec.null ()) () | |
| 1273 | - |> Jpipe.optional "adiaphoristic" (Jdec.null ()) () | |
| 1274 | - |> Jpipe.optional "adoptionism" (Jdec.null ()) () | |
| 1275 | - |> Jpipe.optional "Anglic" (Jdec.null ()) () | |
| 1276 | - |> Jpipe.optional "antrotomy" (Jdec.null ()) () | |
| 1277 | - |> Jpipe.optional "coerciveness" (Jdec.null ()) () | |
| 1278 | - |> Jpipe.optional "decorist" (Jdec.null ()) () | |
| 1279 | - |> Jpipe.optional "duckhood" (Jdec.null ()) () | |
| 1280 | - |> Jpipe.optional "Heteromeri" (Jdec.null ()) () | |
| 1281 | - |> Jpipe.optional "hypochnose" (Jdec.null ()) () | |
| 1282 | - |> Jpipe.optional "lochage" (Jdec.null ()) () | |
| 1283 | - |> Jpipe.optional "melee" (Jdec.null ()) () | |
| 1284 | - |> Jpipe.optional "nonconformitant" (Jdec.null ()) () | |
| 1285 | - |> Jpipe.optional "Poinsettia" (Jdec.null ()) () | |
| 1286 | - |> Jpipe.optional "putatively" (Jdec.null ()) () | |
| 1287 | - |> Jpipe.optional "semivolatile" (Jdec.null ()) () | |
| 1288 | - |> Jpipe.optional "soleas" (Jdec.null ()) () | |
| 1289 | - |> Jpipe.optional "unfastenable" (Jdec.null ()) () | |
| 1290 | - |> Jpipe.optional "unmillinered" (Jdec.null ()) () | |
| 1277 | + |> Jpipe.custom (optionalField "abranchian" (Jdec.null ()) ()) | |
| 1278 | + |> Jpipe.custom (optionalField "aculeiform" (Jdec.null ()) ()) | |
| 1279 | + |> Jpipe.custom (optionalField "adiaphoristic" (Jdec.null ()) ()) | |
| 1280 | + |> Jpipe.custom (optionalField "adoptionism" (Jdec.null ()) ()) | |
| 1281 | + |> Jpipe.custom (optionalField "Anglic" (Jdec.null ()) ()) | |
| 1282 | + |> Jpipe.custom (optionalField "antrotomy" (Jdec.null ()) ()) | |
| 1283 | + |> Jpipe.custom (optionalField "coerciveness" (Jdec.null ()) ()) | |
| 1284 | + |> Jpipe.custom (optionalField "decorist" (Jdec.null ()) ()) | |
| 1285 | + |> Jpipe.custom (optionalField "duckhood" (Jdec.null ()) ()) | |
| 1286 | + |> Jpipe.custom (optionalField "Heteromeri" (Jdec.null ()) ()) | |
| 1287 | + |> Jpipe.custom (optionalField "hypochnose" (Jdec.null ()) ()) | |
| 1288 | + |> Jpipe.custom (optionalField "lochage" (Jdec.null ()) ()) | |
| 1289 | + |> Jpipe.custom (optionalField "melee" (Jdec.null ()) ()) | |
| 1290 | + |> Jpipe.custom (optionalField "nonconformitant" (Jdec.null ()) ()) | |
| 1291 | + |> Jpipe.custom (optionalField "Poinsettia" (Jdec.null ()) ()) | |
| 1292 | + |> Jpipe.custom (optionalField "putatively" (Jdec.null ()) ()) | |
| 1293 | + |> Jpipe.custom (optionalField "semivolatile" (Jdec.null ()) ()) | |
| 1294 | + |> Jpipe.custom (optionalField "soleas" (Jdec.null ()) ()) | |
| 1295 | + |> Jpipe.custom (optionalField "unfastenable" (Jdec.null ()) ()) | |
| 1296 | + |> Jpipe.custom (optionalField "unmillinered" (Jdec.null ()) ()) | |
| 1291 | 1297 | |
| 1292 | 1298 | encodeFagginglyClass : FagginglyClass -> Jenc.Value |
| 1293 | 1299 | encodeFagginglyClass x = |
| @@ -1329,26 +1335,26 @@ encodeFenkElement x = case x of | ||
| 1329 | 1335 | fenkClass : Jdec.Decoder FenkClass |
| 1330 | 1336 | fenkClass = |
| 1331 | 1337 | Jdec.succeed FenkClass |
| 1332 | - |> Jpipe.optional "apoise" (Jdec.null ()) () | |
| 1333 | - |> Jpipe.optional "astronomize" (Jdec.null ()) () | |
| 1334 | - |> Jpipe.optional "cockhorse" (Jdec.null ()) () | |
| 1335 | - |> Jpipe.optional "copular" (Jdec.null ()) () | |
| 1336 | - |> Jpipe.optional "Dagomba" (Jdec.null ()) () | |
| 1337 | - |> Jpipe.optional "draffy" (Jdec.null ()) () | |
| 1338 | - |> Jpipe.optional "foreigner" (Jdec.null ()) () | |
| 1339 | - |> Jpipe.optional "Guyandot" (Jdec.null ()) () | |
| 1340 | - |> Jpipe.optional "neurogliosis" (Jdec.null ()) () | |
| 1341 | - |> Jpipe.optional "osmious" (Jdec.null ()) () | |
| 1342 | - |> Jpipe.optional "palpitate" (Jdec.null ()) () | |
| 1343 | - |> Jpipe.optional "rebukeable" (Jdec.null ()) () | |
| 1344 | - |> Jpipe.optional "Reinwardtia" (Jdec.null ()) () | |
| 1345 | - |> Jpipe.optional "reservatory" (Jdec.null ()) () | |
| 1346 | - |> Jpipe.optional "scalt" (Jdec.null ()) () | |
| 1347 | - |> Jpipe.optional "scripturalize" (Jdec.null ()) () | |
| 1348 | - |> Jpipe.optional "tintometer" (Jdec.null ()) () | |
| 1349 | - |> Jpipe.optional "Tritoness" (Jdec.null ()) () | |
| 1350 | - |> Jpipe.optional "undergrade" (Jdec.null ()) () | |
| 1351 | - |> Jpipe.optional "undermountain" (Jdec.null ()) () | |
| 1338 | + |> Jpipe.custom (optionalField "apoise" (Jdec.null ()) ()) | |
| 1339 | + |> Jpipe.custom (optionalField "astronomize" (Jdec.null ()) ()) | |
| 1340 | + |> Jpipe.custom (optionalField "cockhorse" (Jdec.null ()) ()) | |
| 1341 | + |> Jpipe.custom (optionalField "copular" (Jdec.null ()) ()) | |
| 1342 | + |> Jpipe.custom (optionalField "Dagomba" (Jdec.null ()) ()) | |
| 1343 | + |> Jpipe.custom (optionalField "draffy" (Jdec.null ()) ()) | |
| 1344 | + |> Jpipe.custom (optionalField "foreigner" (Jdec.null ()) ()) | |
| 1345 | + |> Jpipe.custom (optionalField "Guyandot" (Jdec.null ()) ()) | |
| 1346 | + |> Jpipe.custom (optionalField "neurogliosis" (Jdec.null ()) ()) | |
| 1347 | + |> Jpipe.custom (optionalField "osmious" (Jdec.null ()) ()) | |
| 1348 | + |> Jpipe.custom (optionalField "palpitate" (Jdec.null ()) ()) | |
| 1349 | + |> Jpipe.custom (optionalField "rebukeable" (Jdec.null ()) ()) | |
| 1350 | + |> Jpipe.custom (optionalField "Reinwardtia" (Jdec.null ()) ()) | |
| 1351 | + |> Jpipe.custom (optionalField "reservatory" (Jdec.null ()) ()) | |
| 1352 | + |> Jpipe.custom (optionalField "scalt" (Jdec.null ()) ()) | |
| 1353 | + |> Jpipe.custom (optionalField "scripturalize" (Jdec.null ()) ()) | |
| 1354 | + |> Jpipe.custom (optionalField "tintometer" (Jdec.null ()) ()) | |
| 1355 | + |> Jpipe.custom (optionalField "Tritoness" (Jdec.null ()) ()) | |
| 1356 | + |> Jpipe.custom (optionalField "undergrade" (Jdec.null ()) ()) | |
| 1357 | + |> Jpipe.custom (optionalField "undermountain" (Jdec.null ()) ()) | |
| 1352 | 1358 | |
| 1353 | 1359 | encodeFenkClass : FenkClass -> Jenc.Value |
| 1354 | 1360 | encodeFenkClass x = |
| @@ -1392,26 +1398,26 @@ encodeFlagmakingElement x = case x of | ||
| 1392 | 1398 | flagmakingClass : Jdec.Decoder FlagmakingClass |
| 1393 | 1399 | flagmakingClass = |
| 1394 | 1400 | Jdec.succeed FlagmakingClass |
| 1395 | - |> Jpipe.optional "albarco" (Jdec.null ()) () | |
| 1396 | - |> Jpipe.optional "Bunodonta" (Jdec.null ()) () | |
| 1397 | - |> Jpipe.optional "hornify" (Jdec.null ()) () | |
| 1398 | - |> Jpipe.optional "Hydrocorisae" (Jdec.null ()) () | |
| 1399 | - |> Jpipe.optional "hypoglossus" (Jdec.null ()) () | |
| 1400 | - |> Jpipe.optional "inexpiably" (Jdec.null ()) () | |
| 1401 | - |> Jpipe.optional "ingratitude" (Jdec.null ()) () | |
| 1402 | - |> Jpipe.optional "ladyfly" (Jdec.null ()) () | |
| 1403 | - |> Jpipe.optional "medicament" (Jdec.null ()) () | |
| 1404 | - |> Jpipe.optional "monogrammatic" (Jdec.null ()) () | |
| 1405 | - |> Jpipe.optional "nobbut" (Jdec.null ()) () | |
| 1406 | - |> Jpipe.optional "Notacanthidae" (Jdec.null ()) () | |
| 1407 | - |> Jpipe.optional "polyplacophore" (Jdec.null ()) () | |
| 1408 | - |> Jpipe.optional "proexercise" (Jdec.null ()) () | |
| 1409 | - |> Jpipe.optional "protoplast" (Jdec.null ()) () | |
| 1410 | - |> Jpipe.optional "puzzling" (Jdec.null ()) () | |
| 1411 | - |> Jpipe.optional "splanchnoskeleton" (Jdec.null ()) () | |
| 1412 | - |> Jpipe.optional "unloveliness" (Jdec.null ()) () | |
| 1413 | - |> Jpipe.optional "unquarantined" (Jdec.null ()) () | |
| 1414 | - |> Jpipe.optional "unrenounceable" (Jdec.null ()) () | |
| 1401 | + |> Jpipe.custom (optionalField "albarco" (Jdec.null ()) ()) | |
| 1402 | + |> Jpipe.custom (optionalField "Bunodonta" (Jdec.null ()) ()) | |
| 1403 | + |> Jpipe.custom (optionalField "hornify" (Jdec.null ()) ()) | |
| 1404 | + |> Jpipe.custom (optionalField "Hydrocorisae" (Jdec.null ()) ()) | |
| 1405 | + |> Jpipe.custom (optionalField "hypoglossus" (Jdec.null ()) ()) | |
| 1406 | + |> Jpipe.custom (optionalField "inexpiably" (Jdec.null ()) ()) | |
| 1407 | + |> Jpipe.custom (optionalField "ingratitude" (Jdec.null ()) ()) | |
| 1408 | + |> Jpipe.custom (optionalField "ladyfly" (Jdec.null ()) ()) | |
| 1409 | + |> Jpipe.custom (optionalField "medicament" (Jdec.null ()) ()) | |
| 1410 | + |> Jpipe.custom (optionalField "monogrammatic" (Jdec.null ()) ()) | |
| 1411 | + |> Jpipe.custom (optionalField "nobbut" (Jdec.null ()) ()) | |
| 1412 | + |> Jpipe.custom (optionalField "Notacanthidae" (Jdec.null ()) ()) | |
| 1413 | + |> Jpipe.custom (optionalField "polyplacophore" (Jdec.null ()) ()) | |
| 1414 | + |> Jpipe.custom (optionalField "proexercise" (Jdec.null ()) ()) | |
| 1415 | + |> Jpipe.custom (optionalField "protoplast" (Jdec.null ()) ()) | |
| 1416 | + |> Jpipe.custom (optionalField "puzzling" (Jdec.null ()) ()) | |
| 1417 | + |> Jpipe.custom (optionalField "splanchnoskeleton" (Jdec.null ()) ()) | |
| 1418 | + |> Jpipe.custom (optionalField "unloveliness" (Jdec.null ()) ()) | |
| 1419 | + |> Jpipe.custom (optionalField "unquarantined" (Jdec.null ()) ()) | |
| 1420 | + |> Jpipe.custom (optionalField "unrenounceable" (Jdec.null ()) ()) | |
| 1415 | 1421 | |
| 1416 | 1422 | encodeFlagmakingClass : FlagmakingClass -> Jenc.Value |
| 1417 | 1423 | encodeFlagmakingClass x = |
| @@ -1519,31 +1525,31 @@ encodeHemocoeleElement x = case x of | ||
| 1519 | 1525 | hemocoeleClass : Jdec.Decoder HemocoeleClass |
| 1520 | 1526 | hemocoeleClass = |
| 1521 | 1527 | Jdec.succeed HemocoeleClass |
| 1522 | - |> Jpipe.optional "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1523 | - |> Jpipe.optional "amelification" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1524 | - |> Jpipe.optional "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1525 | - |> Jpipe.optional "berat" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1526 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1527 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1528 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1529 | - |> Jpipe.optional "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1530 | - |> Jpipe.optional "erythrite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1531 | - |> Jpipe.optional "graphic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1532 | - |> Jpipe.optional "hepatological" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1533 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1534 | - |> Jpipe.optional "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1535 | - |> Jpipe.optional "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1536 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1537 | - |> Jpipe.optional "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1538 | - |> Jpipe.optional "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1539 | - |> Jpipe.optional "stambouline" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1540 | - |> Jpipe.optional "stickpin" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1541 | - |> Jpipe.optional "tubulure" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1542 | - |> Jpipe.optional "undelated" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1543 | - |> Jpipe.optional "unsalt" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1544 | - |> Jpipe.optional "untutelar" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1545 | - |> Jpipe.optional "vagrant" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1546 | - |> Jpipe.optional "Walt" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1528 | + |> Jpipe.custom (optionalField "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1529 | + |> Jpipe.custom (optionalField "amelification" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1530 | + |> Jpipe.custom (optionalField "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1531 | + |> Jpipe.custom (optionalField "berat" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1532 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1533 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1534 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1535 | + |> Jpipe.custom (optionalField "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1536 | + |> Jpipe.custom (optionalField "erythrite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1537 | + |> Jpipe.custom (optionalField "graphic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1538 | + |> Jpipe.custom (optionalField "hepatological" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1539 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1540 | + |> Jpipe.custom (optionalField "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1541 | + |> Jpipe.custom (optionalField "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1542 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1543 | + |> Jpipe.custom (optionalField "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1544 | + |> Jpipe.custom (optionalField "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1545 | + |> Jpipe.custom (optionalField "stambouline" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1546 | + |> Jpipe.custom (optionalField "stickpin" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1547 | + |> Jpipe.custom (optionalField "tubulure" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1548 | + |> Jpipe.custom (optionalField "undelated" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1549 | + |> Jpipe.custom (optionalField "unsalt" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1550 | + |> Jpipe.custom (optionalField "untutelar" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1551 | + |> Jpipe.custom (optionalField "vagrant" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1552 | + |> Jpipe.custom (optionalField "Walt" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1547 | 1553 | |
| 1548 | 1554 | encodeHemocoeleClass : HemocoeleClass -> Jenc.Value |
| 1549 | 1555 | encodeHemocoeleClass x = |
| @@ -1666,7 +1672,7 @@ interacinar = | ||
| 1666 | 1672 | |> Jpipe.required "benefactorship" Jdec.bool |
| 1667 | 1673 | |> Jpipe.required "triseriatim" Jdec.string |
| 1668 | 1674 | |> Jpipe.required "tubbing" Jdec.int |
| 1669 | - |> Jpipe.optional "untrimmed" (Jdec.null ()) () | |
| 1675 | + |> Jpipe.custom (optionalField "untrimmed" (Jdec.null ()) ()) | |
| 1670 | 1676 | |
| 1671 | 1677 | encodeInteracinar : Interacinar -> Jenc.Value |
| 1672 | 1678 | encodeInteracinar x = |
Test case
2 generated files · +406 −394test/inputs/json/priority/combinations2.json
Melmarray-type-array--eed288b23e27 / QuickType.elm+203 −197
| @@ -506,6 +506,12 @@ type Shakespearolater | ||
| 506 | 506 | | StringInShakespearolater String |
| 507 | 507 | |
| 508 | 508 | -- decoders and encoders |
| 509 | +optionalField key decoder fallback = | |
| 510 | + Jdec.dict Jdec.value | |
| 511 | + |> Jdec.andThen (\m -> | |
| 512 | + case Dict.get key m of | |
| 513 | + Nothing -> Jdec.succeed fallback | |
| 514 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 509 | 515 | |
| 510 | 516 | quickTypeToString : QuickType -> String |
| 511 | 517 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -525,7 +531,7 @@ quickType = | ||
| 525 | 531 | |> Jpipe.required "Andriana" (Jdec.array (Jdec.nullable Jdec.string)) |
| 526 | 532 | |> Jpipe.required "ankee" (Jdec.array ankeeElement) |
| 527 | 533 | |> Jpipe.required "annihilator" (Jdec.array (Jdec.nullable (Jdec.dict (Jdec.nullable Jdec.int)))) |
| 528 | - |> Jpipe.optional "annulose" (Jdec.null ()) () | |
| 534 | + |> Jpipe.custom (optionalField "annulose" (Jdec.null ()) ()) | |
| 529 | 535 | |> Jpipe.required "Ansarie" (Jdec.array ansarieElement) |
| 530 | 536 | |> Jpipe.required "aphasia" (Jdec.array aphasia) |
| 531 | 537 | |> Jpipe.required "asprawl" (Jdec.array asprawl) |
| @@ -688,26 +694,26 @@ encodeAlleviateElement x = case x of | ||
| 688 | 694 | alleviateClass : Jdec.Decoder AlleviateClass |
| 689 | 695 | alleviateClass = |
| 690 | 696 | Jdec.succeed AlleviateClass |
| 691 | - |> Jpipe.optional "apriori" (Jdec.null ()) () | |
| 692 | - |> Jpipe.optional "beggarer" (Jdec.null ()) () | |
| 693 | - |> Jpipe.optional "brokenheartedly" (Jdec.null ()) () | |
| 694 | - |> Jpipe.optional "debilitation" (Jdec.null ()) () | |
| 695 | - |> Jpipe.optional "frike" (Jdec.null ()) () | |
| 696 | - |> Jpipe.optional "gastrolith" (Jdec.null ()) () | |
| 697 | - |> Jpipe.optional "Hulsean" (Jdec.null ()) () | |
| 698 | - |> Jpipe.optional "orthocentric" (Jdec.null ()) () | |
| 699 | - |> Jpipe.optional "petaly" (Jdec.null ()) () | |
| 700 | - |> Jpipe.optional "probudgeting" (Jdec.null ()) () | |
| 701 | - |> Jpipe.optional "reacquire" (Jdec.null ()) () | |
| 702 | - |> Jpipe.optional "scow" (Jdec.null ()) () | |
| 703 | - |> Jpipe.optional "shutoff" (Jdec.null ()) () | |
| 704 | - |> Jpipe.optional "subcontiguous" (Jdec.null ()) () | |
| 705 | - |> Jpipe.optional "suffumigate" (Jdec.null ()) () | |
| 706 | - |> Jpipe.optional "transformable" (Jdec.null ()) () | |
| 707 | - |> Jpipe.optional "uncoroneted" (Jdec.null ()) () | |
| 708 | - |> Jpipe.optional "unparking" (Jdec.null ()) () | |
| 709 | - |> Jpipe.optional "unvarnishedness" (Jdec.null ()) () | |
| 710 | - |> Jpipe.optional "wherewithal" (Jdec.null ()) () | |
| 697 | + |> Jpipe.custom (optionalField "apriori" (Jdec.null ()) ()) | |
| 698 | + |> Jpipe.custom (optionalField "beggarer" (Jdec.null ()) ()) | |
| 699 | + |> Jpipe.custom (optionalField "brokenheartedly" (Jdec.null ()) ()) | |
| 700 | + |> Jpipe.custom (optionalField "debilitation" (Jdec.null ()) ()) | |
| 701 | + |> Jpipe.custom (optionalField "frike" (Jdec.null ()) ()) | |
| 702 | + |> Jpipe.custom (optionalField "gastrolith" (Jdec.null ()) ()) | |
| 703 | + |> Jpipe.custom (optionalField "Hulsean" (Jdec.null ()) ()) | |
| 704 | + |> Jpipe.custom (optionalField "orthocentric" (Jdec.null ()) ()) | |
| 705 | + |> Jpipe.custom (optionalField "petaly" (Jdec.null ()) ()) | |
| 706 | + |> Jpipe.custom (optionalField "probudgeting" (Jdec.null ()) ()) | |
| 707 | + |> Jpipe.custom (optionalField "reacquire" (Jdec.null ()) ()) | |
| 708 | + |> Jpipe.custom (optionalField "scow" (Jdec.null ()) ()) | |
| 709 | + |> Jpipe.custom (optionalField "shutoff" (Jdec.null ()) ()) | |
| 710 | + |> Jpipe.custom (optionalField "subcontiguous" (Jdec.null ()) ()) | |
| 711 | + |> Jpipe.custom (optionalField "suffumigate" (Jdec.null ()) ()) | |
| 712 | + |> Jpipe.custom (optionalField "transformable" (Jdec.null ()) ()) | |
| 713 | + |> Jpipe.custom (optionalField "uncoroneted" (Jdec.null ()) ()) | |
| 714 | + |> Jpipe.custom (optionalField "unparking" (Jdec.null ()) ()) | |
| 715 | + |> Jpipe.custom (optionalField "unvarnishedness" (Jdec.null ()) ()) | |
| 716 | + |> Jpipe.custom (optionalField "wherewithal" (Jdec.null ()) ()) | |
| 711 | 717 | |
| 712 | 718 | encodeAlleviateClass : AlleviateClass -> Jenc.Value |
| 713 | 719 | encodeAlleviateClass x = |
| @@ -755,7 +761,7 @@ rebecca = | ||
| 755 | 761 | |> Jpipe.required "Chirotherium" Jdec.int |
| 756 | 762 | |> Jpipe.required "disdiapason" Jdec.string |
| 757 | 763 | |> Jpipe.required "homocerc" Jdec.bool |
| 758 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 764 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 759 | 765 | |
| 760 | 766 | encodeRebecca : Rebecca -> Jenc.Value |
| 761 | 767 | encodeRebecca x = |
| @@ -782,31 +788,31 @@ encodeAmbassage x = case x of | ||
| 782 | 788 | amphithyron : Jdec.Decoder Amphithyron |
| 783 | 789 | amphithyron = |
| 784 | 790 | Jdec.succeed Amphithyron |
| 785 | - |> Jpipe.optional "akroasis" (Jdec.nullable Jdec.int) Nothing | |
| 786 | - |> Jpipe.optional "antiphonical" (Jdec.nullable Jdec.int) Nothing | |
| 787 | - |> Jpipe.optional "basebred" (Jdec.nullable Jdec.int) Nothing | |
| 788 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 789 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 790 | - |> Jpipe.optional "conductometric" (Jdec.nullable Jdec.int) Nothing | |
| 791 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 792 | - |> Jpipe.optional "ensilation" (Jdec.nullable Jdec.int) Nothing | |
| 793 | - |> Jpipe.optional "eyebolt" (Jdec.nullable Jdec.int) Nothing | |
| 794 | - |> Jpipe.optional "fistulated" (Jdec.nullable Jdec.int) Nothing | |
| 795 | - |> Jpipe.optional "heteropod" (Jdec.nullable Jdec.int) Nothing | |
| 796 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 797 | - |> Jpipe.optional "Juniperus" (Jdec.nullable Jdec.int) Nothing | |
| 798 | - |> Jpipe.optional "labyrinthically" (Jdec.nullable Jdec.int) Nothing | |
| 799 | - |> Jpipe.optional "martyrization" (Jdec.nullable Jdec.int) Nothing | |
| 800 | - |> Jpipe.optional "mispolicy" (Jdec.nullable Jdec.int) Nothing | |
| 801 | - |> Jpipe.optional "multipara" (Jdec.nullable Jdec.int) Nothing | |
| 802 | - |> Jpipe.optional "Nazirite" (Jdec.nullable Jdec.int) Nothing | |
| 803 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 804 | - |> Jpipe.optional "possessorial" (Jdec.nullable Jdec.int) Nothing | |
| 805 | - |> Jpipe.optional "shamed" (Jdec.nullable Jdec.int) Nothing | |
| 806 | - |> Jpipe.optional "shelfworn" (Jdec.nullable Jdec.int) Nothing | |
| 807 | - |> Jpipe.optional "stagnum" (Jdec.nullable Jdec.int) Nothing | |
| 808 | - |> Jpipe.optional "Those" (Jdec.nullable Jdec.int) Nothing | |
| 809 | - |> Jpipe.optional "undecimal" (Jdec.nullable Jdec.int) Nothing | |
| 791 | + |> Jpipe.custom (optionalField "akroasis" (Jdec.nullable Jdec.int) Nothing) | |
| 792 | + |> Jpipe.custom (optionalField "antiphonical" (Jdec.nullable Jdec.int) Nothing) | |
| 793 | + |> Jpipe.custom (optionalField "basebred" (Jdec.nullable Jdec.int) Nothing) | |
| 794 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 795 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 796 | + |> Jpipe.custom (optionalField "conductometric" (Jdec.nullable Jdec.int) Nothing) | |
| 797 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 798 | + |> Jpipe.custom (optionalField "ensilation" (Jdec.nullable Jdec.int) Nothing) | |
| 799 | + |> Jpipe.custom (optionalField "eyebolt" (Jdec.nullable Jdec.int) Nothing) | |
| 800 | + |> Jpipe.custom (optionalField "fistulated" (Jdec.nullable Jdec.int) Nothing) | |
| 801 | + |> Jpipe.custom (optionalField "heteropod" (Jdec.nullable Jdec.int) Nothing) | |
| 802 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 803 | + |> Jpipe.custom (optionalField "Juniperus" (Jdec.nullable Jdec.int) Nothing) | |
| 804 | + |> Jpipe.custom (optionalField "labyrinthically" (Jdec.nullable Jdec.int) Nothing) | |
| 805 | + |> Jpipe.custom (optionalField "martyrization" (Jdec.nullable Jdec.int) Nothing) | |
| 806 | + |> Jpipe.custom (optionalField "mispolicy" (Jdec.nullable Jdec.int) Nothing) | |
| 807 | + |> Jpipe.custom (optionalField "multipara" (Jdec.nullable Jdec.int) Nothing) | |
| 808 | + |> Jpipe.custom (optionalField "Nazirite" (Jdec.nullable Jdec.int) Nothing) | |
| 809 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 810 | + |> Jpipe.custom (optionalField "possessorial" (Jdec.nullable Jdec.int) Nothing) | |
| 811 | + |> Jpipe.custom (optionalField "shamed" (Jdec.nullable Jdec.int) Nothing) | |
| 812 | + |> Jpipe.custom (optionalField "shelfworn" (Jdec.nullable Jdec.int) Nothing) | |
| 813 | + |> Jpipe.custom (optionalField "stagnum" (Jdec.nullable Jdec.int) Nothing) | |
| 814 | + |> Jpipe.custom (optionalField "Those" (Jdec.nullable Jdec.int) Nothing) | |
| 815 | + |> Jpipe.custom (optionalField "undecimal" (Jdec.nullable Jdec.int) Nothing) | |
| 810 | 816 | |
| 811 | 817 | encodeAmphithyron : Amphithyron -> Jenc.Value |
| 812 | 818 | encodeAmphithyron x = |
| @@ -855,26 +861,26 @@ encodeAnkeeElement x = case x of | ||
| 855 | 861 | ankeeClass : Jdec.Decoder AnkeeClass |
| 856 | 862 | ankeeClass = |
| 857 | 863 | Jdec.succeed AnkeeClass |
| 858 | - |> Jpipe.optional "Anomoean" (Jdec.null ()) () | |
| 859 | - |> Jpipe.optional "barleyhood" (Jdec.null ()) () | |
| 860 | - |> Jpipe.optional "befriender" (Jdec.null ()) () | |
| 861 | - |> Jpipe.optional "brutishness" (Jdec.null ()) () | |
| 862 | - |> Jpipe.optional "cephalalgy" (Jdec.null ()) () | |
| 863 | - |> Jpipe.optional "cirurgian" (Jdec.null ()) () | |
| 864 | - |> Jpipe.optional "conventionally" (Jdec.null ()) () | |
| 865 | - |> Jpipe.optional "jackshay" (Jdec.null ()) () | |
| 866 | - |> Jpipe.optional "milammeter" (Jdec.null ()) () | |
| 867 | - |> Jpipe.optional "Naja" (Jdec.null ()) () | |
| 868 | - |> Jpipe.optional "ombrological" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "phonasthenia" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "retrievableness" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "snakily" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "swot" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "tartlet" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "thiofuran" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "tracheophone" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "tuglike" (Jdec.null ()) () | |
| 877 | - |> Jpipe.optional "unscratchingly" (Jdec.null ()) () | |
| 864 | + |> Jpipe.custom (optionalField "Anomoean" (Jdec.null ()) ()) | |
| 865 | + |> Jpipe.custom (optionalField "barleyhood" (Jdec.null ()) ()) | |
| 866 | + |> Jpipe.custom (optionalField "befriender" (Jdec.null ()) ()) | |
| 867 | + |> Jpipe.custom (optionalField "brutishness" (Jdec.null ()) ()) | |
| 868 | + |> Jpipe.custom (optionalField "cephalalgy" (Jdec.null ()) ()) | |
| 869 | + |> Jpipe.custom (optionalField "cirurgian" (Jdec.null ()) ()) | |
| 870 | + |> Jpipe.custom (optionalField "conventionally" (Jdec.null ()) ()) | |
| 871 | + |> Jpipe.custom (optionalField "jackshay" (Jdec.null ()) ()) | |
| 872 | + |> Jpipe.custom (optionalField "milammeter" (Jdec.null ()) ()) | |
| 873 | + |> Jpipe.custom (optionalField "Naja" (Jdec.null ()) ()) | |
| 874 | + |> Jpipe.custom (optionalField "ombrological" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "phonasthenia" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "retrievableness" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "snakily" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "swot" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "tartlet" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "thiofuran" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "tracheophone" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "tuglike" (Jdec.null ()) ()) | |
| 883 | + |> Jpipe.custom (optionalField "unscratchingly" (Jdec.null ()) ()) | |
| 878 | 884 | |
| 879 | 885 | encodeAnkeeClass : AnkeeClass -> Jenc.Value |
| 880 | 886 | encodeAnkeeClass x = |
| @@ -918,26 +924,26 @@ encodeAnsarieElement x = case x of | ||
| 918 | 924 | ansarieClass : Jdec.Decoder AnsarieClass |
| 919 | 925 | ansarieClass = |
| 920 | 926 | Jdec.succeed AnsarieClass |
| 921 | - |> Jpipe.optional "accension" (Jdec.null ()) () | |
| 922 | - |> Jpipe.optional "Alida" (Jdec.null ()) () | |
| 923 | - |> Jpipe.optional "asteria" (Jdec.null ()) () | |
| 924 | - |> Jpipe.optional "beriberic" (Jdec.null ()) () | |
| 925 | - |> Jpipe.optional "edgebone" (Jdec.null ()) () | |
| 926 | - |> Jpipe.optional "gastrodialysis" (Jdec.null ()) () | |
| 927 | - |> Jpipe.optional "geographic" (Jdec.null ()) () | |
| 928 | - |> Jpipe.optional "Ictonyx" (Jdec.null ()) () | |
| 929 | - |> Jpipe.optional "metrocele" (Jdec.null ()) () | |
| 930 | - |> Jpipe.optional "misgraft" (Jdec.null ()) () | |
| 931 | - |> Jpipe.optional "monteith" (Jdec.null ()) () | |
| 932 | - |> Jpipe.optional "notcher" (Jdec.null ()) () | |
| 933 | - |> Jpipe.optional "prorestriction" (Jdec.null ()) () | |
| 934 | - |> Jpipe.optional "Ramist" (Jdec.null ()) () | |
| 935 | - |> Jpipe.optional "throatlet" (Jdec.null ()) () | |
| 936 | - |> Jpipe.optional "unfair" (Jdec.null ()) () | |
| 937 | - |> Jpipe.optional "unsynonymous" (Jdec.null ()) () | |
| 938 | - |> Jpipe.optional "water" (Jdec.null ()) () | |
| 939 | - |> Jpipe.optional "zestfully" (Jdec.null ()) () | |
| 940 | - |> Jpipe.optional "zincic" (Jdec.null ()) () | |
| 927 | + |> Jpipe.custom (optionalField "accension" (Jdec.null ()) ()) | |
| 928 | + |> Jpipe.custom (optionalField "Alida" (Jdec.null ()) ()) | |
| 929 | + |> Jpipe.custom (optionalField "asteria" (Jdec.null ()) ()) | |
| 930 | + |> Jpipe.custom (optionalField "beriberic" (Jdec.null ()) ()) | |
| 931 | + |> Jpipe.custom (optionalField "edgebone" (Jdec.null ()) ()) | |
| 932 | + |> Jpipe.custom (optionalField "gastrodialysis" (Jdec.null ()) ()) | |
| 933 | + |> Jpipe.custom (optionalField "geographic" (Jdec.null ()) ()) | |
| 934 | + |> Jpipe.custom (optionalField "Ictonyx" (Jdec.null ()) ()) | |
| 935 | + |> Jpipe.custom (optionalField "metrocele" (Jdec.null ()) ()) | |
| 936 | + |> Jpipe.custom (optionalField "misgraft" (Jdec.null ()) ()) | |
| 937 | + |> Jpipe.custom (optionalField "monteith" (Jdec.null ()) ()) | |
| 938 | + |> Jpipe.custom (optionalField "notcher" (Jdec.null ()) ()) | |
| 939 | + |> Jpipe.custom (optionalField "prorestriction" (Jdec.null ()) ()) | |
| 940 | + |> Jpipe.custom (optionalField "Ramist" (Jdec.null ()) ()) | |
| 941 | + |> Jpipe.custom (optionalField "throatlet" (Jdec.null ()) ()) | |
| 942 | + |> Jpipe.custom (optionalField "unfair" (Jdec.null ()) ()) | |
| 943 | + |> Jpipe.custom (optionalField "unsynonymous" (Jdec.null ()) ()) | |
| 944 | + |> Jpipe.custom (optionalField "water" (Jdec.null ()) ()) | |
| 945 | + |> Jpipe.custom (optionalField "zestfully" (Jdec.null ()) ()) | |
| 946 | + |> Jpipe.custom (optionalField "zincic" (Jdec.null ()) ()) | |
| 941 | 947 | |
| 942 | 948 | encodeAnsarieClass : AnsarieClass -> Jenc.Value |
| 943 | 949 | encodeAnsarieClass x = |
| @@ -1125,26 +1131,26 @@ encodeChytridiaceaeElement x = case x of | ||
| 1125 | 1131 | chytridiaceaeClass : Jdec.Decoder ChytridiaceaeClass |
| 1126 | 1132 | chytridiaceaeClass = |
| 1127 | 1133 | Jdec.succeed ChytridiaceaeClass |
| 1128 | - |> Jpipe.optional "Batidaceae" (Jdec.null ()) () | |
| 1129 | - |> Jpipe.optional "Brechites" (Jdec.null ()) () | |
| 1130 | - |> Jpipe.optional "codespairer" (Jdec.null ()) () | |
| 1131 | - |> Jpipe.optional "Emery" (Jdec.null ()) () | |
| 1132 | - |> Jpipe.optional "enervative" (Jdec.null ()) () | |
| 1133 | - |> Jpipe.optional "excriminate" (Jdec.null ()) () | |
| 1134 | - |> Jpipe.optional "goshenite" (Jdec.null ()) () | |
| 1135 | - |> Jpipe.optional "grime" (Jdec.null ()) () | |
| 1136 | - |> Jpipe.optional "gritten" (Jdec.null ()) () | |
| 1137 | - |> Jpipe.optional "hectorly" (Jdec.null ()) () | |
| 1138 | - |> Jpipe.optional "intermediation" (Jdec.null ()) () | |
| 1139 | - |> Jpipe.optional "meeterly" (Jdec.null ()) () | |
| 1140 | - |> Jpipe.optional "Narraganset" (Jdec.null ()) () | |
| 1141 | - |> Jpipe.optional "onymatic" (Jdec.null ()) () | |
| 1142 | - |> Jpipe.optional "paddlecock" (Jdec.null ()) () | |
| 1143 | - |> Jpipe.optional "thana" (Jdec.null ()) () | |
| 1144 | - |> Jpipe.optional "thornily" (Jdec.null ()) () | |
| 1145 | - |> Jpipe.optional "uckia" (Jdec.null ()) () | |
| 1146 | - |> Jpipe.optional "unmettle" (Jdec.null ()) () | |
| 1147 | - |> Jpipe.optional "vorticellid" (Jdec.null ()) () | |
| 1134 | + |> Jpipe.custom (optionalField "Batidaceae" (Jdec.null ()) ()) | |
| 1135 | + |> Jpipe.custom (optionalField "Brechites" (Jdec.null ()) ()) | |
| 1136 | + |> Jpipe.custom (optionalField "codespairer" (Jdec.null ()) ()) | |
| 1137 | + |> Jpipe.custom (optionalField "Emery" (Jdec.null ()) ()) | |
| 1138 | + |> Jpipe.custom (optionalField "enervative" (Jdec.null ()) ()) | |
| 1139 | + |> Jpipe.custom (optionalField "excriminate" (Jdec.null ()) ()) | |
| 1140 | + |> Jpipe.custom (optionalField "goshenite" (Jdec.null ()) ()) | |
| 1141 | + |> Jpipe.custom (optionalField "grime" (Jdec.null ()) ()) | |
| 1142 | + |> Jpipe.custom (optionalField "gritten" (Jdec.null ()) ()) | |
| 1143 | + |> Jpipe.custom (optionalField "hectorly" (Jdec.null ()) ()) | |
| 1144 | + |> Jpipe.custom (optionalField "intermediation" (Jdec.null ()) ()) | |
| 1145 | + |> Jpipe.custom (optionalField "meeterly" (Jdec.null ()) ()) | |
| 1146 | + |> Jpipe.custom (optionalField "Narraganset" (Jdec.null ()) ()) | |
| 1147 | + |> Jpipe.custom (optionalField "onymatic" (Jdec.null ()) ()) | |
| 1148 | + |> Jpipe.custom (optionalField "paddlecock" (Jdec.null ()) ()) | |
| 1149 | + |> Jpipe.custom (optionalField "thana" (Jdec.null ()) ()) | |
| 1150 | + |> Jpipe.custom (optionalField "thornily" (Jdec.null ()) ()) | |
| 1151 | + |> Jpipe.custom (optionalField "uckia" (Jdec.null ()) ()) | |
| 1152 | + |> Jpipe.custom (optionalField "unmettle" (Jdec.null ()) ()) | |
| 1153 | + |> Jpipe.custom (optionalField "vorticellid" (Jdec.null ()) ()) | |
| 1148 | 1154 | |
| 1149 | 1155 | encodeChytridiaceaeClass : ChytridiaceaeClass -> Jenc.Value |
| 1150 | 1156 | encodeChytridiaceaeClass x = |
| @@ -1186,31 +1192,31 @@ encodeDiscordiaElement x = case x of | ||
| 1186 | 1192 | discordiaClass : Jdec.Decoder DiscordiaClass |
| 1187 | 1193 | discordiaClass = |
| 1188 | 1194 | Jdec.succeed DiscordiaClass |
| 1189 | - |> Jpipe.optional "Altaic" (Jdec.nullable Jdec.int) Nothing | |
| 1190 | - |> Jpipe.optional "amoristic" (Jdec.nullable Jdec.int) Nothing | |
| 1191 | - |> Jpipe.optional "blennophthalmia" (Jdec.nullable Jdec.int) Nothing | |
| 1192 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1193 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1194 | - |> Jpipe.optional "disciplinability" (Jdec.nullable Jdec.int) Nothing | |
| 1195 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1196 | - |> Jpipe.optional "goofer" (Jdec.nullable Jdec.int) Nothing | |
| 1197 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1198 | - |> Jpipe.optional "laryngograph" (Jdec.nullable Jdec.int) Nothing | |
| 1199 | - |> Jpipe.optional "leucitis" (Jdec.nullable Jdec.int) Nothing | |
| 1200 | - |> Jpipe.optional "lymphocyst" (Jdec.nullable Jdec.int) Nothing | |
| 1201 | - |> Jpipe.optional "microcosmology" (Jdec.nullable Jdec.int) Nothing | |
| 1202 | - |> Jpipe.optional "nauseation" (Jdec.nullable Jdec.int) Nothing | |
| 1203 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1204 | - |> Jpipe.optional "Patarin" (Jdec.nullable Jdec.int) Nothing | |
| 1205 | - |> Jpipe.optional "preliberal" (Jdec.nullable Jdec.int) Nothing | |
| 1206 | - |> Jpipe.optional "prettifier" (Jdec.nullable Jdec.int) Nothing | |
| 1207 | - |> Jpipe.optional "rangework" (Jdec.nullable Jdec.int) Nothing | |
| 1208 | - |> Jpipe.optional "redient" (Jdec.nullable Jdec.int) Nothing | |
| 1209 | - |> Jpipe.optional "subfusiform" (Jdec.nullable Jdec.int) Nothing | |
| 1210 | - |> Jpipe.optional "suicidical" (Jdec.nullable Jdec.int) Nothing | |
| 1211 | - |> Jpipe.optional "swow" (Jdec.nullable Jdec.int) Nothing | |
| 1212 | - |> Jpipe.optional "wastrel" (Jdec.nullable Jdec.int) Nothing | |
| 1213 | - |> Jpipe.optional "wingle" (Jdec.nullable Jdec.int) Nothing | |
| 1195 | + |> Jpipe.custom (optionalField "Altaic" (Jdec.nullable Jdec.int) Nothing) | |
| 1196 | + |> Jpipe.custom (optionalField "amoristic" (Jdec.nullable Jdec.int) Nothing) | |
| 1197 | + |> Jpipe.custom (optionalField "blennophthalmia" (Jdec.nullable Jdec.int) Nothing) | |
| 1198 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1199 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1200 | + |> Jpipe.custom (optionalField "disciplinability" (Jdec.nullable Jdec.int) Nothing) | |
| 1201 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1202 | + |> Jpipe.custom (optionalField "goofer" (Jdec.nullable Jdec.int) Nothing) | |
| 1203 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1204 | + |> Jpipe.custom (optionalField "laryngograph" (Jdec.nullable Jdec.int) Nothing) | |
| 1205 | + |> Jpipe.custom (optionalField "leucitis" (Jdec.nullable Jdec.int) Nothing) | |
| 1206 | + |> Jpipe.custom (optionalField "lymphocyst" (Jdec.nullable Jdec.int) Nothing) | |
| 1207 | + |> Jpipe.custom (optionalField "microcosmology" (Jdec.nullable Jdec.int) Nothing) | |
| 1208 | + |> Jpipe.custom (optionalField "nauseation" (Jdec.nullable Jdec.int) Nothing) | |
| 1209 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1210 | + |> Jpipe.custom (optionalField "Patarin" (Jdec.nullable Jdec.int) Nothing) | |
| 1211 | + |> Jpipe.custom (optionalField "preliberal" (Jdec.nullable Jdec.int) Nothing) | |
| 1212 | + |> Jpipe.custom (optionalField "prettifier" (Jdec.nullable Jdec.int) Nothing) | |
| 1213 | + |> Jpipe.custom (optionalField "rangework" (Jdec.nullable Jdec.int) Nothing) | |
| 1214 | + |> Jpipe.custom (optionalField "redient" (Jdec.nullable Jdec.int) Nothing) | |
| 1215 | + |> Jpipe.custom (optionalField "subfusiform" (Jdec.nullable Jdec.int) Nothing) | |
| 1216 | + |> Jpipe.custom (optionalField "suicidical" (Jdec.nullable Jdec.int) Nothing) | |
| 1217 | + |> Jpipe.custom (optionalField "swow" (Jdec.nullable Jdec.int) Nothing) | |
| 1218 | + |> Jpipe.custom (optionalField "wastrel" (Jdec.nullable Jdec.int) Nothing) | |
| 1219 | + |> Jpipe.custom (optionalField "wingle" (Jdec.nullable Jdec.int) Nothing) | |
| 1214 | 1220 | |
| 1215 | 1221 | encodeDiscordiaClass : DiscordiaClass -> Jenc.Value |
| 1216 | 1222 | encodeDiscordiaClass x = |
| @@ -1297,26 +1303,26 @@ encodeGryphosaurusElement x = case x of | ||
| 1297 | 1303 | gryphosaurusClass : Jdec.Decoder GryphosaurusClass |
| 1298 | 1304 | gryphosaurusClass = |
| 1299 | 1305 | Jdec.succeed GryphosaurusClass |
| 1300 | - |> Jpipe.optional "amissibility" (Jdec.null ()) () | |
| 1301 | - |> Jpipe.optional "Burushaski" (Jdec.null ()) () | |
| 1302 | - |> Jpipe.optional "citronin" (Jdec.null ()) () | |
| 1303 | - |> Jpipe.optional "coplaintiff" (Jdec.null ()) () | |
| 1304 | - |> Jpipe.optional "disquisitionary" (Jdec.null ()) () | |
| 1305 | - |> Jpipe.optional "enoplan" (Jdec.null ()) () | |
| 1306 | - |> Jpipe.optional "faintness" (Jdec.null ()) () | |
| 1307 | - |> Jpipe.optional "hebetomy" (Jdec.null ()) () | |
| 1308 | - |> Jpipe.optional "islandry" (Jdec.null ()) () | |
| 1309 | - |> Jpipe.optional "lameduck" (Jdec.null ()) () | |
| 1310 | - |> Jpipe.optional "overbattle" (Jdec.null ()) () | |
| 1311 | - |> Jpipe.optional "overinterested" (Jdec.null ()) () | |
| 1312 | - |> Jpipe.optional "phrenologic" (Jdec.null ()) () | |
| 1313 | - |> Jpipe.optional "rainband" (Jdec.null ()) () | |
| 1314 | - |> Jpipe.optional "shiningly" (Jdec.null ()) () | |
| 1315 | - |> Jpipe.optional "stamineous" (Jdec.null ()) () | |
| 1316 | - |> Jpipe.optional "subscapularis" (Jdec.null ()) () | |
| 1317 | - |> Jpipe.optional "Tahami" (Jdec.null ()) () | |
| 1318 | - |> Jpipe.optional "undaubed" (Jdec.null ()) () | |
| 1319 | - |> Jpipe.optional "underntime" (Jdec.null ()) () | |
| 1306 | + |> Jpipe.custom (optionalField "amissibility" (Jdec.null ()) ()) | |
| 1307 | + |> Jpipe.custom (optionalField "Burushaski" (Jdec.null ()) ()) | |
| 1308 | + |> Jpipe.custom (optionalField "citronin" (Jdec.null ()) ()) | |
| 1309 | + |> Jpipe.custom (optionalField "coplaintiff" (Jdec.null ()) ()) | |
| 1310 | + |> Jpipe.custom (optionalField "disquisitionary" (Jdec.null ()) ()) | |
| 1311 | + |> Jpipe.custom (optionalField "enoplan" (Jdec.null ()) ()) | |
| 1312 | + |> Jpipe.custom (optionalField "faintness" (Jdec.null ()) ()) | |
| 1313 | + |> Jpipe.custom (optionalField "hebetomy" (Jdec.null ()) ()) | |
| 1314 | + |> Jpipe.custom (optionalField "islandry" (Jdec.null ()) ()) | |
| 1315 | + |> Jpipe.custom (optionalField "lameduck" (Jdec.null ()) ()) | |
| 1316 | + |> Jpipe.custom (optionalField "overbattle" (Jdec.null ()) ()) | |
| 1317 | + |> Jpipe.custom (optionalField "overinterested" (Jdec.null ()) ()) | |
| 1318 | + |> Jpipe.custom (optionalField "phrenologic" (Jdec.null ()) ()) | |
| 1319 | + |> Jpipe.custom (optionalField "rainband" (Jdec.null ()) ()) | |
| 1320 | + |> Jpipe.custom (optionalField "shiningly" (Jdec.null ()) ()) | |
| 1321 | + |> Jpipe.custom (optionalField "stamineous" (Jdec.null ()) ()) | |
| 1322 | + |> Jpipe.custom (optionalField "subscapularis" (Jdec.null ()) ()) | |
| 1323 | + |> Jpipe.custom (optionalField "Tahami" (Jdec.null ()) ()) | |
| 1324 | + |> Jpipe.custom (optionalField "undaubed" (Jdec.null ()) ()) | |
| 1325 | + |> Jpipe.custom (optionalField "underntime" (Jdec.null ()) ()) | |
| 1320 | 1326 | |
| 1321 | 1327 | encodeGryphosaurusClass : GryphosaurusClass -> Jenc.Value |
| 1322 | 1328 | encodeGryphosaurusClass x = |
| @@ -1370,31 +1376,31 @@ encodeLaviniaElement x = case x of | ||
| 1370 | 1376 | laviniaClass : Jdec.Decoder LaviniaClass |
| 1371 | 1377 | laviniaClass = |
| 1372 | 1378 | Jdec.succeed LaviniaClass |
| 1373 | - |> Jpipe.optional "agitable" (Jdec.nullable Jdec.int) Nothing | |
| 1374 | - |> Jpipe.optional "asininity" (Jdec.nullable Jdec.int) Nothing | |
| 1375 | - |> Jpipe.optional "benefiter" (Jdec.nullable Jdec.int) Nothing | |
| 1376 | - |> Jpipe.optional "bronzelike" (Jdec.nullable Jdec.int) Nothing | |
| 1377 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1378 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1379 | - |> Jpipe.optional "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing | |
| 1380 | - |> Jpipe.optional "deprivement" (Jdec.nullable Jdec.int) Nothing | |
| 1381 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1382 | - |> Jpipe.optional "flippantness" (Jdec.nullable Jdec.int) Nothing | |
| 1383 | - |> Jpipe.optional "fogproof" (Jdec.nullable Jdec.int) Nothing | |
| 1384 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1385 | - |> Jpipe.optional "merrymeeting" (Jdec.nullable Jdec.int) Nothing | |
| 1386 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1387 | - |> Jpipe.optional "overcareful" (Jdec.nullable Jdec.int) Nothing | |
| 1388 | - |> Jpipe.optional "panaris" (Jdec.nullable Jdec.int) Nothing | |
| 1389 | - |> Jpipe.optional "preacceptance" (Jdec.nullable Jdec.int) Nothing | |
| 1390 | - |> Jpipe.optional "quinoxaline" (Jdec.nullable Jdec.int) Nothing | |
| 1391 | - |> Jpipe.optional "sig" (Jdec.nullable Jdec.int) Nothing | |
| 1392 | - |> Jpipe.optional "superconfusion" (Jdec.nullable Jdec.int) Nothing | |
| 1393 | - |> Jpipe.optional "Tacana" (Jdec.nullable Jdec.int) Nothing | |
| 1394 | - |> Jpipe.optional "tillotter" (Jdec.nullable Jdec.int) Nothing | |
| 1395 | - |> Jpipe.optional "tranquillize" (Jdec.nullable Jdec.int) Nothing | |
| 1396 | - |> Jpipe.optional "unquestionable" (Jdec.nullable Jdec.int) Nothing | |
| 1397 | - |> Jpipe.optional "uproute" (Jdec.nullable Jdec.int) Nothing | |
| 1379 | + |> Jpipe.custom (optionalField "agitable" (Jdec.nullable Jdec.int) Nothing) | |
| 1380 | + |> Jpipe.custom (optionalField "asininity" (Jdec.nullable Jdec.int) Nothing) | |
| 1381 | + |> Jpipe.custom (optionalField "benefiter" (Jdec.nullable Jdec.int) Nothing) | |
| 1382 | + |> Jpipe.custom (optionalField "bronzelike" (Jdec.nullable Jdec.int) Nothing) | |
| 1383 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1384 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1385 | + |> Jpipe.custom (optionalField "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing) | |
| 1386 | + |> Jpipe.custom (optionalField "deprivement" (Jdec.nullable Jdec.int) Nothing) | |
| 1387 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1388 | + |> Jpipe.custom (optionalField "flippantness" (Jdec.nullable Jdec.int) Nothing) | |
| 1389 | + |> Jpipe.custom (optionalField "fogproof" (Jdec.nullable Jdec.int) Nothing) | |
| 1390 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1391 | + |> Jpipe.custom (optionalField "merrymeeting" (Jdec.nullable Jdec.int) Nothing) | |
| 1392 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1393 | + |> Jpipe.custom (optionalField "overcareful" (Jdec.nullable Jdec.int) Nothing) | |
| 1394 | + |> Jpipe.custom (optionalField "panaris" (Jdec.nullable Jdec.int) Nothing) | |
| 1395 | + |> Jpipe.custom (optionalField "preacceptance" (Jdec.nullable Jdec.int) Nothing) | |
| 1396 | + |> Jpipe.custom (optionalField "quinoxaline" (Jdec.nullable Jdec.int) Nothing) | |
| 1397 | + |> Jpipe.custom (optionalField "sig" (Jdec.nullable Jdec.int) Nothing) | |
| 1398 | + |> Jpipe.custom (optionalField "superconfusion" (Jdec.nullable Jdec.int) Nothing) | |
| 1399 | + |> Jpipe.custom (optionalField "Tacana" (Jdec.nullable Jdec.int) Nothing) | |
| 1400 | + |> Jpipe.custom (optionalField "tillotter" (Jdec.nullable Jdec.int) Nothing) | |
| 1401 | + |> Jpipe.custom (optionalField "tranquillize" (Jdec.nullable Jdec.int) Nothing) | |
| 1402 | + |> Jpipe.custom (optionalField "unquestionable" (Jdec.nullable Jdec.int) Nothing) | |
| 1403 | + |> Jpipe.custom (optionalField "uproute" (Jdec.nullable Jdec.int) Nothing) | |
| 1398 | 1404 | |
| 1399 | 1405 | encodeLaviniaClass : LaviniaClass -> Jenc.Value |
| 1400 | 1406 | encodeLaviniaClass x = |
| @@ -1441,26 +1447,26 @@ encodeOskarElement x = case x of | ||
| 1441 | 1447 | oskarClass : Jdec.Decoder OskarClass |
| 1442 | 1448 | oskarClass = |
| 1443 | 1449 | Jdec.succeed OskarClass |
| 1444 | - |> Jpipe.optional "Acrobates" (Jdec.null ()) () | |
| 1445 | - |> Jpipe.optional "beanshooter" (Jdec.null ()) () | |
| 1446 | - |> Jpipe.optional "bearhound" (Jdec.null ()) () | |
| 1447 | - |> Jpipe.optional "Cayuga" (Jdec.null ()) () | |
| 1448 | - |> Jpipe.optional "guarneri" (Jdec.null ()) () | |
| 1449 | - |> Jpipe.optional "hypochondriacism" (Jdec.null ()) () | |
| 1450 | - |> Jpipe.optional "indication" (Jdec.null ()) () | |
| 1451 | - |> Jpipe.optional "jaculative" (Jdec.null ()) () | |
| 1452 | - |> Jpipe.optional "nagana" (Jdec.null ()) () | |
| 1453 | - |> Jpipe.optional "Netherlandish" (Jdec.null ()) () | |
| 1454 | - |> Jpipe.optional "noctivagous" (Jdec.null ()) () | |
| 1455 | - |> Jpipe.optional "nonphysiological" (Jdec.null ()) () | |
| 1456 | - |> Jpipe.optional "praxis" (Jdec.null ()) () | |
| 1457 | - |> Jpipe.optional "provision" (Jdec.null ()) () | |
| 1458 | - |> Jpipe.optional "subterhuman" (Jdec.null ()) () | |
| 1459 | - |> Jpipe.optional "sunlit" (Jdec.null ()) () | |
| 1460 | - |> Jpipe.optional "syncraniate" (Jdec.null ()) () | |
| 1461 | - |> Jpipe.optional "teachment" (Jdec.null ()) () | |
| 1462 | - |> Jpipe.optional "unmutinous" (Jdec.null ()) () | |
| 1463 | - |> Jpipe.optional "unstoppable" (Jdec.null ()) () | |
| 1450 | + |> Jpipe.custom (optionalField "Acrobates" (Jdec.null ()) ()) | |
| 1451 | + |> Jpipe.custom (optionalField "beanshooter" (Jdec.null ()) ()) | |
| 1452 | + |> Jpipe.custom (optionalField "bearhound" (Jdec.null ()) ()) | |
| 1453 | + |> Jpipe.custom (optionalField "Cayuga" (Jdec.null ()) ()) | |
| 1454 | + |> Jpipe.custom (optionalField "guarneri" (Jdec.null ()) ()) | |
| 1455 | + |> Jpipe.custom (optionalField "hypochondriacism" (Jdec.null ()) ()) | |
| 1456 | + |> Jpipe.custom (optionalField "indication" (Jdec.null ()) ()) | |
| 1457 | + |> Jpipe.custom (optionalField "jaculative" (Jdec.null ()) ()) | |
| 1458 | + |> Jpipe.custom (optionalField "nagana" (Jdec.null ()) ()) | |
| 1459 | + |> Jpipe.custom (optionalField "Netherlandish" (Jdec.null ()) ()) | |
| 1460 | + |> Jpipe.custom (optionalField "noctivagous" (Jdec.null ()) ()) | |
| 1461 | + |> Jpipe.custom (optionalField "nonphysiological" (Jdec.null ()) ()) | |
| 1462 | + |> Jpipe.custom (optionalField "praxis" (Jdec.null ()) ()) | |
| 1463 | + |> Jpipe.custom (optionalField "provision" (Jdec.null ()) ()) | |
| 1464 | + |> Jpipe.custom (optionalField "subterhuman" (Jdec.null ()) ()) | |
| 1465 | + |> Jpipe.custom (optionalField "sunlit" (Jdec.null ()) ()) | |
| 1466 | + |> Jpipe.custom (optionalField "syncraniate" (Jdec.null ()) ()) | |
| 1467 | + |> Jpipe.custom (optionalField "teachment" (Jdec.null ()) ()) | |
| 1468 | + |> Jpipe.custom (optionalField "unmutinous" (Jdec.null ()) ()) | |
| 1469 | + |> Jpipe.custom (optionalField "unstoppable" (Jdec.null ()) ()) | |
| 1464 | 1470 | |
| 1465 | 1471 | encodeOskarClass : OskarClass -> Jenc.Value |
| 1466 | 1472 | encodeOskarClass x = |
Melmdefault / QuickType.elm+203 −197
| @@ -505,6 +505,12 @@ type Shakespearolater | ||
| 505 | 505 | | StringInShakespearolater String |
| 506 | 506 | |
| 507 | 507 | -- decoders and encoders |
| 508 | +optionalField key decoder fallback = | |
| 509 | + Jdec.dict Jdec.value | |
| 510 | + |> Jdec.andThen (\m -> | |
| 511 | + case Dict.get key m of | |
| 512 | + Nothing -> Jdec.succeed fallback | |
| 513 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 508 | 514 | |
| 509 | 515 | quickTypeToString : QuickType -> String |
| 510 | 516 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -524,7 +530,7 @@ quickType = | ||
| 524 | 530 | |> Jpipe.required "Andriana" (Jdec.list (Jdec.nullable Jdec.string)) |
| 525 | 531 | |> Jpipe.required "ankee" (Jdec.list ankeeElement) |
| 526 | 532 | |> Jpipe.required "annihilator" (Jdec.list (Jdec.nullable (Jdec.dict (Jdec.nullable Jdec.int)))) |
| 527 | - |> Jpipe.optional "annulose" (Jdec.null ()) () | |
| 533 | + |> Jpipe.custom (optionalField "annulose" (Jdec.null ()) ()) | |
| 528 | 534 | |> Jpipe.required "Ansarie" (Jdec.list ansarieElement) |
| 529 | 535 | |> Jpipe.required "aphasia" (Jdec.list aphasia) |
| 530 | 536 | |> Jpipe.required "asprawl" (Jdec.list asprawl) |
| @@ -687,26 +693,26 @@ encodeAlleviateElement x = case x of | ||
| 687 | 693 | alleviateClass : Jdec.Decoder AlleviateClass |
| 688 | 694 | alleviateClass = |
| 689 | 695 | Jdec.succeed AlleviateClass |
| 690 | - |> Jpipe.optional "apriori" (Jdec.null ()) () | |
| 691 | - |> Jpipe.optional "beggarer" (Jdec.null ()) () | |
| 692 | - |> Jpipe.optional "brokenheartedly" (Jdec.null ()) () | |
| 693 | - |> Jpipe.optional "debilitation" (Jdec.null ()) () | |
| 694 | - |> Jpipe.optional "frike" (Jdec.null ()) () | |
| 695 | - |> Jpipe.optional "gastrolith" (Jdec.null ()) () | |
| 696 | - |> Jpipe.optional "Hulsean" (Jdec.null ()) () | |
| 697 | - |> Jpipe.optional "orthocentric" (Jdec.null ()) () | |
| 698 | - |> Jpipe.optional "petaly" (Jdec.null ()) () | |
| 699 | - |> Jpipe.optional "probudgeting" (Jdec.null ()) () | |
| 700 | - |> Jpipe.optional "reacquire" (Jdec.null ()) () | |
| 701 | - |> Jpipe.optional "scow" (Jdec.null ()) () | |
| 702 | - |> Jpipe.optional "shutoff" (Jdec.null ()) () | |
| 703 | - |> Jpipe.optional "subcontiguous" (Jdec.null ()) () | |
| 704 | - |> Jpipe.optional "suffumigate" (Jdec.null ()) () | |
| 705 | - |> Jpipe.optional "transformable" (Jdec.null ()) () | |
| 706 | - |> Jpipe.optional "uncoroneted" (Jdec.null ()) () | |
| 707 | - |> Jpipe.optional "unparking" (Jdec.null ()) () | |
| 708 | - |> Jpipe.optional "unvarnishedness" (Jdec.null ()) () | |
| 709 | - |> Jpipe.optional "wherewithal" (Jdec.null ()) () | |
| 696 | + |> Jpipe.custom (optionalField "apriori" (Jdec.null ()) ()) | |
| 697 | + |> Jpipe.custom (optionalField "beggarer" (Jdec.null ()) ()) | |
| 698 | + |> Jpipe.custom (optionalField "brokenheartedly" (Jdec.null ()) ()) | |
| 699 | + |> Jpipe.custom (optionalField "debilitation" (Jdec.null ()) ()) | |
| 700 | + |> Jpipe.custom (optionalField "frike" (Jdec.null ()) ()) | |
| 701 | + |> Jpipe.custom (optionalField "gastrolith" (Jdec.null ()) ()) | |
| 702 | + |> Jpipe.custom (optionalField "Hulsean" (Jdec.null ()) ()) | |
| 703 | + |> Jpipe.custom (optionalField "orthocentric" (Jdec.null ()) ()) | |
| 704 | + |> Jpipe.custom (optionalField "petaly" (Jdec.null ()) ()) | |
| 705 | + |> Jpipe.custom (optionalField "probudgeting" (Jdec.null ()) ()) | |
| 706 | + |> Jpipe.custom (optionalField "reacquire" (Jdec.null ()) ()) | |
| 707 | + |> Jpipe.custom (optionalField "scow" (Jdec.null ()) ()) | |
| 708 | + |> Jpipe.custom (optionalField "shutoff" (Jdec.null ()) ()) | |
| 709 | + |> Jpipe.custom (optionalField "subcontiguous" (Jdec.null ()) ()) | |
| 710 | + |> Jpipe.custom (optionalField "suffumigate" (Jdec.null ()) ()) | |
| 711 | + |> Jpipe.custom (optionalField "transformable" (Jdec.null ()) ()) | |
| 712 | + |> Jpipe.custom (optionalField "uncoroneted" (Jdec.null ()) ()) | |
| 713 | + |> Jpipe.custom (optionalField "unparking" (Jdec.null ()) ()) | |
| 714 | + |> Jpipe.custom (optionalField "unvarnishedness" (Jdec.null ()) ()) | |
| 715 | + |> Jpipe.custom (optionalField "wherewithal" (Jdec.null ()) ()) | |
| 710 | 716 | |
| 711 | 717 | encodeAlleviateClass : AlleviateClass -> Jenc.Value |
| 712 | 718 | encodeAlleviateClass x = |
| @@ -754,7 +760,7 @@ rebecca = | ||
| 754 | 760 | |> Jpipe.required "Chirotherium" Jdec.int |
| 755 | 761 | |> Jpipe.required "disdiapason" Jdec.string |
| 756 | 762 | |> Jpipe.required "homocerc" Jdec.bool |
| 757 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 763 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 758 | 764 | |
| 759 | 765 | encodeRebecca : Rebecca -> Jenc.Value |
| 760 | 766 | encodeRebecca x = |
| @@ -781,31 +787,31 @@ encodeAmbassage x = case x of | ||
| 781 | 787 | amphithyron : Jdec.Decoder Amphithyron |
| 782 | 788 | amphithyron = |
| 783 | 789 | Jdec.succeed Amphithyron |
| 784 | - |> Jpipe.optional "akroasis" (Jdec.nullable Jdec.int) Nothing | |
| 785 | - |> Jpipe.optional "antiphonical" (Jdec.nullable Jdec.int) Nothing | |
| 786 | - |> Jpipe.optional "basebred" (Jdec.nullable Jdec.int) Nothing | |
| 787 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 788 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 789 | - |> Jpipe.optional "conductometric" (Jdec.nullable Jdec.int) Nothing | |
| 790 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 791 | - |> Jpipe.optional "ensilation" (Jdec.nullable Jdec.int) Nothing | |
| 792 | - |> Jpipe.optional "eyebolt" (Jdec.nullable Jdec.int) Nothing | |
| 793 | - |> Jpipe.optional "fistulated" (Jdec.nullable Jdec.int) Nothing | |
| 794 | - |> Jpipe.optional "heteropod" (Jdec.nullable Jdec.int) Nothing | |
| 795 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 796 | - |> Jpipe.optional "Juniperus" (Jdec.nullable Jdec.int) Nothing | |
| 797 | - |> Jpipe.optional "labyrinthically" (Jdec.nullable Jdec.int) Nothing | |
| 798 | - |> Jpipe.optional "martyrization" (Jdec.nullable Jdec.int) Nothing | |
| 799 | - |> Jpipe.optional "mispolicy" (Jdec.nullable Jdec.int) Nothing | |
| 800 | - |> Jpipe.optional "multipara" (Jdec.nullable Jdec.int) Nothing | |
| 801 | - |> Jpipe.optional "Nazirite" (Jdec.nullable Jdec.int) Nothing | |
| 802 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 803 | - |> Jpipe.optional "possessorial" (Jdec.nullable Jdec.int) Nothing | |
| 804 | - |> Jpipe.optional "shamed" (Jdec.nullable Jdec.int) Nothing | |
| 805 | - |> Jpipe.optional "shelfworn" (Jdec.nullable Jdec.int) Nothing | |
| 806 | - |> Jpipe.optional "stagnum" (Jdec.nullable Jdec.int) Nothing | |
| 807 | - |> Jpipe.optional "Those" (Jdec.nullable Jdec.int) Nothing | |
| 808 | - |> Jpipe.optional "undecimal" (Jdec.nullable Jdec.int) Nothing | |
| 790 | + |> Jpipe.custom (optionalField "akroasis" (Jdec.nullable Jdec.int) Nothing) | |
| 791 | + |> Jpipe.custom (optionalField "antiphonical" (Jdec.nullable Jdec.int) Nothing) | |
| 792 | + |> Jpipe.custom (optionalField "basebred" (Jdec.nullable Jdec.int) Nothing) | |
| 793 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 794 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 795 | + |> Jpipe.custom (optionalField "conductometric" (Jdec.nullable Jdec.int) Nothing) | |
| 796 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 797 | + |> Jpipe.custom (optionalField "ensilation" (Jdec.nullable Jdec.int) Nothing) | |
| 798 | + |> Jpipe.custom (optionalField "eyebolt" (Jdec.nullable Jdec.int) Nothing) | |
| 799 | + |> Jpipe.custom (optionalField "fistulated" (Jdec.nullable Jdec.int) Nothing) | |
| 800 | + |> Jpipe.custom (optionalField "heteropod" (Jdec.nullable Jdec.int) Nothing) | |
| 801 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 802 | + |> Jpipe.custom (optionalField "Juniperus" (Jdec.nullable Jdec.int) Nothing) | |
| 803 | + |> Jpipe.custom (optionalField "labyrinthically" (Jdec.nullable Jdec.int) Nothing) | |
| 804 | + |> Jpipe.custom (optionalField "martyrization" (Jdec.nullable Jdec.int) Nothing) | |
| 805 | + |> Jpipe.custom (optionalField "mispolicy" (Jdec.nullable Jdec.int) Nothing) | |
| 806 | + |> Jpipe.custom (optionalField "multipara" (Jdec.nullable Jdec.int) Nothing) | |
| 807 | + |> Jpipe.custom (optionalField "Nazirite" (Jdec.nullable Jdec.int) Nothing) | |
| 808 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 809 | + |> Jpipe.custom (optionalField "possessorial" (Jdec.nullable Jdec.int) Nothing) | |
| 810 | + |> Jpipe.custom (optionalField "shamed" (Jdec.nullable Jdec.int) Nothing) | |
| 811 | + |> Jpipe.custom (optionalField "shelfworn" (Jdec.nullable Jdec.int) Nothing) | |
| 812 | + |> Jpipe.custom (optionalField "stagnum" (Jdec.nullable Jdec.int) Nothing) | |
| 813 | + |> Jpipe.custom (optionalField "Those" (Jdec.nullable Jdec.int) Nothing) | |
| 814 | + |> Jpipe.custom (optionalField "undecimal" (Jdec.nullable Jdec.int) Nothing) | |
| 809 | 815 | |
| 810 | 816 | encodeAmphithyron : Amphithyron -> Jenc.Value |
| 811 | 817 | encodeAmphithyron x = |
| @@ -854,26 +860,26 @@ encodeAnkeeElement x = case x of | ||
| 854 | 860 | ankeeClass : Jdec.Decoder AnkeeClass |
| 855 | 861 | ankeeClass = |
| 856 | 862 | Jdec.succeed AnkeeClass |
| 857 | - |> Jpipe.optional "Anomoean" (Jdec.null ()) () | |
| 858 | - |> Jpipe.optional "barleyhood" (Jdec.null ()) () | |
| 859 | - |> Jpipe.optional "befriender" (Jdec.null ()) () | |
| 860 | - |> Jpipe.optional "brutishness" (Jdec.null ()) () | |
| 861 | - |> Jpipe.optional "cephalalgy" (Jdec.null ()) () | |
| 862 | - |> Jpipe.optional "cirurgian" (Jdec.null ()) () | |
| 863 | - |> Jpipe.optional "conventionally" (Jdec.null ()) () | |
| 864 | - |> Jpipe.optional "jackshay" (Jdec.null ()) () | |
| 865 | - |> Jpipe.optional "milammeter" (Jdec.null ()) () | |
| 866 | - |> Jpipe.optional "Naja" (Jdec.null ()) () | |
| 867 | - |> Jpipe.optional "ombrological" (Jdec.null ()) () | |
| 868 | - |> Jpipe.optional "phonasthenia" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "retrievableness" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "snakily" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "swot" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "tartlet" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "thiofuran" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "tracheophone" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "tuglike" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "unscratchingly" (Jdec.null ()) () | |
| 863 | + |> Jpipe.custom (optionalField "Anomoean" (Jdec.null ()) ()) | |
| 864 | + |> Jpipe.custom (optionalField "barleyhood" (Jdec.null ()) ()) | |
| 865 | + |> Jpipe.custom (optionalField "befriender" (Jdec.null ()) ()) | |
| 866 | + |> Jpipe.custom (optionalField "brutishness" (Jdec.null ()) ()) | |
| 867 | + |> Jpipe.custom (optionalField "cephalalgy" (Jdec.null ()) ()) | |
| 868 | + |> Jpipe.custom (optionalField "cirurgian" (Jdec.null ()) ()) | |
| 869 | + |> Jpipe.custom (optionalField "conventionally" (Jdec.null ()) ()) | |
| 870 | + |> Jpipe.custom (optionalField "jackshay" (Jdec.null ()) ()) | |
| 871 | + |> Jpipe.custom (optionalField "milammeter" (Jdec.null ()) ()) | |
| 872 | + |> Jpipe.custom (optionalField "Naja" (Jdec.null ()) ()) | |
| 873 | + |> Jpipe.custom (optionalField "ombrological" (Jdec.null ()) ()) | |
| 874 | + |> Jpipe.custom (optionalField "phonasthenia" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "retrievableness" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "snakily" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "swot" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "tartlet" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "thiofuran" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "tracheophone" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "tuglike" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "unscratchingly" (Jdec.null ()) ()) | |
| 877 | 883 | |
| 878 | 884 | encodeAnkeeClass : AnkeeClass -> Jenc.Value |
| 879 | 885 | encodeAnkeeClass x = |
| @@ -917,26 +923,26 @@ encodeAnsarieElement x = case x of | ||
| 917 | 923 | ansarieClass : Jdec.Decoder AnsarieClass |
| 918 | 924 | ansarieClass = |
| 919 | 925 | Jdec.succeed AnsarieClass |
| 920 | - |> Jpipe.optional "accension" (Jdec.null ()) () | |
| 921 | - |> Jpipe.optional "Alida" (Jdec.null ()) () | |
| 922 | - |> Jpipe.optional "asteria" (Jdec.null ()) () | |
| 923 | - |> Jpipe.optional "beriberic" (Jdec.null ()) () | |
| 924 | - |> Jpipe.optional "edgebone" (Jdec.null ()) () | |
| 925 | - |> Jpipe.optional "gastrodialysis" (Jdec.null ()) () | |
| 926 | - |> Jpipe.optional "geographic" (Jdec.null ()) () | |
| 927 | - |> Jpipe.optional "Ictonyx" (Jdec.null ()) () | |
| 928 | - |> Jpipe.optional "metrocele" (Jdec.null ()) () | |
| 929 | - |> Jpipe.optional "misgraft" (Jdec.null ()) () | |
| 930 | - |> Jpipe.optional "monteith" (Jdec.null ()) () | |
| 931 | - |> Jpipe.optional "notcher" (Jdec.null ()) () | |
| 932 | - |> Jpipe.optional "prorestriction" (Jdec.null ()) () | |
| 933 | - |> Jpipe.optional "Ramist" (Jdec.null ()) () | |
| 934 | - |> Jpipe.optional "throatlet" (Jdec.null ()) () | |
| 935 | - |> Jpipe.optional "unfair" (Jdec.null ()) () | |
| 936 | - |> Jpipe.optional "unsynonymous" (Jdec.null ()) () | |
| 937 | - |> Jpipe.optional "water" (Jdec.null ()) () | |
| 938 | - |> Jpipe.optional "zestfully" (Jdec.null ()) () | |
| 939 | - |> Jpipe.optional "zincic" (Jdec.null ()) () | |
| 926 | + |> Jpipe.custom (optionalField "accension" (Jdec.null ()) ()) | |
| 927 | + |> Jpipe.custom (optionalField "Alida" (Jdec.null ()) ()) | |
| 928 | + |> Jpipe.custom (optionalField "asteria" (Jdec.null ()) ()) | |
| 929 | + |> Jpipe.custom (optionalField "beriberic" (Jdec.null ()) ()) | |
| 930 | + |> Jpipe.custom (optionalField "edgebone" (Jdec.null ()) ()) | |
| 931 | + |> Jpipe.custom (optionalField "gastrodialysis" (Jdec.null ()) ()) | |
| 932 | + |> Jpipe.custom (optionalField "geographic" (Jdec.null ()) ()) | |
| 933 | + |> Jpipe.custom (optionalField "Ictonyx" (Jdec.null ()) ()) | |
| 934 | + |> Jpipe.custom (optionalField "metrocele" (Jdec.null ()) ()) | |
| 935 | + |> Jpipe.custom (optionalField "misgraft" (Jdec.null ()) ()) | |
| 936 | + |> Jpipe.custom (optionalField "monteith" (Jdec.null ()) ()) | |
| 937 | + |> Jpipe.custom (optionalField "notcher" (Jdec.null ()) ()) | |
| 938 | + |> Jpipe.custom (optionalField "prorestriction" (Jdec.null ()) ()) | |
| 939 | + |> Jpipe.custom (optionalField "Ramist" (Jdec.null ()) ()) | |
| 940 | + |> Jpipe.custom (optionalField "throatlet" (Jdec.null ()) ()) | |
| 941 | + |> Jpipe.custom (optionalField "unfair" (Jdec.null ()) ()) | |
| 942 | + |> Jpipe.custom (optionalField "unsynonymous" (Jdec.null ()) ()) | |
| 943 | + |> Jpipe.custom (optionalField "water" (Jdec.null ()) ()) | |
| 944 | + |> Jpipe.custom (optionalField "zestfully" (Jdec.null ()) ()) | |
| 945 | + |> Jpipe.custom (optionalField "zincic" (Jdec.null ()) ()) | |
| 940 | 946 | |
| 941 | 947 | encodeAnsarieClass : AnsarieClass -> Jenc.Value |
| 942 | 948 | encodeAnsarieClass x = |
| @@ -1124,26 +1130,26 @@ encodeChytridiaceaeElement x = case x of | ||
| 1124 | 1130 | chytridiaceaeClass : Jdec.Decoder ChytridiaceaeClass |
| 1125 | 1131 | chytridiaceaeClass = |
| 1126 | 1132 | Jdec.succeed ChytridiaceaeClass |
| 1127 | - |> Jpipe.optional "Batidaceae" (Jdec.null ()) () | |
| 1128 | - |> Jpipe.optional "Brechites" (Jdec.null ()) () | |
| 1129 | - |> Jpipe.optional "codespairer" (Jdec.null ()) () | |
| 1130 | - |> Jpipe.optional "Emery" (Jdec.null ()) () | |
| 1131 | - |> Jpipe.optional "enervative" (Jdec.null ()) () | |
| 1132 | - |> Jpipe.optional "excriminate" (Jdec.null ()) () | |
| 1133 | - |> Jpipe.optional "goshenite" (Jdec.null ()) () | |
| 1134 | - |> Jpipe.optional "grime" (Jdec.null ()) () | |
| 1135 | - |> Jpipe.optional "gritten" (Jdec.null ()) () | |
| 1136 | - |> Jpipe.optional "hectorly" (Jdec.null ()) () | |
| 1137 | - |> Jpipe.optional "intermediation" (Jdec.null ()) () | |
| 1138 | - |> Jpipe.optional "meeterly" (Jdec.null ()) () | |
| 1139 | - |> Jpipe.optional "Narraganset" (Jdec.null ()) () | |
| 1140 | - |> Jpipe.optional "onymatic" (Jdec.null ()) () | |
| 1141 | - |> Jpipe.optional "paddlecock" (Jdec.null ()) () | |
| 1142 | - |> Jpipe.optional "thana" (Jdec.null ()) () | |
| 1143 | - |> Jpipe.optional "thornily" (Jdec.null ()) () | |
| 1144 | - |> Jpipe.optional "uckia" (Jdec.null ()) () | |
| 1145 | - |> Jpipe.optional "unmettle" (Jdec.null ()) () | |
| 1146 | - |> Jpipe.optional "vorticellid" (Jdec.null ()) () | |
| 1133 | + |> Jpipe.custom (optionalField "Batidaceae" (Jdec.null ()) ()) | |
| 1134 | + |> Jpipe.custom (optionalField "Brechites" (Jdec.null ()) ()) | |
| 1135 | + |> Jpipe.custom (optionalField "codespairer" (Jdec.null ()) ()) | |
| 1136 | + |> Jpipe.custom (optionalField "Emery" (Jdec.null ()) ()) | |
| 1137 | + |> Jpipe.custom (optionalField "enervative" (Jdec.null ()) ()) | |
| 1138 | + |> Jpipe.custom (optionalField "excriminate" (Jdec.null ()) ()) | |
| 1139 | + |> Jpipe.custom (optionalField "goshenite" (Jdec.null ()) ()) | |
| 1140 | + |> Jpipe.custom (optionalField "grime" (Jdec.null ()) ()) | |
| 1141 | + |> Jpipe.custom (optionalField "gritten" (Jdec.null ()) ()) | |
| 1142 | + |> Jpipe.custom (optionalField "hectorly" (Jdec.null ()) ()) | |
| 1143 | + |> Jpipe.custom (optionalField "intermediation" (Jdec.null ()) ()) | |
| 1144 | + |> Jpipe.custom (optionalField "meeterly" (Jdec.null ()) ()) | |
| 1145 | + |> Jpipe.custom (optionalField "Narraganset" (Jdec.null ()) ()) | |
| 1146 | + |> Jpipe.custom (optionalField "onymatic" (Jdec.null ()) ()) | |
| 1147 | + |> Jpipe.custom (optionalField "paddlecock" (Jdec.null ()) ()) | |
| 1148 | + |> Jpipe.custom (optionalField "thana" (Jdec.null ()) ()) | |
| 1149 | + |> Jpipe.custom (optionalField "thornily" (Jdec.null ()) ()) | |
| 1150 | + |> Jpipe.custom (optionalField "uckia" (Jdec.null ()) ()) | |
| 1151 | + |> Jpipe.custom (optionalField "unmettle" (Jdec.null ()) ()) | |
| 1152 | + |> Jpipe.custom (optionalField "vorticellid" (Jdec.null ()) ()) | |
| 1147 | 1153 | |
| 1148 | 1154 | encodeChytridiaceaeClass : ChytridiaceaeClass -> Jenc.Value |
| 1149 | 1155 | encodeChytridiaceaeClass x = |
| @@ -1185,31 +1191,31 @@ encodeDiscordiaElement x = case x of | ||
| 1185 | 1191 | discordiaClass : Jdec.Decoder DiscordiaClass |
| 1186 | 1192 | discordiaClass = |
| 1187 | 1193 | Jdec.succeed DiscordiaClass |
| 1188 | - |> Jpipe.optional "Altaic" (Jdec.nullable Jdec.int) Nothing | |
| 1189 | - |> Jpipe.optional "amoristic" (Jdec.nullable Jdec.int) Nothing | |
| 1190 | - |> Jpipe.optional "blennophthalmia" (Jdec.nullable Jdec.int) Nothing | |
| 1191 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1192 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1193 | - |> Jpipe.optional "disciplinability" (Jdec.nullable Jdec.int) Nothing | |
| 1194 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1195 | - |> Jpipe.optional "goofer" (Jdec.nullable Jdec.int) Nothing | |
| 1196 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1197 | - |> Jpipe.optional "laryngograph" (Jdec.nullable Jdec.int) Nothing | |
| 1198 | - |> Jpipe.optional "leucitis" (Jdec.nullable Jdec.int) Nothing | |
| 1199 | - |> Jpipe.optional "lymphocyst" (Jdec.nullable Jdec.int) Nothing | |
| 1200 | - |> Jpipe.optional "microcosmology" (Jdec.nullable Jdec.int) Nothing | |
| 1201 | - |> Jpipe.optional "nauseation" (Jdec.nullable Jdec.int) Nothing | |
| 1202 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1203 | - |> Jpipe.optional "Patarin" (Jdec.nullable Jdec.int) Nothing | |
| 1204 | - |> Jpipe.optional "preliberal" (Jdec.nullable Jdec.int) Nothing | |
| 1205 | - |> Jpipe.optional "prettifier" (Jdec.nullable Jdec.int) Nothing | |
| 1206 | - |> Jpipe.optional "rangework" (Jdec.nullable Jdec.int) Nothing | |
| 1207 | - |> Jpipe.optional "redient" (Jdec.nullable Jdec.int) Nothing | |
| 1208 | - |> Jpipe.optional "subfusiform" (Jdec.nullable Jdec.int) Nothing | |
| 1209 | - |> Jpipe.optional "suicidical" (Jdec.nullable Jdec.int) Nothing | |
| 1210 | - |> Jpipe.optional "swow" (Jdec.nullable Jdec.int) Nothing | |
| 1211 | - |> Jpipe.optional "wastrel" (Jdec.nullable Jdec.int) Nothing | |
| 1212 | - |> Jpipe.optional "wingle" (Jdec.nullable Jdec.int) Nothing | |
| 1194 | + |> Jpipe.custom (optionalField "Altaic" (Jdec.nullable Jdec.int) Nothing) | |
| 1195 | + |> Jpipe.custom (optionalField "amoristic" (Jdec.nullable Jdec.int) Nothing) | |
| 1196 | + |> Jpipe.custom (optionalField "blennophthalmia" (Jdec.nullable Jdec.int) Nothing) | |
| 1197 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1198 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1199 | + |> Jpipe.custom (optionalField "disciplinability" (Jdec.nullable Jdec.int) Nothing) | |
| 1200 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1201 | + |> Jpipe.custom (optionalField "goofer" (Jdec.nullable Jdec.int) Nothing) | |
| 1202 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1203 | + |> Jpipe.custom (optionalField "laryngograph" (Jdec.nullable Jdec.int) Nothing) | |
| 1204 | + |> Jpipe.custom (optionalField "leucitis" (Jdec.nullable Jdec.int) Nothing) | |
| 1205 | + |> Jpipe.custom (optionalField "lymphocyst" (Jdec.nullable Jdec.int) Nothing) | |
| 1206 | + |> Jpipe.custom (optionalField "microcosmology" (Jdec.nullable Jdec.int) Nothing) | |
| 1207 | + |> Jpipe.custom (optionalField "nauseation" (Jdec.nullable Jdec.int) Nothing) | |
| 1208 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1209 | + |> Jpipe.custom (optionalField "Patarin" (Jdec.nullable Jdec.int) Nothing) | |
| 1210 | + |> Jpipe.custom (optionalField "preliberal" (Jdec.nullable Jdec.int) Nothing) | |
| 1211 | + |> Jpipe.custom (optionalField "prettifier" (Jdec.nullable Jdec.int) Nothing) | |
| 1212 | + |> Jpipe.custom (optionalField "rangework" (Jdec.nullable Jdec.int) Nothing) | |
| 1213 | + |> Jpipe.custom (optionalField "redient" (Jdec.nullable Jdec.int) Nothing) | |
| 1214 | + |> Jpipe.custom (optionalField "subfusiform" (Jdec.nullable Jdec.int) Nothing) | |
| 1215 | + |> Jpipe.custom (optionalField "suicidical" (Jdec.nullable Jdec.int) Nothing) | |
| 1216 | + |> Jpipe.custom (optionalField "swow" (Jdec.nullable Jdec.int) Nothing) | |
| 1217 | + |> Jpipe.custom (optionalField "wastrel" (Jdec.nullable Jdec.int) Nothing) | |
| 1218 | + |> Jpipe.custom (optionalField "wingle" (Jdec.nullable Jdec.int) Nothing) | |
| 1213 | 1219 | |
| 1214 | 1220 | encodeDiscordiaClass : DiscordiaClass -> Jenc.Value |
| 1215 | 1221 | encodeDiscordiaClass x = |
| @@ -1296,26 +1302,26 @@ encodeGryphosaurusElement x = case x of | ||
| 1296 | 1302 | gryphosaurusClass : Jdec.Decoder GryphosaurusClass |
| 1297 | 1303 | gryphosaurusClass = |
| 1298 | 1304 | Jdec.succeed GryphosaurusClass |
| 1299 | - |> Jpipe.optional "amissibility" (Jdec.null ()) () | |
| 1300 | - |> Jpipe.optional "Burushaski" (Jdec.null ()) () | |
| 1301 | - |> Jpipe.optional "citronin" (Jdec.null ()) () | |
| 1302 | - |> Jpipe.optional "coplaintiff" (Jdec.null ()) () | |
| 1303 | - |> Jpipe.optional "disquisitionary" (Jdec.null ()) () | |
| 1304 | - |> Jpipe.optional "enoplan" (Jdec.null ()) () | |
| 1305 | - |> Jpipe.optional "faintness" (Jdec.null ()) () | |
| 1306 | - |> Jpipe.optional "hebetomy" (Jdec.null ()) () | |
| 1307 | - |> Jpipe.optional "islandry" (Jdec.null ()) () | |
| 1308 | - |> Jpipe.optional "lameduck" (Jdec.null ()) () | |
| 1309 | - |> Jpipe.optional "overbattle" (Jdec.null ()) () | |
| 1310 | - |> Jpipe.optional "overinterested" (Jdec.null ()) () | |
| 1311 | - |> Jpipe.optional "phrenologic" (Jdec.null ()) () | |
| 1312 | - |> Jpipe.optional "rainband" (Jdec.null ()) () | |
| 1313 | - |> Jpipe.optional "shiningly" (Jdec.null ()) () | |
| 1314 | - |> Jpipe.optional "stamineous" (Jdec.null ()) () | |
| 1315 | - |> Jpipe.optional "subscapularis" (Jdec.null ()) () | |
| 1316 | - |> Jpipe.optional "Tahami" (Jdec.null ()) () | |
| 1317 | - |> Jpipe.optional "undaubed" (Jdec.null ()) () | |
| 1318 | - |> Jpipe.optional "underntime" (Jdec.null ()) () | |
| 1305 | + |> Jpipe.custom (optionalField "amissibility" (Jdec.null ()) ()) | |
| 1306 | + |> Jpipe.custom (optionalField "Burushaski" (Jdec.null ()) ()) | |
| 1307 | + |> Jpipe.custom (optionalField "citronin" (Jdec.null ()) ()) | |
| 1308 | + |> Jpipe.custom (optionalField "coplaintiff" (Jdec.null ()) ()) | |
| 1309 | + |> Jpipe.custom (optionalField "disquisitionary" (Jdec.null ()) ()) | |
| 1310 | + |> Jpipe.custom (optionalField "enoplan" (Jdec.null ()) ()) | |
| 1311 | + |> Jpipe.custom (optionalField "faintness" (Jdec.null ()) ()) | |
| 1312 | + |> Jpipe.custom (optionalField "hebetomy" (Jdec.null ()) ()) | |
| 1313 | + |> Jpipe.custom (optionalField "islandry" (Jdec.null ()) ()) | |
| 1314 | + |> Jpipe.custom (optionalField "lameduck" (Jdec.null ()) ()) | |
| 1315 | + |> Jpipe.custom (optionalField "overbattle" (Jdec.null ()) ()) | |
| 1316 | + |> Jpipe.custom (optionalField "overinterested" (Jdec.null ()) ()) | |
| 1317 | + |> Jpipe.custom (optionalField "phrenologic" (Jdec.null ()) ()) | |
| 1318 | + |> Jpipe.custom (optionalField "rainband" (Jdec.null ()) ()) | |
| 1319 | + |> Jpipe.custom (optionalField "shiningly" (Jdec.null ()) ()) | |
| 1320 | + |> Jpipe.custom (optionalField "stamineous" (Jdec.null ()) ()) | |
| 1321 | + |> Jpipe.custom (optionalField "subscapularis" (Jdec.null ()) ()) | |
| 1322 | + |> Jpipe.custom (optionalField "Tahami" (Jdec.null ()) ()) | |
| 1323 | + |> Jpipe.custom (optionalField "undaubed" (Jdec.null ()) ()) | |
| 1324 | + |> Jpipe.custom (optionalField "underntime" (Jdec.null ()) ()) | |
| 1319 | 1325 | |
| 1320 | 1326 | encodeGryphosaurusClass : GryphosaurusClass -> Jenc.Value |
| 1321 | 1327 | encodeGryphosaurusClass x = |
| @@ -1369,31 +1375,31 @@ encodeLaviniaElement x = case x of | ||
| 1369 | 1375 | laviniaClass : Jdec.Decoder LaviniaClass |
| 1370 | 1376 | laviniaClass = |
| 1371 | 1377 | Jdec.succeed LaviniaClass |
| 1372 | - |> Jpipe.optional "agitable" (Jdec.nullable Jdec.int) Nothing | |
| 1373 | - |> Jpipe.optional "asininity" (Jdec.nullable Jdec.int) Nothing | |
| 1374 | - |> Jpipe.optional "benefiter" (Jdec.nullable Jdec.int) Nothing | |
| 1375 | - |> Jpipe.optional "bronzelike" (Jdec.nullable Jdec.int) Nothing | |
| 1376 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1377 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1378 | - |> Jpipe.optional "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing | |
| 1379 | - |> Jpipe.optional "deprivement" (Jdec.nullable Jdec.int) Nothing | |
| 1380 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1381 | - |> Jpipe.optional "flippantness" (Jdec.nullable Jdec.int) Nothing | |
| 1382 | - |> Jpipe.optional "fogproof" (Jdec.nullable Jdec.int) Nothing | |
| 1383 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1384 | - |> Jpipe.optional "merrymeeting" (Jdec.nullable Jdec.int) Nothing | |
| 1385 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1386 | - |> Jpipe.optional "overcareful" (Jdec.nullable Jdec.int) Nothing | |
| 1387 | - |> Jpipe.optional "panaris" (Jdec.nullable Jdec.int) Nothing | |
| 1388 | - |> Jpipe.optional "preacceptance" (Jdec.nullable Jdec.int) Nothing | |
| 1389 | - |> Jpipe.optional "quinoxaline" (Jdec.nullable Jdec.int) Nothing | |
| 1390 | - |> Jpipe.optional "sig" (Jdec.nullable Jdec.int) Nothing | |
| 1391 | - |> Jpipe.optional "superconfusion" (Jdec.nullable Jdec.int) Nothing | |
| 1392 | - |> Jpipe.optional "Tacana" (Jdec.nullable Jdec.int) Nothing | |
| 1393 | - |> Jpipe.optional "tillotter" (Jdec.nullable Jdec.int) Nothing | |
| 1394 | - |> Jpipe.optional "tranquillize" (Jdec.nullable Jdec.int) Nothing | |
| 1395 | - |> Jpipe.optional "unquestionable" (Jdec.nullable Jdec.int) Nothing | |
| 1396 | - |> Jpipe.optional "uproute" (Jdec.nullable Jdec.int) Nothing | |
| 1378 | + |> Jpipe.custom (optionalField "agitable" (Jdec.nullable Jdec.int) Nothing) | |
| 1379 | + |> Jpipe.custom (optionalField "asininity" (Jdec.nullable Jdec.int) Nothing) | |
| 1380 | + |> Jpipe.custom (optionalField "benefiter" (Jdec.nullable Jdec.int) Nothing) | |
| 1381 | + |> Jpipe.custom (optionalField "bronzelike" (Jdec.nullable Jdec.int) Nothing) | |
| 1382 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1383 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1384 | + |> Jpipe.custom (optionalField "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing) | |
| 1385 | + |> Jpipe.custom (optionalField "deprivement" (Jdec.nullable Jdec.int) Nothing) | |
| 1386 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1387 | + |> Jpipe.custom (optionalField "flippantness" (Jdec.nullable Jdec.int) Nothing) | |
| 1388 | + |> Jpipe.custom (optionalField "fogproof" (Jdec.nullable Jdec.int) Nothing) | |
| 1389 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1390 | + |> Jpipe.custom (optionalField "merrymeeting" (Jdec.nullable Jdec.int) Nothing) | |
| 1391 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1392 | + |> Jpipe.custom (optionalField "overcareful" (Jdec.nullable Jdec.int) Nothing) | |
| 1393 | + |> Jpipe.custom (optionalField "panaris" (Jdec.nullable Jdec.int) Nothing) | |
| 1394 | + |> Jpipe.custom (optionalField "preacceptance" (Jdec.nullable Jdec.int) Nothing) | |
| 1395 | + |> Jpipe.custom (optionalField "quinoxaline" (Jdec.nullable Jdec.int) Nothing) | |
| 1396 | + |> Jpipe.custom (optionalField "sig" (Jdec.nullable Jdec.int) Nothing) | |
| 1397 | + |> Jpipe.custom (optionalField "superconfusion" (Jdec.nullable Jdec.int) Nothing) | |
| 1398 | + |> Jpipe.custom (optionalField "Tacana" (Jdec.nullable Jdec.int) Nothing) | |
| 1399 | + |> Jpipe.custom (optionalField "tillotter" (Jdec.nullable Jdec.int) Nothing) | |
| 1400 | + |> Jpipe.custom (optionalField "tranquillize" (Jdec.nullable Jdec.int) Nothing) | |
| 1401 | + |> Jpipe.custom (optionalField "unquestionable" (Jdec.nullable Jdec.int) Nothing) | |
| 1402 | + |> Jpipe.custom (optionalField "uproute" (Jdec.nullable Jdec.int) Nothing) | |
| 1397 | 1403 | |
| 1398 | 1404 | encodeLaviniaClass : LaviniaClass -> Jenc.Value |
| 1399 | 1405 | encodeLaviniaClass x = |
| @@ -1440,26 +1446,26 @@ encodeOskarElement x = case x of | ||
| 1440 | 1446 | oskarClass : Jdec.Decoder OskarClass |
| 1441 | 1447 | oskarClass = |
| 1442 | 1448 | Jdec.succeed OskarClass |
| 1443 | - |> Jpipe.optional "Acrobates" (Jdec.null ()) () | |
| 1444 | - |> Jpipe.optional "beanshooter" (Jdec.null ()) () | |
| 1445 | - |> Jpipe.optional "bearhound" (Jdec.null ()) () | |
| 1446 | - |> Jpipe.optional "Cayuga" (Jdec.null ()) () | |
| 1447 | - |> Jpipe.optional "guarneri" (Jdec.null ()) () | |
| 1448 | - |> Jpipe.optional "hypochondriacism" (Jdec.null ()) () | |
| 1449 | - |> Jpipe.optional "indication" (Jdec.null ()) () | |
| 1450 | - |> Jpipe.optional "jaculative" (Jdec.null ()) () | |
| 1451 | - |> Jpipe.optional "nagana" (Jdec.null ()) () | |
| 1452 | - |> Jpipe.optional "Netherlandish" (Jdec.null ()) () | |
| 1453 | - |> Jpipe.optional "noctivagous" (Jdec.null ()) () | |
| 1454 | - |> Jpipe.optional "nonphysiological" (Jdec.null ()) () | |
| 1455 | - |> Jpipe.optional "praxis" (Jdec.null ()) () | |
| 1456 | - |> Jpipe.optional "provision" (Jdec.null ()) () | |
| 1457 | - |> Jpipe.optional "subterhuman" (Jdec.null ()) () | |
| 1458 | - |> Jpipe.optional "sunlit" (Jdec.null ()) () | |
| 1459 | - |> Jpipe.optional "syncraniate" (Jdec.null ()) () | |
| 1460 | - |> Jpipe.optional "teachment" (Jdec.null ()) () | |
| 1461 | - |> Jpipe.optional "unmutinous" (Jdec.null ()) () | |
| 1462 | - |> Jpipe.optional "unstoppable" (Jdec.null ()) () | |
| 1449 | + |> Jpipe.custom (optionalField "Acrobates" (Jdec.null ()) ()) | |
| 1450 | + |> Jpipe.custom (optionalField "beanshooter" (Jdec.null ()) ()) | |
| 1451 | + |> Jpipe.custom (optionalField "bearhound" (Jdec.null ()) ()) | |
| 1452 | + |> Jpipe.custom (optionalField "Cayuga" (Jdec.null ()) ()) | |
| 1453 | + |> Jpipe.custom (optionalField "guarneri" (Jdec.null ()) ()) | |
| 1454 | + |> Jpipe.custom (optionalField "hypochondriacism" (Jdec.null ()) ()) | |
| 1455 | + |> Jpipe.custom (optionalField "indication" (Jdec.null ()) ()) | |
| 1456 | + |> Jpipe.custom (optionalField "jaculative" (Jdec.null ()) ()) | |
| 1457 | + |> Jpipe.custom (optionalField "nagana" (Jdec.null ()) ()) | |
| 1458 | + |> Jpipe.custom (optionalField "Netherlandish" (Jdec.null ()) ()) | |
| 1459 | + |> Jpipe.custom (optionalField "noctivagous" (Jdec.null ()) ()) | |
| 1460 | + |> Jpipe.custom (optionalField "nonphysiological" (Jdec.null ()) ()) | |
| 1461 | + |> Jpipe.custom (optionalField "praxis" (Jdec.null ()) ()) | |
| 1462 | + |> Jpipe.custom (optionalField "provision" (Jdec.null ()) ()) | |
| 1463 | + |> Jpipe.custom (optionalField "subterhuman" (Jdec.null ()) ()) | |
| 1464 | + |> Jpipe.custom (optionalField "sunlit" (Jdec.null ()) ()) | |
| 1465 | + |> Jpipe.custom (optionalField "syncraniate" (Jdec.null ()) ()) | |
| 1466 | + |> Jpipe.custom (optionalField "teachment" (Jdec.null ()) ()) | |
| 1467 | + |> Jpipe.custom (optionalField "unmutinous" (Jdec.null ()) ()) | |
| 1468 | + |> Jpipe.custom (optionalField "unstoppable" (Jdec.null ()) ()) | |
| 1463 | 1469 | |
| 1464 | 1470 | encodeOskarClass : OskarClass -> Jenc.Value |
| 1465 | 1471 | encodeOskarClass x = |
Test case
2 generated files · +586 −574test/inputs/json/priority/combinations3.json
Melmarray-type-array--eed288b23e27 / QuickType.elm+293 −287
| @@ -615,6 +615,12 @@ type Protext | ||
| 615 | 615 | | MonaziteClassInProtext MonaziteClass |
| 616 | 616 | |
| 617 | 617 | -- decoders and encoders |
| 618 | +optionalField key decoder fallback = | |
| 619 | + Jdec.dict Jdec.value | |
| 620 | + |> Jdec.andThen (\m -> | |
| 621 | + case Dict.get key m of | |
| 622 | + Nothing -> Jdec.succeed fallback | |
| 623 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 618 | 624 | |
| 619 | 625 | quickTypeToString : QuickType -> String |
| 620 | 626 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -727,26 +733,26 @@ encodeJurorElement x = case x of | ||
| 727 | 733 | jurorClass : Jdec.Decoder JurorClass |
| 728 | 734 | jurorClass = |
| 729 | 735 | Jdec.succeed JurorClass |
| 730 | - |> Jpipe.optional "adipsy" (Jdec.null ()) () | |
| 731 | - |> Jpipe.optional "auxiliator" (Jdec.null ()) () | |
| 732 | - |> Jpipe.optional "benda" (Jdec.null ()) () | |
| 733 | - |> Jpipe.optional "benjamin" (Jdec.null ()) () | |
| 734 | - |> Jpipe.optional "brandling" (Jdec.null ()) () | |
| 735 | - |> Jpipe.optional "epicurishly" (Jdec.null ()) () | |
| 736 | - |> Jpipe.optional "eremochaetous" (Jdec.null ()) () | |
| 737 | - |> Jpipe.optional "marten" (Jdec.null ()) () | |
| 738 | - |> Jpipe.optional "monocline" (Jdec.null ()) () | |
| 739 | - |> Jpipe.optional "Olea" (Jdec.null ()) () | |
| 740 | - |> Jpipe.optional "palgat" (Jdec.null ()) () | |
| 741 | - |> Jpipe.optional "pennyworth" (Jdec.null ()) () | |
| 742 | - |> Jpipe.optional "pioury" (Jdec.null ()) () | |
| 743 | - |> Jpipe.optional "pragmatistic" (Jdec.null ()) () | |
| 744 | - |> Jpipe.optional "stylelessness" (Jdec.null ()) () | |
| 745 | - |> Jpipe.optional "systematical" (Jdec.null ()) () | |
| 746 | - |> Jpipe.optional "thready" (Jdec.null ()) () | |
| 747 | - |> Jpipe.optional "uncontemporary" (Jdec.null ()) () | |
| 748 | - |> Jpipe.optional "uncouched" (Jdec.null ()) () | |
| 749 | - |> Jpipe.optional "uninhabitedness" (Jdec.null ()) () | |
| 736 | + |> Jpipe.custom (optionalField "adipsy" (Jdec.null ()) ()) | |
| 737 | + |> Jpipe.custom (optionalField "auxiliator" (Jdec.null ()) ()) | |
| 738 | + |> Jpipe.custom (optionalField "benda" (Jdec.null ()) ()) | |
| 739 | + |> Jpipe.custom (optionalField "benjamin" (Jdec.null ()) ()) | |
| 740 | + |> Jpipe.custom (optionalField "brandling" (Jdec.null ()) ()) | |
| 741 | + |> Jpipe.custom (optionalField "epicurishly" (Jdec.null ()) ()) | |
| 742 | + |> Jpipe.custom (optionalField "eremochaetous" (Jdec.null ()) ()) | |
| 743 | + |> Jpipe.custom (optionalField "marten" (Jdec.null ()) ()) | |
| 744 | + |> Jpipe.custom (optionalField "monocline" (Jdec.null ()) ()) | |
| 745 | + |> Jpipe.custom (optionalField "Olea" (Jdec.null ()) ()) | |
| 746 | + |> Jpipe.custom (optionalField "palgat" (Jdec.null ()) ()) | |
| 747 | + |> Jpipe.custom (optionalField "pennyworth" (Jdec.null ()) ()) | |
| 748 | + |> Jpipe.custom (optionalField "pioury" (Jdec.null ()) ()) | |
| 749 | + |> Jpipe.custom (optionalField "pragmatistic" (Jdec.null ()) ()) | |
| 750 | + |> Jpipe.custom (optionalField "stylelessness" (Jdec.null ()) ()) | |
| 751 | + |> Jpipe.custom (optionalField "systematical" (Jdec.null ()) ()) | |
| 752 | + |> Jpipe.custom (optionalField "thready" (Jdec.null ()) ()) | |
| 753 | + |> Jpipe.custom (optionalField "uncontemporary" (Jdec.null ()) ()) | |
| 754 | + |> Jpipe.custom (optionalField "uncouched" (Jdec.null ()) ()) | |
| 755 | + |> Jpipe.custom (optionalField "uninhabitedness" (Jdec.null ()) ()) | |
| 750 | 756 | |
| 751 | 757 | encodeJurorClass : JurorClass -> Jenc.Value |
| 752 | 758 | encodeJurorClass x = |
| @@ -802,26 +808,26 @@ encodeLadronismElement x = case x of | ||
| 802 | 808 | ladronismClass : Jdec.Decoder LadronismClass |
| 803 | 809 | ladronismClass = |
| 804 | 810 | Jdec.succeed LadronismClass |
| 805 | - |> Jpipe.optional "acclaimer" (Jdec.null ()) () | |
| 806 | - |> Jpipe.optional "achree" (Jdec.null ()) () | |
| 807 | - |> Jpipe.optional "base" (Jdec.null ()) () | |
| 808 | - |> Jpipe.optional "conundrumize" (Jdec.null ()) () | |
| 809 | - |> Jpipe.optional "degerminator" (Jdec.null ()) () | |
| 810 | - |> Jpipe.optional "describable" (Jdec.null ()) () | |
| 811 | - |> Jpipe.optional "exasperatedly" (Jdec.null ()) () | |
| 812 | - |> Jpipe.optional "heroine" (Jdec.null ()) () | |
| 813 | - |> Jpipe.optional "indazin" (Jdec.null ()) () | |
| 814 | - |> Jpipe.optional "luteous" (Jdec.null ()) () | |
| 815 | - |> Jpipe.optional "papular" (Jdec.null ()) () | |
| 816 | - |> Jpipe.optional "pritch" (Jdec.null ()) () | |
| 817 | - |> Jpipe.optional "Prodenia" (Jdec.null ()) () | |
| 818 | - |> Jpipe.optional "seege" (Jdec.null ()) () | |
| 819 | - |> Jpipe.optional "shopgirl" (Jdec.null ()) () | |
| 820 | - |> Jpipe.optional "tragedietta" (Jdec.null ()) () | |
| 821 | - |> Jpipe.optional "unsparse" (Jdec.null ()) () | |
| 822 | - |> Jpipe.optional "uplook" (Jdec.null ()) () | |
| 823 | - |> Jpipe.optional "vermiformis" (Jdec.null ()) () | |
| 824 | - |> Jpipe.optional "whafabout" (Jdec.null ()) () | |
| 811 | + |> Jpipe.custom (optionalField "acclaimer" (Jdec.null ()) ()) | |
| 812 | + |> Jpipe.custom (optionalField "achree" (Jdec.null ()) ()) | |
| 813 | + |> Jpipe.custom (optionalField "base" (Jdec.null ()) ()) | |
| 814 | + |> Jpipe.custom (optionalField "conundrumize" (Jdec.null ()) ()) | |
| 815 | + |> Jpipe.custom (optionalField "degerminator" (Jdec.null ()) ()) | |
| 816 | + |> Jpipe.custom (optionalField "describable" (Jdec.null ()) ()) | |
| 817 | + |> Jpipe.custom (optionalField "exasperatedly" (Jdec.null ()) ()) | |
| 818 | + |> Jpipe.custom (optionalField "heroine" (Jdec.null ()) ()) | |
| 819 | + |> Jpipe.custom (optionalField "indazin" (Jdec.null ()) ()) | |
| 820 | + |> Jpipe.custom (optionalField "luteous" (Jdec.null ()) ()) | |
| 821 | + |> Jpipe.custom (optionalField "papular" (Jdec.null ()) ()) | |
| 822 | + |> Jpipe.custom (optionalField "pritch" (Jdec.null ()) ()) | |
| 823 | + |> Jpipe.custom (optionalField "Prodenia" (Jdec.null ()) ()) | |
| 824 | + |> Jpipe.custom (optionalField "seege" (Jdec.null ()) ()) | |
| 825 | + |> Jpipe.custom (optionalField "shopgirl" (Jdec.null ()) ()) | |
| 826 | + |> Jpipe.custom (optionalField "tragedietta" (Jdec.null ()) ()) | |
| 827 | + |> Jpipe.custom (optionalField "unsparse" (Jdec.null ()) ()) | |
| 828 | + |> Jpipe.custom (optionalField "uplook" (Jdec.null ()) ()) | |
| 829 | + |> Jpipe.custom (optionalField "vermiformis" (Jdec.null ()) ()) | |
| 830 | + |> Jpipe.custom (optionalField "whafabout" (Jdec.null ()) ()) | |
| 825 | 831 | |
| 826 | 832 | encodeLadronismClass : LadronismClass -> Jenc.Value |
| 827 | 833 | encodeLadronismClass x = |
| @@ -865,26 +871,26 @@ encodeLandlubberlyElement x = case x of | ||
| 865 | 871 | landlubberlyClass : Jdec.Decoder LandlubberlyClass |
| 866 | 872 | landlubberlyClass = |
| 867 | 873 | Jdec.succeed LandlubberlyClass |
| 868 | - |> Jpipe.optional "acropoleis" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "aminate" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "Amyraldism" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "bipenniform" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "bugre" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "calycule" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "caoutchouc" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "disprover" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "fitroot" (Jdec.null ()) () | |
| 877 | - |> Jpipe.optional "fulgently" (Jdec.null ()) () | |
| 878 | - |> Jpipe.optional "kickup" (Jdec.null ()) () | |
| 879 | - |> Jpipe.optional "laevoversion" (Jdec.null ()) () | |
| 880 | - |> Jpipe.optional "moter" (Jdec.null ()) () | |
| 881 | - |> Jpipe.optional "objectivity" (Jdec.null ()) () | |
| 882 | - |> Jpipe.optional "posterity" (Jdec.null ()) () | |
| 883 | - |> Jpipe.optional "postnuptial" (Jdec.null ()) () | |
| 884 | - |> Jpipe.optional "precedentary" (Jdec.null ()) () | |
| 885 | - |> Jpipe.optional "saddling" (Jdec.null ()) () | |
| 886 | - |> Jpipe.optional "subcurrent" (Jdec.null ()) () | |
| 887 | - |> Jpipe.optional "unrecriminative" (Jdec.null ()) () | |
| 874 | + |> Jpipe.custom (optionalField "acropoleis" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "aminate" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "Amyraldism" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "bipenniform" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "bugre" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "calycule" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "caoutchouc" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "disprover" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "fitroot" (Jdec.null ()) ()) | |
| 883 | + |> Jpipe.custom (optionalField "fulgently" (Jdec.null ()) ()) | |
| 884 | + |> Jpipe.custom (optionalField "kickup" (Jdec.null ()) ()) | |
| 885 | + |> Jpipe.custom (optionalField "laevoversion" (Jdec.null ()) ()) | |
| 886 | + |> Jpipe.custom (optionalField "moter" (Jdec.null ()) ()) | |
| 887 | + |> Jpipe.custom (optionalField "objectivity" (Jdec.null ()) ()) | |
| 888 | + |> Jpipe.custom (optionalField "posterity" (Jdec.null ()) ()) | |
| 889 | + |> Jpipe.custom (optionalField "postnuptial" (Jdec.null ()) ()) | |
| 890 | + |> Jpipe.custom (optionalField "precedentary" (Jdec.null ()) ()) | |
| 891 | + |> Jpipe.custom (optionalField "saddling" (Jdec.null ()) ()) | |
| 892 | + |> Jpipe.custom (optionalField "subcurrent" (Jdec.null ()) ()) | |
| 893 | + |> Jpipe.custom (optionalField "unrecriminative" (Jdec.null ()) ()) | |
| 888 | 894 | |
| 889 | 895 | encodeLandlubberlyClass : LandlubberlyClass -> Jenc.Value |
| 890 | 896 | encodeLandlubberlyClass x = |
| @@ -938,31 +944,31 @@ encodeLupusElement x = case x of | ||
| 938 | 944 | lupusClass : Jdec.Decoder LupusClass |
| 939 | 945 | lupusClass = |
| 940 | 946 | Jdec.succeed LupusClass |
| 941 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 942 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 943 | - |> Jpipe.optional "Chlorioninae" (Jdec.nullable Jdec.int) Nothing | |
| 944 | - |> Jpipe.optional "Corvinae" (Jdec.nullable Jdec.int) Nothing | |
| 945 | - |> Jpipe.optional "Crassina" (Jdec.nullable Jdec.int) Nothing | |
| 946 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 947 | - |> Jpipe.optional "exiguity" (Jdec.nullable Jdec.int) Nothing | |
| 948 | - |> Jpipe.optional "farcist" (Jdec.nullable Jdec.int) Nothing | |
| 949 | - |> Jpipe.optional "holographical" (Jdec.nullable Jdec.int) Nothing | |
| 950 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 951 | - |> Jpipe.optional "ichthyophagan" (Jdec.nullable Jdec.int) Nothing | |
| 952 | - |> Jpipe.optional "implacable" (Jdec.nullable Jdec.int) Nothing | |
| 953 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 954 | - |> Jpipe.optional "outshiner" (Jdec.nullable Jdec.int) Nothing | |
| 955 | - |> Jpipe.optional "overweather" (Jdec.nullable Jdec.int) Nothing | |
| 956 | - |> Jpipe.optional "protonegroid" (Jdec.nullable Jdec.int) Nothing | |
| 957 | - |> Jpipe.optional "shallowish" (Jdec.nullable Jdec.int) Nothing | |
| 958 | - |> Jpipe.optional "snoke" (Jdec.nullable Jdec.int) Nothing | |
| 959 | - |> Jpipe.optional "snout" (Jdec.nullable Jdec.int) Nothing | |
| 960 | - |> Jpipe.optional "surveillance" (Jdec.nullable Jdec.int) Nothing | |
| 961 | - |> Jpipe.optional "threshingtime" (Jdec.nullable Jdec.int) Nothing | |
| 962 | - |> Jpipe.optional "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing | |
| 963 | - |> Jpipe.optional "unsignificantly" (Jdec.nullable Jdec.int) Nothing | |
| 964 | - |> Jpipe.optional "unsnap" (Jdec.nullable Jdec.int) Nothing | |
| 965 | - |> Jpipe.optional "vendible" (Jdec.nullable Jdec.int) Nothing | |
| 947 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 948 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 949 | + |> Jpipe.custom (optionalField "Chlorioninae" (Jdec.nullable Jdec.int) Nothing) | |
| 950 | + |> Jpipe.custom (optionalField "Corvinae" (Jdec.nullable Jdec.int) Nothing) | |
| 951 | + |> Jpipe.custom (optionalField "Crassina" (Jdec.nullable Jdec.int) Nothing) | |
| 952 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 953 | + |> Jpipe.custom (optionalField "exiguity" (Jdec.nullable Jdec.int) Nothing) | |
| 954 | + |> Jpipe.custom (optionalField "farcist" (Jdec.nullable Jdec.int) Nothing) | |
| 955 | + |> Jpipe.custom (optionalField "holographical" (Jdec.nullable Jdec.int) Nothing) | |
| 956 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 957 | + |> Jpipe.custom (optionalField "ichthyophagan" (Jdec.nullable Jdec.int) Nothing) | |
| 958 | + |> Jpipe.custom (optionalField "implacable" (Jdec.nullable Jdec.int) Nothing) | |
| 959 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 960 | + |> Jpipe.custom (optionalField "outshiner" (Jdec.nullable Jdec.int) Nothing) | |
| 961 | + |> Jpipe.custom (optionalField "overweather" (Jdec.nullable Jdec.int) Nothing) | |
| 962 | + |> Jpipe.custom (optionalField "protonegroid" (Jdec.nullable Jdec.int) Nothing) | |
| 963 | + |> Jpipe.custom (optionalField "shallowish" (Jdec.nullable Jdec.int) Nothing) | |
| 964 | + |> Jpipe.custom (optionalField "snoke" (Jdec.nullable Jdec.int) Nothing) | |
| 965 | + |> Jpipe.custom (optionalField "snout" (Jdec.nullable Jdec.int) Nothing) | |
| 966 | + |> Jpipe.custom (optionalField "surveillance" (Jdec.nullable Jdec.int) Nothing) | |
| 967 | + |> Jpipe.custom (optionalField "threshingtime" (Jdec.nullable Jdec.int) Nothing) | |
| 968 | + |> Jpipe.custom (optionalField "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing) | |
| 969 | + |> Jpipe.custom (optionalField "unsignificantly" (Jdec.nullable Jdec.int) Nothing) | |
| 970 | + |> Jpipe.custom (optionalField "unsnap" (Jdec.nullable Jdec.int) Nothing) | |
| 971 | + |> Jpipe.custom (optionalField "vendible" (Jdec.nullable Jdec.int) Nothing) | |
| 966 | 972 | |
| 967 | 973 | encodeLupusClass : LupusClass -> Jenc.Value |
| 968 | 974 | encodeLupusClass x = |
| @@ -997,51 +1003,51 @@ encodeLupusClass x = | ||
| 997 | 1003 | maslin : Jdec.Decoder Maslin |
| 998 | 1004 | maslin = |
| 999 | 1005 | Jdec.succeed Maslin |
| 1000 | - |> Jpipe.optional "Alicant" (Jdec.nullable Jdec.int) Nothing | |
| 1001 | - |> Jpipe.optional "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1002 | - |> Jpipe.optional "anticorrosive" (Jdec.nullable Jdec.int) Nothing | |
| 1003 | - |> Jpipe.optional "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1004 | - |> Jpipe.optional "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1005 | - |> Jpipe.optional "be" (Jdec.nullable Jdec.int) Nothing | |
| 1006 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1007 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1008 | - |> Jpipe.optional "chub" (Jdec.nullable Jdec.int) Nothing | |
| 1009 | - |> Jpipe.optional "cuprosilicon" (Jdec.nullable Jdec.int) Nothing | |
| 1010 | - |> Jpipe.optional "curtailedly" (Jdec.nullable Jdec.int) Nothing | |
| 1011 | - |> Jpipe.optional "dellenite" (Jdec.nullable Jdec.int) Nothing | |
| 1012 | - |> Jpipe.optional "Dimitry" (Jdec.nullable Jdec.int) Nothing | |
| 1013 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1014 | - |> Jpipe.optional "edifying" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1015 | - |> Jpipe.optional "ethmoiditis" (Jdec.nullable Jdec.int) Nothing | |
| 1016 | - |> Jpipe.optional "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1017 | - |> Jpipe.optional "goatherd" (Jdec.nullable Jdec.int) Nothing | |
| 1018 | - |> Jpipe.optional "hammerdress" (Jdec.nullable Jdec.int) Nothing | |
| 1019 | - |> Jpipe.optional "hangfire" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1020 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1021 | - |> Jpipe.optional "lacunosity" (Jdec.nullable Jdec.int) Nothing | |
| 1022 | - |> Jpipe.optional "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1023 | - |> Jpipe.optional "mameliere" (Jdec.nullable Jdec.int) Nothing | |
| 1024 | - |> Jpipe.optional "motherless" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1025 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1026 | - |> Jpipe.optional "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1027 | - |> Jpipe.optional "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1028 | - |> Jpipe.optional "oafishly" (Jdec.nullable Jdec.int) Nothing | |
| 1029 | - |> Jpipe.optional "pfund" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1030 | - |> Jpipe.optional "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1031 | - |> Jpipe.optional "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1032 | - |> Jpipe.optional "saccharulmic" (Jdec.nullable Jdec.int) Nothing | |
| 1033 | - |> Jpipe.optional "scowlful" (Jdec.nullable Jdec.int) Nothing | |
| 1034 | - |> Jpipe.optional "secluded" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1035 | - |> Jpipe.optional "slackage" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1036 | - |> Jpipe.optional "sphaeridial" (Jdec.nullable Jdec.int) Nothing | |
| 1037 | - |> Jpipe.optional "spondulics" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1038 | - |> Jpipe.optional "subsecive" (Jdec.nullable Jdec.int) Nothing | |
| 1039 | - |> Jpipe.optional "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1040 | - |> Jpipe.optional "trachyglossate" (Jdec.nullable Jdec.int) Nothing | |
| 1041 | - |> Jpipe.optional "trialogue" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1042 | - |> Jpipe.optional "unassuaged" (Jdec.nullable Jdec.int) Nothing | |
| 1043 | - |> Jpipe.optional "ungross" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1044 | - |> Jpipe.optional "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1006 | + |> Jpipe.custom (optionalField "Alicant" (Jdec.nullable Jdec.int) Nothing) | |
| 1007 | + |> Jpipe.custom (optionalField "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1008 | + |> Jpipe.custom (optionalField "anticorrosive" (Jdec.nullable Jdec.int) Nothing) | |
| 1009 | + |> Jpipe.custom (optionalField "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1010 | + |> Jpipe.custom (optionalField "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1011 | + |> Jpipe.custom (optionalField "be" (Jdec.nullable Jdec.int) Nothing) | |
| 1012 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1013 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1014 | + |> Jpipe.custom (optionalField "chub" (Jdec.nullable Jdec.int) Nothing) | |
| 1015 | + |> Jpipe.custom (optionalField "cuprosilicon" (Jdec.nullable Jdec.int) Nothing) | |
| 1016 | + |> Jpipe.custom (optionalField "curtailedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1017 | + |> Jpipe.custom (optionalField "dellenite" (Jdec.nullable Jdec.int) Nothing) | |
| 1018 | + |> Jpipe.custom (optionalField "Dimitry" (Jdec.nullable Jdec.int) Nothing) | |
| 1019 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1020 | + |> Jpipe.custom (optionalField "edifying" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1021 | + |> Jpipe.custom (optionalField "ethmoiditis" (Jdec.nullable Jdec.int) Nothing) | |
| 1022 | + |> Jpipe.custom (optionalField "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1023 | + |> Jpipe.custom (optionalField "goatherd" (Jdec.nullable Jdec.int) Nothing) | |
| 1024 | + |> Jpipe.custom (optionalField "hammerdress" (Jdec.nullable Jdec.int) Nothing) | |
| 1025 | + |> Jpipe.custom (optionalField "hangfire" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1026 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1027 | + |> Jpipe.custom (optionalField "lacunosity" (Jdec.nullable Jdec.int) Nothing) | |
| 1028 | + |> Jpipe.custom (optionalField "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1029 | + |> Jpipe.custom (optionalField "mameliere" (Jdec.nullable Jdec.int) Nothing) | |
| 1030 | + |> Jpipe.custom (optionalField "motherless" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1031 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1032 | + |> Jpipe.custom (optionalField "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1033 | + |> Jpipe.custom (optionalField "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1034 | + |> Jpipe.custom (optionalField "oafishly" (Jdec.nullable Jdec.int) Nothing) | |
| 1035 | + |> Jpipe.custom (optionalField "pfund" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1036 | + |> Jpipe.custom (optionalField "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1037 | + |> Jpipe.custom (optionalField "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1038 | + |> Jpipe.custom (optionalField "saccharulmic" (Jdec.nullable Jdec.int) Nothing) | |
| 1039 | + |> Jpipe.custom (optionalField "scowlful" (Jdec.nullable Jdec.int) Nothing) | |
| 1040 | + |> Jpipe.custom (optionalField "secluded" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1041 | + |> Jpipe.custom (optionalField "slackage" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1042 | + |> Jpipe.custom (optionalField "sphaeridial" (Jdec.nullable Jdec.int) Nothing) | |
| 1043 | + |> Jpipe.custom (optionalField "spondulics" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1044 | + |> Jpipe.custom (optionalField "subsecive" (Jdec.nullable Jdec.int) Nothing) | |
| 1045 | + |> Jpipe.custom (optionalField "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1046 | + |> Jpipe.custom (optionalField "trachyglossate" (Jdec.nullable Jdec.int) Nothing) | |
| 1047 | + |> Jpipe.custom (optionalField "trialogue" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1048 | + |> Jpipe.custom (optionalField "unassuaged" (Jdec.nullable Jdec.int) Nothing) | |
| 1049 | + |> Jpipe.custom (optionalField "ungross" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1050 | + |> Jpipe.custom (optionalField "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1045 | 1051 | |
| 1046 | 1052 | encodeMaslin : Maslin -> Jenc.Value |
| 1047 | 1053 | encodeMaslin x = |
| @@ -1112,7 +1118,7 @@ monaziteClass = | ||
| 1112 | 1118 | |> Jpipe.required "Chirotherium" Jdec.int |
| 1113 | 1119 | |> Jpipe.required "disdiapason" Jdec.string |
| 1114 | 1120 | |> Jpipe.required "homocerc" Jdec.bool |
| 1115 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 1121 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 1116 | 1122 | |
| 1117 | 1123 | encodeMonaziteClass : MonaziteClass -> Jenc.Value |
| 1118 | 1124 | encodeMonaziteClass x = |
| @@ -1151,31 +1157,31 @@ encodeMonotheisticallyElement x = case x of | ||
| 1151 | 1157 | monotheisticallyClass : Jdec.Decoder MonotheisticallyClass |
| 1152 | 1158 | monotheisticallyClass = |
| 1153 | 1159 | Jdec.succeed MonotheisticallyClass |
| 1154 | - |> Jpipe.optional "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1155 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1156 | - |> Jpipe.optional "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1157 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1158 | - |> Jpipe.optional "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1159 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1160 | - |> Jpipe.optional "egestive" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1161 | - |> Jpipe.optional "enchylema" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1162 | - |> Jpipe.optional "gasconade" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1163 | - |> Jpipe.optional "holidayer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1164 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1165 | - |> Jpipe.optional "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1166 | - |> Jpipe.optional "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1167 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1168 | - |> Jpipe.optional "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1169 | - |> Jpipe.optional "palatableness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1170 | - |> Jpipe.optional "pimpery" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1171 | - |> Jpipe.optional "previolation" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1172 | - |> Jpipe.optional "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1173 | - |> Jpipe.optional "registership" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1174 | - |> Jpipe.optional "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1175 | - |> Jpipe.optional "smithereens" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1176 | - |> Jpipe.optional "superedification" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1177 | - |> Jpipe.optional "trust" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1178 | - |> Jpipe.optional "whitestone" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1160 | + |> Jpipe.custom (optionalField "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1161 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1162 | + |> Jpipe.custom (optionalField "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1163 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1164 | + |> Jpipe.custom (optionalField "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1165 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1166 | + |> Jpipe.custom (optionalField "egestive" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1167 | + |> Jpipe.custom (optionalField "enchylema" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1168 | + |> Jpipe.custom (optionalField "gasconade" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1169 | + |> Jpipe.custom (optionalField "holidayer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1170 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1171 | + |> Jpipe.custom (optionalField "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1172 | + |> Jpipe.custom (optionalField "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1173 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1174 | + |> Jpipe.custom (optionalField "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1175 | + |> Jpipe.custom (optionalField "palatableness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1176 | + |> Jpipe.custom (optionalField "pimpery" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1177 | + |> Jpipe.custom (optionalField "previolation" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1178 | + |> Jpipe.custom (optionalField "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1179 | + |> Jpipe.custom (optionalField "registership" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1180 | + |> Jpipe.custom (optionalField "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1181 | + |> Jpipe.custom (optionalField "smithereens" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1182 | + |> Jpipe.custom (optionalField "superedification" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1183 | + |> Jpipe.custom (optionalField "trust" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1184 | + |> Jpipe.custom (optionalField "whitestone" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1179 | 1185 | |
| 1180 | 1186 | encodeMonotheisticallyClass : MonotheisticallyClass -> Jenc.Value |
| 1181 | 1187 | encodeMonotheisticallyClass x = |
| @@ -1282,7 +1288,7 @@ noncontributing = | ||
| 1282 | 1288 | |> Jpipe.required "jolterhead" Jdec.float |
| 1283 | 1289 | |> Jpipe.required "sauternes" Jdec.int |
| 1284 | 1290 | |> Jpipe.required "sparsely" Jdec.bool |
| 1285 | - |> Jpipe.optional "unrequested" (Jdec.null ()) () | |
| 1291 | + |> Jpipe.custom (optionalField "unrequested" (Jdec.null ()) ()) | |
| 1286 | 1292 | |
| 1287 | 1293 | encodeNoncontributing : Noncontributing -> Jenc.Value |
| 1288 | 1294 | encodeNoncontributing x = |
| @@ -1337,26 +1343,26 @@ encodeOccupationalistElement x = case x of | ||
| 1337 | 1343 | occupationalistClass : Jdec.Decoder OccupationalistClass |
| 1338 | 1344 | occupationalistClass = |
| 1339 | 1345 | Jdec.succeed OccupationalistClass |
| 1340 | - |> Jpipe.optional "beholdable" (Jdec.null ()) () | |
| 1341 | - |> Jpipe.optional "brotuliform" (Jdec.null ()) () | |
| 1342 | - |> Jpipe.optional "Chimakum" (Jdec.null ()) () | |
| 1343 | - |> Jpipe.optional "doodler" (Jdec.null ()) () | |
| 1344 | - |> Jpipe.optional "emulsin" (Jdec.null ()) () | |
| 1345 | - |> Jpipe.optional "Fin" (Jdec.null ()) () | |
| 1346 | - |> Jpipe.optional "flourishing" (Jdec.null ()) () | |
| 1347 | - |> Jpipe.optional "flueless" (Jdec.null ()) () | |
| 1348 | - |> Jpipe.optional "furtively" (Jdec.null ()) () | |
| 1349 | - |> Jpipe.optional "gritter" (Jdec.null ()) () | |
| 1350 | - |> Jpipe.optional "interwish" (Jdec.null ()) () | |
| 1351 | - |> Jpipe.optional "monoxylic" (Jdec.null ()) () | |
| 1352 | - |> Jpipe.optional "myristic" (Jdec.null ()) () | |
| 1353 | - |> Jpipe.optional "nightwear" (Jdec.null ()) () | |
| 1354 | - |> Jpipe.optional "peruser" (Jdec.null ()) () | |
| 1355 | - |> Jpipe.optional "theoastrological" (Jdec.null ()) () | |
| 1356 | - |> Jpipe.optional "thumby" (Jdec.null ()) () | |
| 1357 | - |> Jpipe.optional "tingitid" (Jdec.null ()) () | |
| 1358 | - |> Jpipe.optional "trailless" (Jdec.null ()) () | |
| 1359 | - |> Jpipe.optional "unpocketed" (Jdec.null ()) () | |
| 1346 | + |> Jpipe.custom (optionalField "beholdable" (Jdec.null ()) ()) | |
| 1347 | + |> Jpipe.custom (optionalField "brotuliform" (Jdec.null ()) ()) | |
| 1348 | + |> Jpipe.custom (optionalField "Chimakum" (Jdec.null ()) ()) | |
| 1349 | + |> Jpipe.custom (optionalField "doodler" (Jdec.null ()) ()) | |
| 1350 | + |> Jpipe.custom (optionalField "emulsin" (Jdec.null ()) ()) | |
| 1351 | + |> Jpipe.custom (optionalField "Fin" (Jdec.null ()) ()) | |
| 1352 | + |> Jpipe.custom (optionalField "flourishing" (Jdec.null ()) ()) | |
| 1353 | + |> Jpipe.custom (optionalField "flueless" (Jdec.null ()) ()) | |
| 1354 | + |> Jpipe.custom (optionalField "furtively" (Jdec.null ()) ()) | |
| 1355 | + |> Jpipe.custom (optionalField "gritter" (Jdec.null ()) ()) | |
| 1356 | + |> Jpipe.custom (optionalField "interwish" (Jdec.null ()) ()) | |
| 1357 | + |> Jpipe.custom (optionalField "monoxylic" (Jdec.null ()) ()) | |
| 1358 | + |> Jpipe.custom (optionalField "myristic" (Jdec.null ()) ()) | |
| 1359 | + |> Jpipe.custom (optionalField "nightwear" (Jdec.null ()) ()) | |
| 1360 | + |> Jpipe.custom (optionalField "peruser" (Jdec.null ()) ()) | |
| 1361 | + |> Jpipe.custom (optionalField "theoastrological" (Jdec.null ()) ()) | |
| 1362 | + |> Jpipe.custom (optionalField "thumby" (Jdec.null ()) ()) | |
| 1363 | + |> Jpipe.custom (optionalField "tingitid" (Jdec.null ()) ()) | |
| 1364 | + |> Jpipe.custom (optionalField "trailless" (Jdec.null ()) ()) | |
| 1365 | + |> Jpipe.custom (optionalField "unpocketed" (Jdec.null ()) ()) | |
| 1360 | 1366 | |
| 1361 | 1367 | encodeOccupationalistClass : OccupationalistClass -> Jenc.Value |
| 1362 | 1368 | encodeOccupationalistClass x = |
| @@ -1400,26 +1406,26 @@ encodeOutrivalElement x = case x of | ||
| 1400 | 1406 | outrivalClass : Jdec.Decoder OutrivalClass |
| 1401 | 1407 | outrivalClass = |
| 1402 | 1408 | Jdec.succeed OutrivalClass |
| 1403 | - |> Jpipe.optional "adroitly" (Jdec.null ()) () | |
| 1404 | - |> Jpipe.optional "bridehood" (Jdec.null ()) () | |
| 1405 | - |> Jpipe.optional "Castoroides" (Jdec.null ()) () | |
| 1406 | - |> Jpipe.optional "Czechoslovak" (Jdec.null ()) () | |
| 1407 | - |> Jpipe.optional "diagenesis" (Jdec.null ()) () | |
| 1408 | - |> Jpipe.optional "dihexahedron" (Jdec.null ()) () | |
| 1409 | - |> Jpipe.optional "dopester" (Jdec.null ()) () | |
| 1410 | - |> Jpipe.optional "eumerism" (Jdec.null ()) () | |
| 1411 | - |> Jpipe.optional "flyness" (Jdec.null ()) () | |
| 1412 | - |> Jpipe.optional "fouler" (Jdec.null ()) () | |
| 1413 | - |> Jpipe.optional "laudanosine" (Jdec.null ()) () | |
| 1414 | - |> Jpipe.optional "Lingulidae" (Jdec.null ()) () | |
| 1415 | - |> Jpipe.optional "minutary" (Jdec.null ()) () | |
| 1416 | - |> Jpipe.optional "mitra" (Jdec.null ()) () | |
| 1417 | - |> Jpipe.optional "opisthorchiasis" (Jdec.null ()) () | |
| 1418 | - |> Jpipe.optional "pensively" (Jdec.null ()) () | |
| 1419 | - |> Jpipe.optional "pubigerous" (Jdec.null ()) () | |
| 1420 | - |> Jpipe.optional "rebellious" (Jdec.null ()) () | |
| 1421 | - |> Jpipe.optional "recodify" (Jdec.null ()) () | |
| 1422 | - |> Jpipe.optional "unpaced" (Jdec.null ()) () | |
| 1409 | + |> Jpipe.custom (optionalField "adroitly" (Jdec.null ()) ()) | |
| 1410 | + |> Jpipe.custom (optionalField "bridehood" (Jdec.null ()) ()) | |
| 1411 | + |> Jpipe.custom (optionalField "Castoroides" (Jdec.null ()) ()) | |
| 1412 | + |> Jpipe.custom (optionalField "Czechoslovak" (Jdec.null ()) ()) | |
| 1413 | + |> Jpipe.custom (optionalField "diagenesis" (Jdec.null ()) ()) | |
| 1414 | + |> Jpipe.custom (optionalField "dihexahedron" (Jdec.null ()) ()) | |
| 1415 | + |> Jpipe.custom (optionalField "dopester" (Jdec.null ()) ()) | |
| 1416 | + |> Jpipe.custom (optionalField "eumerism" (Jdec.null ()) ()) | |
| 1417 | + |> Jpipe.custom (optionalField "flyness" (Jdec.null ()) ()) | |
| 1418 | + |> Jpipe.custom (optionalField "fouler" (Jdec.null ()) ()) | |
| 1419 | + |> Jpipe.custom (optionalField "laudanosine" (Jdec.null ()) ()) | |
| 1420 | + |> Jpipe.custom (optionalField "Lingulidae" (Jdec.null ()) ()) | |
| 1421 | + |> Jpipe.custom (optionalField "minutary" (Jdec.null ()) ()) | |
| 1422 | + |> Jpipe.custom (optionalField "mitra" (Jdec.null ()) ()) | |
| 1423 | + |> Jpipe.custom (optionalField "opisthorchiasis" (Jdec.null ()) ()) | |
| 1424 | + |> Jpipe.custom (optionalField "pensively" (Jdec.null ()) ()) | |
| 1425 | + |> Jpipe.custom (optionalField "pubigerous" (Jdec.null ()) ()) | |
| 1426 | + |> Jpipe.custom (optionalField "rebellious" (Jdec.null ()) ()) | |
| 1427 | + |> Jpipe.custom (optionalField "recodify" (Jdec.null ()) ()) | |
| 1428 | + |> Jpipe.custom (optionalField "unpaced" (Jdec.null ()) ()) | |
| 1423 | 1429 | |
| 1424 | 1430 | encodeOutrivalClass : OutrivalClass -> Jenc.Value |
| 1425 | 1431 | encodeOutrivalClass x = |
| @@ -1501,31 +1507,31 @@ encodePiaculumElement x = case x of | ||
| 1501 | 1507 | piaculumClass : Jdec.Decoder PiaculumClass |
| 1502 | 1508 | piaculumClass = |
| 1503 | 1509 | Jdec.succeed PiaculumClass |
| 1504 | - |> Jpipe.optional "alada" (Jdec.nullable Jdec.int) Nothing | |
| 1505 | - |> Jpipe.optional "amphistomous" (Jdec.nullable Jdec.int) Nothing | |
| 1506 | - |> Jpipe.optional "boysenberry" (Jdec.nullable Jdec.int) Nothing | |
| 1507 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1508 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1509 | - |> Jpipe.optional "decardinalize" (Jdec.nullable Jdec.int) Nothing | |
| 1510 | - |> Jpipe.optional "discouragement" (Jdec.nullable Jdec.int) Nothing | |
| 1511 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1512 | - |> Jpipe.optional "doitrified" (Jdec.nullable Jdec.int) Nothing | |
| 1513 | - |> Jpipe.optional "hexaspermous" (Jdec.nullable Jdec.int) Nothing | |
| 1514 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1515 | - |> Jpipe.optional "insinking" (Jdec.nullable Jdec.int) Nothing | |
| 1516 | - |> Jpipe.optional "loathfulness" (Jdec.nullable Jdec.int) Nothing | |
| 1517 | - |> Jpipe.optional "miasmatical" (Jdec.nullable Jdec.int) Nothing | |
| 1518 | - |> Jpipe.optional "neurofibril" (Jdec.nullable Jdec.int) Nothing | |
| 1519 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1520 | - |> Jpipe.optional "phonendoscope" (Jdec.nullable Jdec.int) Nothing | |
| 1521 | - |> Jpipe.optional "pilferment" (Jdec.nullable Jdec.int) Nothing | |
| 1522 | - |> Jpipe.optional "predismissory" (Jdec.nullable Jdec.int) Nothing | |
| 1523 | - |> Jpipe.optional "preinscription" (Jdec.nullable Jdec.int) Nothing | |
| 1524 | - |> Jpipe.optional "quotative" (Jdec.nullable Jdec.int) Nothing | |
| 1525 | - |> Jpipe.optional "sienna" (Jdec.nullable Jdec.int) Nothing | |
| 1526 | - |> Jpipe.optional "thorax" (Jdec.nullable Jdec.int) Nothing | |
| 1527 | - |> Jpipe.optional "yachting" (Jdec.nullable Jdec.int) Nothing | |
| 1528 | - |> Jpipe.optional "Zipper" (Jdec.nullable Jdec.int) Nothing | |
| 1510 | + |> Jpipe.custom (optionalField "alada" (Jdec.nullable Jdec.int) Nothing) | |
| 1511 | + |> Jpipe.custom (optionalField "amphistomous" (Jdec.nullable Jdec.int) Nothing) | |
| 1512 | + |> Jpipe.custom (optionalField "boysenberry" (Jdec.nullable Jdec.int) Nothing) | |
| 1513 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1514 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1515 | + |> Jpipe.custom (optionalField "decardinalize" (Jdec.nullable Jdec.int) Nothing) | |
| 1516 | + |> Jpipe.custom (optionalField "discouragement" (Jdec.nullable Jdec.int) Nothing) | |
| 1517 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1518 | + |> Jpipe.custom (optionalField "doitrified" (Jdec.nullable Jdec.int) Nothing) | |
| 1519 | + |> Jpipe.custom (optionalField "hexaspermous" (Jdec.nullable Jdec.int) Nothing) | |
| 1520 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1521 | + |> Jpipe.custom (optionalField "insinking" (Jdec.nullable Jdec.int) Nothing) | |
| 1522 | + |> Jpipe.custom (optionalField "loathfulness" (Jdec.nullable Jdec.int) Nothing) | |
| 1523 | + |> Jpipe.custom (optionalField "miasmatical" (Jdec.nullable Jdec.int) Nothing) | |
| 1524 | + |> Jpipe.custom (optionalField "neurofibril" (Jdec.nullable Jdec.int) Nothing) | |
| 1525 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1526 | + |> Jpipe.custom (optionalField "phonendoscope" (Jdec.nullable Jdec.int) Nothing) | |
| 1527 | + |> Jpipe.custom (optionalField "pilferment" (Jdec.nullable Jdec.int) Nothing) | |
| 1528 | + |> Jpipe.custom (optionalField "predismissory" (Jdec.nullable Jdec.int) Nothing) | |
| 1529 | + |> Jpipe.custom (optionalField "preinscription" (Jdec.nullable Jdec.int) Nothing) | |
| 1530 | + |> Jpipe.custom (optionalField "quotative" (Jdec.nullable Jdec.int) Nothing) | |
| 1531 | + |> Jpipe.custom (optionalField "sienna" (Jdec.nullable Jdec.int) Nothing) | |
| 1532 | + |> Jpipe.custom (optionalField "thorax" (Jdec.nullable Jdec.int) Nothing) | |
| 1533 | + |> Jpipe.custom (optionalField "yachting" (Jdec.nullable Jdec.int) Nothing) | |
| 1534 | + |> Jpipe.custom (optionalField "Zipper" (Jdec.nullable Jdec.int) Nothing) | |
| 1529 | 1535 | |
| 1530 | 1536 | encodePiaculumClass : PiaculumClass -> Jenc.Value |
| 1531 | 1537 | encodePiaculumClass x = |
| @@ -1624,31 +1630,31 @@ encodePlectopterous x = case x of | ||
| 1624 | 1630 | pneumocele : Jdec.Decoder Pneumocele |
| 1625 | 1631 | pneumocele = |
| 1626 | 1632 | Jdec.succeed Pneumocele |
| 1627 | - |> Jpipe.optional "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1628 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1629 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1630 | - |> Jpipe.optional "cineolic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1631 | - |> Jpipe.optional "cobbly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1632 | - |> Jpipe.optional "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1633 | - |> Jpipe.optional "congregation" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1634 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1635 | - |> Jpipe.optional "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1636 | - |> Jpipe.optional "entophytal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1637 | - |> Jpipe.optional "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1638 | - |> Jpipe.optional "herem" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1639 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1640 | - |> Jpipe.optional "Koniga" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1641 | - |> Jpipe.optional "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1642 | - |> Jpipe.optional "Micky" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1643 | - |> Jpipe.optional "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1644 | - |> Jpipe.optional "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1645 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1646 | - |> Jpipe.optional "persuasively" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1647 | - |> Jpipe.optional "replaceable" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1648 | - |> Jpipe.optional "silex" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1649 | - |> Jpipe.optional "taillight" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1650 | - |> Jpipe.optional "unjealous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1651 | - |> Jpipe.optional "visitorial" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1633 | + |> Jpipe.custom (optionalField "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1634 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1635 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1636 | + |> Jpipe.custom (optionalField "cineolic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1637 | + |> Jpipe.custom (optionalField "cobbly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1638 | + |> Jpipe.custom (optionalField "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1639 | + |> Jpipe.custom (optionalField "congregation" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1640 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1641 | + |> Jpipe.custom (optionalField "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1642 | + |> Jpipe.custom (optionalField "entophytal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1643 | + |> Jpipe.custom (optionalField "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1644 | + |> Jpipe.custom (optionalField "herem" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1645 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1646 | + |> Jpipe.custom (optionalField "Koniga" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1647 | + |> Jpipe.custom (optionalField "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1648 | + |> Jpipe.custom (optionalField "Micky" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1649 | + |> Jpipe.custom (optionalField "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1650 | + |> Jpipe.custom (optionalField "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1651 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1652 | + |> Jpipe.custom (optionalField "persuasively" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1653 | + |> Jpipe.custom (optionalField "replaceable" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1654 | + |> Jpipe.custom (optionalField "silex" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1655 | + |> Jpipe.custom (optionalField "taillight" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1656 | + |> Jpipe.custom (optionalField "unjealous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1657 | + |> Jpipe.custom (optionalField "visitorial" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1652 | 1658 | |
| 1653 | 1659 | encodePneumocele : Pneumocele -> Jenc.Value |
| 1654 | 1660 | encodePneumocele x = |
| @@ -1723,26 +1729,26 @@ encodePotwhiskyElement x = case x of | ||
| 1723 | 1729 | potwhiskyClass : Jdec.Decoder PotwhiskyClass |
| 1724 | 1730 | potwhiskyClass = |
| 1725 | 1731 | Jdec.succeed PotwhiskyClass |
| 1726 | - |> Jpipe.optional "arciform" (Jdec.null ()) () | |
| 1727 | - |> Jpipe.optional "cresolin" (Jdec.null ()) () | |
| 1728 | - |> Jpipe.optional "disheartener" (Jdec.null ()) () | |
| 1729 | - |> Jpipe.optional "disproportionable" (Jdec.null ()) () | |
| 1730 | - |> Jpipe.optional "Euchorda" (Jdec.null ()) () | |
| 1731 | - |> Jpipe.optional "ferryway" (Jdec.null ()) () | |
| 1732 | - |> Jpipe.optional "filamentiferous" (Jdec.null ()) () | |
| 1733 | - |> Jpipe.optional "flemish" (Jdec.null ()) () | |
| 1734 | - |> Jpipe.optional "forgainst" (Jdec.null ()) () | |
| 1735 | - |> Jpipe.optional "grainering" (Jdec.null ()) () | |
| 1736 | - |> Jpipe.optional "irrevoluble" (Jdec.null ()) () | |
| 1737 | - |> Jpipe.optional "kindredship" (Jdec.null ()) () | |
| 1738 | - |> Jpipe.optional "pinguitudinous" (Jdec.null ()) () | |
| 1739 | - |> Jpipe.optional "simpletonic" (Jdec.null ()) () | |
| 1740 | - |> Jpipe.optional "singsong" (Jdec.null ()) () | |
| 1741 | - |> Jpipe.optional "submergement" (Jdec.null ()) () | |
| 1742 | - |> Jpipe.optional "supraoesophagal" (Jdec.null ()) () | |
| 1743 | - |> Jpipe.optional "thrashel" (Jdec.null ()) () | |
| 1744 | - |> Jpipe.optional "tyremesis" (Jdec.null ()) () | |
| 1745 | - |> Jpipe.optional "Yoruba" (Jdec.null ()) () | |
| 1732 | + |> Jpipe.custom (optionalField "arciform" (Jdec.null ()) ()) | |
| 1733 | + |> Jpipe.custom (optionalField "cresolin" (Jdec.null ()) ()) | |
| 1734 | + |> Jpipe.custom (optionalField "disheartener" (Jdec.null ()) ()) | |
| 1735 | + |> Jpipe.custom (optionalField "disproportionable" (Jdec.null ()) ()) | |
| 1736 | + |> Jpipe.custom (optionalField "Euchorda" (Jdec.null ()) ()) | |
| 1737 | + |> Jpipe.custom (optionalField "ferryway" (Jdec.null ()) ()) | |
| 1738 | + |> Jpipe.custom (optionalField "filamentiferous" (Jdec.null ()) ()) | |
| 1739 | + |> Jpipe.custom (optionalField "flemish" (Jdec.null ()) ()) | |
| 1740 | + |> Jpipe.custom (optionalField "forgainst" (Jdec.null ()) ()) | |
| 1741 | + |> Jpipe.custom (optionalField "grainering" (Jdec.null ()) ()) | |
| 1742 | + |> Jpipe.custom (optionalField "irrevoluble" (Jdec.null ()) ()) | |
| 1743 | + |> Jpipe.custom (optionalField "kindredship" (Jdec.null ()) ()) | |
| 1744 | + |> Jpipe.custom (optionalField "pinguitudinous" (Jdec.null ()) ()) | |
| 1745 | + |> Jpipe.custom (optionalField "simpletonic" (Jdec.null ()) ()) | |
| 1746 | + |> Jpipe.custom (optionalField "singsong" (Jdec.null ()) ()) | |
| 1747 | + |> Jpipe.custom (optionalField "submergement" (Jdec.null ()) ()) | |
| 1748 | + |> Jpipe.custom (optionalField "supraoesophagal" (Jdec.null ()) ()) | |
| 1749 | + |> Jpipe.custom (optionalField "thrashel" (Jdec.null ()) ()) | |
| 1750 | + |> Jpipe.custom (optionalField "tyremesis" (Jdec.null ()) ()) | |
| 1751 | + |> Jpipe.custom (optionalField "Yoruba" (Jdec.null ()) ()) | |
| 1746 | 1752 | |
| 1747 | 1753 | encodePotwhiskyClass : PotwhiskyClass -> Jenc.Value |
| 1748 | 1754 | encodePotwhiskyClass x = |
| @@ -1800,26 +1806,26 @@ encodePrefreshmanElement x = case x of | ||
| 1800 | 1806 | prefreshmanClass : Jdec.Decoder PrefreshmanClass |
| 1801 | 1807 | prefreshmanClass = |
| 1802 | 1808 | Jdec.succeed PrefreshmanClass |
| 1803 | - |> Jpipe.optional "azorubine" (Jdec.null ()) () | |
| 1804 | - |> Jpipe.optional "choroiditis" (Jdec.null ()) () | |
| 1805 | - |> Jpipe.optional "coagulatory" (Jdec.null ()) () | |
| 1806 | - |> Jpipe.optional "cyclorama" (Jdec.null ()) () | |
| 1807 | - |> Jpipe.optional "Dolphus" (Jdec.null ()) () | |
| 1808 | - |> Jpipe.optional "duckhearted" (Jdec.null ()) () | |
| 1809 | - |> Jpipe.optional "Ficus" (Jdec.null ()) () | |
| 1810 | - |> Jpipe.optional "Gemaric" (Jdec.null ()) () | |
| 1811 | - |> Jpipe.optional "jugation" (Jdec.null ()) () | |
| 1812 | - |> Jpipe.optional "myoliposis" (Jdec.null ()) () | |
| 1813 | - |> Jpipe.optional "nonnomination" (Jdec.null ()) () | |
| 1814 | - |> Jpipe.optional "palay" (Jdec.null ()) () | |
| 1815 | - |> Jpipe.optional "pentactinal" (Jdec.null ()) () | |
| 1816 | - |> Jpipe.optional "Phaet" (Jdec.null ()) () | |
| 1817 | - |> Jpipe.optional "piquant" (Jdec.null ()) () | |
| 1818 | - |> Jpipe.optional "registration" (Jdec.null ()) () | |
| 1819 | - |> Jpipe.optional "remancipation" (Jdec.null ()) () | |
| 1820 | - |> Jpipe.optional "scutatiform" (Jdec.null ()) () | |
| 1821 | - |> Jpipe.optional "theodolite" (Jdec.null ()) () | |
| 1822 | - |> Jpipe.optional "underward" (Jdec.null ()) () | |
| 1809 | + |> Jpipe.custom (optionalField "azorubine" (Jdec.null ()) ()) | |
| 1810 | + |> Jpipe.custom (optionalField "choroiditis" (Jdec.null ()) ()) | |
| 1811 | + |> Jpipe.custom (optionalField "coagulatory" (Jdec.null ()) ()) | |
| 1812 | + |> Jpipe.custom (optionalField "cyclorama" (Jdec.null ()) ()) | |
| 1813 | + |> Jpipe.custom (optionalField "Dolphus" (Jdec.null ()) ()) | |
| 1814 | + |> Jpipe.custom (optionalField "duckhearted" (Jdec.null ()) ()) | |
| 1815 | + |> Jpipe.custom (optionalField "Ficus" (Jdec.null ()) ()) | |
| 1816 | + |> Jpipe.custom (optionalField "Gemaric" (Jdec.null ()) ()) | |
| 1817 | + |> Jpipe.custom (optionalField "jugation" (Jdec.null ()) ()) | |
| 1818 | + |> Jpipe.custom (optionalField "myoliposis" (Jdec.null ()) ()) | |
| 1819 | + |> Jpipe.custom (optionalField "nonnomination" (Jdec.null ()) ()) | |
| 1820 | + |> Jpipe.custom (optionalField "palay" (Jdec.null ()) ()) | |
| 1821 | + |> Jpipe.custom (optionalField "pentactinal" (Jdec.null ()) ()) | |
| 1822 | + |> Jpipe.custom (optionalField "Phaet" (Jdec.null ()) ()) | |
| 1823 | + |> Jpipe.custom (optionalField "piquant" (Jdec.null ()) ()) | |
| 1824 | + |> Jpipe.custom (optionalField "registration" (Jdec.null ()) ()) | |
| 1825 | + |> Jpipe.custom (optionalField "remancipation" (Jdec.null ()) ()) | |
| 1826 | + |> Jpipe.custom (optionalField "scutatiform" (Jdec.null ()) ()) | |
| 1827 | + |> Jpipe.custom (optionalField "theodolite" (Jdec.null ()) ()) | |
| 1828 | + |> Jpipe.custom (optionalField "underward" (Jdec.null ()) ()) | |
| 1823 | 1829 | |
| 1824 | 1830 | encodePrefreshmanClass : PrefreshmanClass -> Jenc.Value |
| 1825 | 1831 | encodePrefreshmanClass x = |
Melmdefault / QuickType.elm+293 −287
| @@ -614,6 +614,12 @@ type Protext | ||
| 614 | 614 | | MonaziteClassInProtext MonaziteClass |
| 615 | 615 | |
| 616 | 616 | -- decoders and encoders |
| 617 | +optionalField key decoder fallback = | |
| 618 | + Jdec.dict Jdec.value | |
| 619 | + |> Jdec.andThen (\m -> | |
| 620 | + case Dict.get key m of | |
| 621 | + Nothing -> Jdec.succeed fallback | |
| 622 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 617 | 623 | |
| 618 | 624 | quickTypeToString : QuickType -> String |
| 619 | 625 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -726,26 +732,26 @@ encodeJurorElement x = case x of | ||
| 726 | 732 | jurorClass : Jdec.Decoder JurorClass |
| 727 | 733 | jurorClass = |
| 728 | 734 | Jdec.succeed JurorClass |
| 729 | - |> Jpipe.optional "adipsy" (Jdec.null ()) () | |
| 730 | - |> Jpipe.optional "auxiliator" (Jdec.null ()) () | |
| 731 | - |> Jpipe.optional "benda" (Jdec.null ()) () | |
| 732 | - |> Jpipe.optional "benjamin" (Jdec.null ()) () | |
| 733 | - |> Jpipe.optional "brandling" (Jdec.null ()) () | |
| 734 | - |> Jpipe.optional "epicurishly" (Jdec.null ()) () | |
| 735 | - |> Jpipe.optional "eremochaetous" (Jdec.null ()) () | |
| 736 | - |> Jpipe.optional "marten" (Jdec.null ()) () | |
| 737 | - |> Jpipe.optional "monocline" (Jdec.null ()) () | |
| 738 | - |> Jpipe.optional "Olea" (Jdec.null ()) () | |
| 739 | - |> Jpipe.optional "palgat" (Jdec.null ()) () | |
| 740 | - |> Jpipe.optional "pennyworth" (Jdec.null ()) () | |
| 741 | - |> Jpipe.optional "pioury" (Jdec.null ()) () | |
| 742 | - |> Jpipe.optional "pragmatistic" (Jdec.null ()) () | |
| 743 | - |> Jpipe.optional "stylelessness" (Jdec.null ()) () | |
| 744 | - |> Jpipe.optional "systematical" (Jdec.null ()) () | |
| 745 | - |> Jpipe.optional "thready" (Jdec.null ()) () | |
| 746 | - |> Jpipe.optional "uncontemporary" (Jdec.null ()) () | |
| 747 | - |> Jpipe.optional "uncouched" (Jdec.null ()) () | |
| 748 | - |> Jpipe.optional "uninhabitedness" (Jdec.null ()) () | |
| 735 | + |> Jpipe.custom (optionalField "adipsy" (Jdec.null ()) ()) | |
| 736 | + |> Jpipe.custom (optionalField "auxiliator" (Jdec.null ()) ()) | |
| 737 | + |> Jpipe.custom (optionalField "benda" (Jdec.null ()) ()) | |
| 738 | + |> Jpipe.custom (optionalField "benjamin" (Jdec.null ()) ()) | |
| 739 | + |> Jpipe.custom (optionalField "brandling" (Jdec.null ()) ()) | |
| 740 | + |> Jpipe.custom (optionalField "epicurishly" (Jdec.null ()) ()) | |
| 741 | + |> Jpipe.custom (optionalField "eremochaetous" (Jdec.null ()) ()) | |
| 742 | + |> Jpipe.custom (optionalField "marten" (Jdec.null ()) ()) | |
| 743 | + |> Jpipe.custom (optionalField "monocline" (Jdec.null ()) ()) | |
| 744 | + |> Jpipe.custom (optionalField "Olea" (Jdec.null ()) ()) | |
| 745 | + |> Jpipe.custom (optionalField "palgat" (Jdec.null ()) ()) | |
| 746 | + |> Jpipe.custom (optionalField "pennyworth" (Jdec.null ()) ()) | |
| 747 | + |> Jpipe.custom (optionalField "pioury" (Jdec.null ()) ()) | |
| 748 | + |> Jpipe.custom (optionalField "pragmatistic" (Jdec.null ()) ()) | |
| 749 | + |> Jpipe.custom (optionalField "stylelessness" (Jdec.null ()) ()) | |
| 750 | + |> Jpipe.custom (optionalField "systematical" (Jdec.null ()) ()) | |
| 751 | + |> Jpipe.custom (optionalField "thready" (Jdec.null ()) ()) | |
| 752 | + |> Jpipe.custom (optionalField "uncontemporary" (Jdec.null ()) ()) | |
| 753 | + |> Jpipe.custom (optionalField "uncouched" (Jdec.null ()) ()) | |
| 754 | + |> Jpipe.custom (optionalField "uninhabitedness" (Jdec.null ()) ()) | |
| 749 | 755 | |
| 750 | 756 | encodeJurorClass : JurorClass -> Jenc.Value |
| 751 | 757 | encodeJurorClass x = |
| @@ -801,26 +807,26 @@ encodeLadronismElement x = case x of | ||
| 801 | 807 | ladronismClass : Jdec.Decoder LadronismClass |
| 802 | 808 | ladronismClass = |
| 803 | 809 | Jdec.succeed LadronismClass |
| 804 | - |> Jpipe.optional "acclaimer" (Jdec.null ()) () | |
| 805 | - |> Jpipe.optional "achree" (Jdec.null ()) () | |
| 806 | - |> Jpipe.optional "base" (Jdec.null ()) () | |
| 807 | - |> Jpipe.optional "conundrumize" (Jdec.null ()) () | |
| 808 | - |> Jpipe.optional "degerminator" (Jdec.null ()) () | |
| 809 | - |> Jpipe.optional "describable" (Jdec.null ()) () | |
| 810 | - |> Jpipe.optional "exasperatedly" (Jdec.null ()) () | |
| 811 | - |> Jpipe.optional "heroine" (Jdec.null ()) () | |
| 812 | - |> Jpipe.optional "indazin" (Jdec.null ()) () | |
| 813 | - |> Jpipe.optional "luteous" (Jdec.null ()) () | |
| 814 | - |> Jpipe.optional "papular" (Jdec.null ()) () | |
| 815 | - |> Jpipe.optional "pritch" (Jdec.null ()) () | |
| 816 | - |> Jpipe.optional "Prodenia" (Jdec.null ()) () | |
| 817 | - |> Jpipe.optional "seege" (Jdec.null ()) () | |
| 818 | - |> Jpipe.optional "shopgirl" (Jdec.null ()) () | |
| 819 | - |> Jpipe.optional "tragedietta" (Jdec.null ()) () | |
| 820 | - |> Jpipe.optional "unsparse" (Jdec.null ()) () | |
| 821 | - |> Jpipe.optional "uplook" (Jdec.null ()) () | |
| 822 | - |> Jpipe.optional "vermiformis" (Jdec.null ()) () | |
| 823 | - |> Jpipe.optional "whafabout" (Jdec.null ()) () | |
| 810 | + |> Jpipe.custom (optionalField "acclaimer" (Jdec.null ()) ()) | |
| 811 | + |> Jpipe.custom (optionalField "achree" (Jdec.null ()) ()) | |
| 812 | + |> Jpipe.custom (optionalField "base" (Jdec.null ()) ()) | |
| 813 | + |> Jpipe.custom (optionalField "conundrumize" (Jdec.null ()) ()) | |
| 814 | + |> Jpipe.custom (optionalField "degerminator" (Jdec.null ()) ()) | |
| 815 | + |> Jpipe.custom (optionalField "describable" (Jdec.null ()) ()) | |
| 816 | + |> Jpipe.custom (optionalField "exasperatedly" (Jdec.null ()) ()) | |
| 817 | + |> Jpipe.custom (optionalField "heroine" (Jdec.null ()) ()) | |
| 818 | + |> Jpipe.custom (optionalField "indazin" (Jdec.null ()) ()) | |
| 819 | + |> Jpipe.custom (optionalField "luteous" (Jdec.null ()) ()) | |
| 820 | + |> Jpipe.custom (optionalField "papular" (Jdec.null ()) ()) | |
| 821 | + |> Jpipe.custom (optionalField "pritch" (Jdec.null ()) ()) | |
| 822 | + |> Jpipe.custom (optionalField "Prodenia" (Jdec.null ()) ()) | |
| 823 | + |> Jpipe.custom (optionalField "seege" (Jdec.null ()) ()) | |
| 824 | + |> Jpipe.custom (optionalField "shopgirl" (Jdec.null ()) ()) | |
| 825 | + |> Jpipe.custom (optionalField "tragedietta" (Jdec.null ()) ()) | |
| 826 | + |> Jpipe.custom (optionalField "unsparse" (Jdec.null ()) ()) | |
| 827 | + |> Jpipe.custom (optionalField "uplook" (Jdec.null ()) ()) | |
| 828 | + |> Jpipe.custom (optionalField "vermiformis" (Jdec.null ()) ()) | |
| 829 | + |> Jpipe.custom (optionalField "whafabout" (Jdec.null ()) ()) | |
| 824 | 830 | |
| 825 | 831 | encodeLadronismClass : LadronismClass -> Jenc.Value |
| 826 | 832 | encodeLadronismClass x = |
| @@ -864,26 +870,26 @@ encodeLandlubberlyElement x = case x of | ||
| 864 | 870 | landlubberlyClass : Jdec.Decoder LandlubberlyClass |
| 865 | 871 | landlubberlyClass = |
| 866 | 872 | Jdec.succeed LandlubberlyClass |
| 867 | - |> Jpipe.optional "acropoleis" (Jdec.null ()) () | |
| 868 | - |> Jpipe.optional "aminate" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "Amyraldism" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "bipenniform" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "bugre" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "calycule" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "caoutchouc" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "disprover" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "fitroot" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "fulgently" (Jdec.null ()) () | |
| 877 | - |> Jpipe.optional "kickup" (Jdec.null ()) () | |
| 878 | - |> Jpipe.optional "laevoversion" (Jdec.null ()) () | |
| 879 | - |> Jpipe.optional "moter" (Jdec.null ()) () | |
| 880 | - |> Jpipe.optional "objectivity" (Jdec.null ()) () | |
| 881 | - |> Jpipe.optional "posterity" (Jdec.null ()) () | |
| 882 | - |> Jpipe.optional "postnuptial" (Jdec.null ()) () | |
| 883 | - |> Jpipe.optional "precedentary" (Jdec.null ()) () | |
| 884 | - |> Jpipe.optional "saddling" (Jdec.null ()) () | |
| 885 | - |> Jpipe.optional "subcurrent" (Jdec.null ()) () | |
| 886 | - |> Jpipe.optional "unrecriminative" (Jdec.null ()) () | |
| 873 | + |> Jpipe.custom (optionalField "acropoleis" (Jdec.null ()) ()) | |
| 874 | + |> Jpipe.custom (optionalField "aminate" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "Amyraldism" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "bipenniform" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "bugre" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "calycule" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "caoutchouc" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "disprover" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "fitroot" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "fulgently" (Jdec.null ()) ()) | |
| 883 | + |> Jpipe.custom (optionalField "kickup" (Jdec.null ()) ()) | |
| 884 | + |> Jpipe.custom (optionalField "laevoversion" (Jdec.null ()) ()) | |
| 885 | + |> Jpipe.custom (optionalField "moter" (Jdec.null ()) ()) | |
| 886 | + |> Jpipe.custom (optionalField "objectivity" (Jdec.null ()) ()) | |
| 887 | + |> Jpipe.custom (optionalField "posterity" (Jdec.null ()) ()) | |
| 888 | + |> Jpipe.custom (optionalField "postnuptial" (Jdec.null ()) ()) | |
| 889 | + |> Jpipe.custom (optionalField "precedentary" (Jdec.null ()) ()) | |
| 890 | + |> Jpipe.custom (optionalField "saddling" (Jdec.null ()) ()) | |
| 891 | + |> Jpipe.custom (optionalField "subcurrent" (Jdec.null ()) ()) | |
| 892 | + |> Jpipe.custom (optionalField "unrecriminative" (Jdec.null ()) ()) | |
| 887 | 893 | |
| 888 | 894 | encodeLandlubberlyClass : LandlubberlyClass -> Jenc.Value |
| 889 | 895 | encodeLandlubberlyClass x = |
| @@ -937,31 +943,31 @@ encodeLupusElement x = case x of | ||
| 937 | 943 | lupusClass : Jdec.Decoder LupusClass |
| 938 | 944 | lupusClass = |
| 939 | 945 | Jdec.succeed LupusClass |
| 940 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 941 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 942 | - |> Jpipe.optional "Chlorioninae" (Jdec.nullable Jdec.int) Nothing | |
| 943 | - |> Jpipe.optional "Corvinae" (Jdec.nullable Jdec.int) Nothing | |
| 944 | - |> Jpipe.optional "Crassina" (Jdec.nullable Jdec.int) Nothing | |
| 945 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 946 | - |> Jpipe.optional "exiguity" (Jdec.nullable Jdec.int) Nothing | |
| 947 | - |> Jpipe.optional "farcist" (Jdec.nullable Jdec.int) Nothing | |
| 948 | - |> Jpipe.optional "holographical" (Jdec.nullable Jdec.int) Nothing | |
| 949 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 950 | - |> Jpipe.optional "ichthyophagan" (Jdec.nullable Jdec.int) Nothing | |
| 951 | - |> Jpipe.optional "implacable" (Jdec.nullable Jdec.int) Nothing | |
| 952 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 953 | - |> Jpipe.optional "outshiner" (Jdec.nullable Jdec.int) Nothing | |
| 954 | - |> Jpipe.optional "overweather" (Jdec.nullable Jdec.int) Nothing | |
| 955 | - |> Jpipe.optional "protonegroid" (Jdec.nullable Jdec.int) Nothing | |
| 956 | - |> Jpipe.optional "shallowish" (Jdec.nullable Jdec.int) Nothing | |
| 957 | - |> Jpipe.optional "snoke" (Jdec.nullable Jdec.int) Nothing | |
| 958 | - |> Jpipe.optional "snout" (Jdec.nullable Jdec.int) Nothing | |
| 959 | - |> Jpipe.optional "surveillance" (Jdec.nullable Jdec.int) Nothing | |
| 960 | - |> Jpipe.optional "threshingtime" (Jdec.nullable Jdec.int) Nothing | |
| 961 | - |> Jpipe.optional "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing | |
| 962 | - |> Jpipe.optional "unsignificantly" (Jdec.nullable Jdec.int) Nothing | |
| 963 | - |> Jpipe.optional "unsnap" (Jdec.nullable Jdec.int) Nothing | |
| 964 | - |> Jpipe.optional "vendible" (Jdec.nullable Jdec.int) Nothing | |
| 946 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 947 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 948 | + |> Jpipe.custom (optionalField "Chlorioninae" (Jdec.nullable Jdec.int) Nothing) | |
| 949 | + |> Jpipe.custom (optionalField "Corvinae" (Jdec.nullable Jdec.int) Nothing) | |
| 950 | + |> Jpipe.custom (optionalField "Crassina" (Jdec.nullable Jdec.int) Nothing) | |
| 951 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 952 | + |> Jpipe.custom (optionalField "exiguity" (Jdec.nullable Jdec.int) Nothing) | |
| 953 | + |> Jpipe.custom (optionalField "farcist" (Jdec.nullable Jdec.int) Nothing) | |
| 954 | + |> Jpipe.custom (optionalField "holographical" (Jdec.nullable Jdec.int) Nothing) | |
| 955 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 956 | + |> Jpipe.custom (optionalField "ichthyophagan" (Jdec.nullable Jdec.int) Nothing) | |
| 957 | + |> Jpipe.custom (optionalField "implacable" (Jdec.nullable Jdec.int) Nothing) | |
| 958 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 959 | + |> Jpipe.custom (optionalField "outshiner" (Jdec.nullable Jdec.int) Nothing) | |
| 960 | + |> Jpipe.custom (optionalField "overweather" (Jdec.nullable Jdec.int) Nothing) | |
| 961 | + |> Jpipe.custom (optionalField "protonegroid" (Jdec.nullable Jdec.int) Nothing) | |
| 962 | + |> Jpipe.custom (optionalField "shallowish" (Jdec.nullable Jdec.int) Nothing) | |
| 963 | + |> Jpipe.custom (optionalField "snoke" (Jdec.nullable Jdec.int) Nothing) | |
| 964 | + |> Jpipe.custom (optionalField "snout" (Jdec.nullable Jdec.int) Nothing) | |
| 965 | + |> Jpipe.custom (optionalField "surveillance" (Jdec.nullable Jdec.int) Nothing) | |
| 966 | + |> Jpipe.custom (optionalField "threshingtime" (Jdec.nullable Jdec.int) Nothing) | |
| 967 | + |> Jpipe.custom (optionalField "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing) | |
| 968 | + |> Jpipe.custom (optionalField "unsignificantly" (Jdec.nullable Jdec.int) Nothing) | |
| 969 | + |> Jpipe.custom (optionalField "unsnap" (Jdec.nullable Jdec.int) Nothing) | |
| 970 | + |> Jpipe.custom (optionalField "vendible" (Jdec.nullable Jdec.int) Nothing) | |
| 965 | 971 | |
| 966 | 972 | encodeLupusClass : LupusClass -> Jenc.Value |
| 967 | 973 | encodeLupusClass x = |
| @@ -996,51 +1002,51 @@ encodeLupusClass x = | ||
| 996 | 1002 | maslin : Jdec.Decoder Maslin |
| 997 | 1003 | maslin = |
| 998 | 1004 | Jdec.succeed Maslin |
| 999 | - |> Jpipe.optional "Alicant" (Jdec.nullable Jdec.int) Nothing | |
| 1000 | - |> Jpipe.optional "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1001 | - |> Jpipe.optional "anticorrosive" (Jdec.nullable Jdec.int) Nothing | |
| 1002 | - |> Jpipe.optional "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1003 | - |> Jpipe.optional "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1004 | - |> Jpipe.optional "be" (Jdec.nullable Jdec.int) Nothing | |
| 1005 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1006 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1007 | - |> Jpipe.optional "chub" (Jdec.nullable Jdec.int) Nothing | |
| 1008 | - |> Jpipe.optional "cuprosilicon" (Jdec.nullable Jdec.int) Nothing | |
| 1009 | - |> Jpipe.optional "curtailedly" (Jdec.nullable Jdec.int) Nothing | |
| 1010 | - |> Jpipe.optional "dellenite" (Jdec.nullable Jdec.int) Nothing | |
| 1011 | - |> Jpipe.optional "Dimitry" (Jdec.nullable Jdec.int) Nothing | |
| 1012 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1013 | - |> Jpipe.optional "edifying" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1014 | - |> Jpipe.optional "ethmoiditis" (Jdec.nullable Jdec.int) Nothing | |
| 1015 | - |> Jpipe.optional "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1016 | - |> Jpipe.optional "goatherd" (Jdec.nullable Jdec.int) Nothing | |
| 1017 | - |> Jpipe.optional "hammerdress" (Jdec.nullable Jdec.int) Nothing | |
| 1018 | - |> Jpipe.optional "hangfire" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1019 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1020 | - |> Jpipe.optional "lacunosity" (Jdec.nullable Jdec.int) Nothing | |
| 1021 | - |> Jpipe.optional "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1022 | - |> Jpipe.optional "mameliere" (Jdec.nullable Jdec.int) Nothing | |
| 1023 | - |> Jpipe.optional "motherless" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1024 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1025 | - |> Jpipe.optional "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1026 | - |> Jpipe.optional "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1027 | - |> Jpipe.optional "oafishly" (Jdec.nullable Jdec.int) Nothing | |
| 1028 | - |> Jpipe.optional "pfund" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1029 | - |> Jpipe.optional "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1030 | - |> Jpipe.optional "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1031 | - |> Jpipe.optional "saccharulmic" (Jdec.nullable Jdec.int) Nothing | |
| 1032 | - |> Jpipe.optional "scowlful" (Jdec.nullable Jdec.int) Nothing | |
| 1033 | - |> Jpipe.optional "secluded" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1034 | - |> Jpipe.optional "slackage" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1035 | - |> Jpipe.optional "sphaeridial" (Jdec.nullable Jdec.int) Nothing | |
| 1036 | - |> Jpipe.optional "spondulics" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1037 | - |> Jpipe.optional "subsecive" (Jdec.nullable Jdec.int) Nothing | |
| 1038 | - |> Jpipe.optional "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1039 | - |> Jpipe.optional "trachyglossate" (Jdec.nullable Jdec.int) Nothing | |
| 1040 | - |> Jpipe.optional "trialogue" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1041 | - |> Jpipe.optional "unassuaged" (Jdec.nullable Jdec.int) Nothing | |
| 1042 | - |> Jpipe.optional "ungross" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1043 | - |> Jpipe.optional "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1005 | + |> Jpipe.custom (optionalField "Alicant" (Jdec.nullable Jdec.int) Nothing) | |
| 1006 | + |> Jpipe.custom (optionalField "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1007 | + |> Jpipe.custom (optionalField "anticorrosive" (Jdec.nullable Jdec.int) Nothing) | |
| 1008 | + |> Jpipe.custom (optionalField "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1009 | + |> Jpipe.custom (optionalField "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1010 | + |> Jpipe.custom (optionalField "be" (Jdec.nullable Jdec.int) Nothing) | |
| 1011 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1012 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1013 | + |> Jpipe.custom (optionalField "chub" (Jdec.nullable Jdec.int) Nothing) | |
| 1014 | + |> Jpipe.custom (optionalField "cuprosilicon" (Jdec.nullable Jdec.int) Nothing) | |
| 1015 | + |> Jpipe.custom (optionalField "curtailedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1016 | + |> Jpipe.custom (optionalField "dellenite" (Jdec.nullable Jdec.int) Nothing) | |
| 1017 | + |> Jpipe.custom (optionalField "Dimitry" (Jdec.nullable Jdec.int) Nothing) | |
| 1018 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1019 | + |> Jpipe.custom (optionalField "edifying" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1020 | + |> Jpipe.custom (optionalField "ethmoiditis" (Jdec.nullable Jdec.int) Nothing) | |
| 1021 | + |> Jpipe.custom (optionalField "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1022 | + |> Jpipe.custom (optionalField "goatherd" (Jdec.nullable Jdec.int) Nothing) | |
| 1023 | + |> Jpipe.custom (optionalField "hammerdress" (Jdec.nullable Jdec.int) Nothing) | |
| 1024 | + |> Jpipe.custom (optionalField "hangfire" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1025 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1026 | + |> Jpipe.custom (optionalField "lacunosity" (Jdec.nullable Jdec.int) Nothing) | |
| 1027 | + |> Jpipe.custom (optionalField "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1028 | + |> Jpipe.custom (optionalField "mameliere" (Jdec.nullable Jdec.int) Nothing) | |
| 1029 | + |> Jpipe.custom (optionalField "motherless" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1030 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1031 | + |> Jpipe.custom (optionalField "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1032 | + |> Jpipe.custom (optionalField "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1033 | + |> Jpipe.custom (optionalField "oafishly" (Jdec.nullable Jdec.int) Nothing) | |
| 1034 | + |> Jpipe.custom (optionalField "pfund" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1035 | + |> Jpipe.custom (optionalField "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1036 | + |> Jpipe.custom (optionalField "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1037 | + |> Jpipe.custom (optionalField "saccharulmic" (Jdec.nullable Jdec.int) Nothing) | |
| 1038 | + |> Jpipe.custom (optionalField "scowlful" (Jdec.nullable Jdec.int) Nothing) | |
| 1039 | + |> Jpipe.custom (optionalField "secluded" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1040 | + |> Jpipe.custom (optionalField "slackage" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1041 | + |> Jpipe.custom (optionalField "sphaeridial" (Jdec.nullable Jdec.int) Nothing) | |
| 1042 | + |> Jpipe.custom (optionalField "spondulics" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1043 | + |> Jpipe.custom (optionalField "subsecive" (Jdec.nullable Jdec.int) Nothing) | |
| 1044 | + |> Jpipe.custom (optionalField "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1045 | + |> Jpipe.custom (optionalField "trachyglossate" (Jdec.nullable Jdec.int) Nothing) | |
| 1046 | + |> Jpipe.custom (optionalField "trialogue" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1047 | + |> Jpipe.custom (optionalField "unassuaged" (Jdec.nullable Jdec.int) Nothing) | |
| 1048 | + |> Jpipe.custom (optionalField "ungross" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1049 | + |> Jpipe.custom (optionalField "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1044 | 1050 | |
| 1045 | 1051 | encodeMaslin : Maslin -> Jenc.Value |
| 1046 | 1052 | encodeMaslin x = |
| @@ -1111,7 +1117,7 @@ monaziteClass = | ||
| 1111 | 1117 | |> Jpipe.required "Chirotherium" Jdec.int |
| 1112 | 1118 | |> Jpipe.required "disdiapason" Jdec.string |
| 1113 | 1119 | |> Jpipe.required "homocerc" Jdec.bool |
| 1114 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 1120 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 1115 | 1121 | |
| 1116 | 1122 | encodeMonaziteClass : MonaziteClass -> Jenc.Value |
| 1117 | 1123 | encodeMonaziteClass x = |
| @@ -1150,31 +1156,31 @@ encodeMonotheisticallyElement x = case x of | ||
| 1150 | 1156 | monotheisticallyClass : Jdec.Decoder MonotheisticallyClass |
| 1151 | 1157 | monotheisticallyClass = |
| 1152 | 1158 | Jdec.succeed MonotheisticallyClass |
| 1153 | - |> Jpipe.optional "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1154 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1155 | - |> Jpipe.optional "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1156 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1157 | - |> Jpipe.optional "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1158 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1159 | - |> Jpipe.optional "egestive" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1160 | - |> Jpipe.optional "enchylema" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1161 | - |> Jpipe.optional "gasconade" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1162 | - |> Jpipe.optional "holidayer" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1163 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1164 | - |> Jpipe.optional "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1165 | - |> Jpipe.optional "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1166 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1167 | - |> Jpipe.optional "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1168 | - |> Jpipe.optional "palatableness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1169 | - |> Jpipe.optional "pimpery" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1170 | - |> Jpipe.optional "previolation" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1171 | - |> Jpipe.optional "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1172 | - |> Jpipe.optional "registership" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1173 | - |> Jpipe.optional "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1174 | - |> Jpipe.optional "smithereens" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1175 | - |> Jpipe.optional "superedification" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1176 | - |> Jpipe.optional "trust" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1177 | - |> Jpipe.optional "whitestone" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1159 | + |> Jpipe.custom (optionalField "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1160 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1161 | + |> Jpipe.custom (optionalField "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1162 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1163 | + |> Jpipe.custom (optionalField "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1164 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1165 | + |> Jpipe.custom (optionalField "egestive" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1166 | + |> Jpipe.custom (optionalField "enchylema" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1167 | + |> Jpipe.custom (optionalField "gasconade" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1168 | + |> Jpipe.custom (optionalField "holidayer" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1169 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1170 | + |> Jpipe.custom (optionalField "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1171 | + |> Jpipe.custom (optionalField "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1172 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1173 | + |> Jpipe.custom (optionalField "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1174 | + |> Jpipe.custom (optionalField "palatableness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1175 | + |> Jpipe.custom (optionalField "pimpery" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1176 | + |> Jpipe.custom (optionalField "previolation" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1177 | + |> Jpipe.custom (optionalField "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1178 | + |> Jpipe.custom (optionalField "registership" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1179 | + |> Jpipe.custom (optionalField "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1180 | + |> Jpipe.custom (optionalField "smithereens" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1181 | + |> Jpipe.custom (optionalField "superedification" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1182 | + |> Jpipe.custom (optionalField "trust" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1183 | + |> Jpipe.custom (optionalField "whitestone" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1178 | 1184 | |
| 1179 | 1185 | encodeMonotheisticallyClass : MonotheisticallyClass -> Jenc.Value |
| 1180 | 1186 | encodeMonotheisticallyClass x = |
| @@ -1281,7 +1287,7 @@ noncontributing = | ||
| 1281 | 1287 | |> Jpipe.required "jolterhead" Jdec.float |
| 1282 | 1288 | |> Jpipe.required "sauternes" Jdec.int |
| 1283 | 1289 | |> Jpipe.required "sparsely" Jdec.bool |
| 1284 | - |> Jpipe.optional "unrequested" (Jdec.null ()) () | |
| 1290 | + |> Jpipe.custom (optionalField "unrequested" (Jdec.null ()) ()) | |
| 1285 | 1291 | |
| 1286 | 1292 | encodeNoncontributing : Noncontributing -> Jenc.Value |
| 1287 | 1293 | encodeNoncontributing x = |
| @@ -1336,26 +1342,26 @@ encodeOccupationalistElement x = case x of | ||
| 1336 | 1342 | occupationalistClass : Jdec.Decoder OccupationalistClass |
| 1337 | 1343 | occupationalistClass = |
| 1338 | 1344 | Jdec.succeed OccupationalistClass |
| 1339 | - |> Jpipe.optional "beholdable" (Jdec.null ()) () | |
| 1340 | - |> Jpipe.optional "brotuliform" (Jdec.null ()) () | |
| 1341 | - |> Jpipe.optional "Chimakum" (Jdec.null ()) () | |
| 1342 | - |> Jpipe.optional "doodler" (Jdec.null ()) () | |
| 1343 | - |> Jpipe.optional "emulsin" (Jdec.null ()) () | |
| 1344 | - |> Jpipe.optional "Fin" (Jdec.null ()) () | |
| 1345 | - |> Jpipe.optional "flourishing" (Jdec.null ()) () | |
| 1346 | - |> Jpipe.optional "flueless" (Jdec.null ()) () | |
| 1347 | - |> Jpipe.optional "furtively" (Jdec.null ()) () | |
| 1348 | - |> Jpipe.optional "gritter" (Jdec.null ()) () | |
| 1349 | - |> Jpipe.optional "interwish" (Jdec.null ()) () | |
| 1350 | - |> Jpipe.optional "monoxylic" (Jdec.null ()) () | |
| 1351 | - |> Jpipe.optional "myristic" (Jdec.null ()) () | |
| 1352 | - |> Jpipe.optional "nightwear" (Jdec.null ()) () | |
| 1353 | - |> Jpipe.optional "peruser" (Jdec.null ()) () | |
| 1354 | - |> Jpipe.optional "theoastrological" (Jdec.null ()) () | |
| 1355 | - |> Jpipe.optional "thumby" (Jdec.null ()) () | |
| 1356 | - |> Jpipe.optional "tingitid" (Jdec.null ()) () | |
| 1357 | - |> Jpipe.optional "trailless" (Jdec.null ()) () | |
| 1358 | - |> Jpipe.optional "unpocketed" (Jdec.null ()) () | |
| 1345 | + |> Jpipe.custom (optionalField "beholdable" (Jdec.null ()) ()) | |
| 1346 | + |> Jpipe.custom (optionalField "brotuliform" (Jdec.null ()) ()) | |
| 1347 | + |> Jpipe.custom (optionalField "Chimakum" (Jdec.null ()) ()) | |
| 1348 | + |> Jpipe.custom (optionalField "doodler" (Jdec.null ()) ()) | |
| 1349 | + |> Jpipe.custom (optionalField "emulsin" (Jdec.null ()) ()) | |
| 1350 | + |> Jpipe.custom (optionalField "Fin" (Jdec.null ()) ()) | |
| 1351 | + |> Jpipe.custom (optionalField "flourishing" (Jdec.null ()) ()) | |
| 1352 | + |> Jpipe.custom (optionalField "flueless" (Jdec.null ()) ()) | |
| 1353 | + |> Jpipe.custom (optionalField "furtively" (Jdec.null ()) ()) | |
| 1354 | + |> Jpipe.custom (optionalField "gritter" (Jdec.null ()) ()) | |
| 1355 | + |> Jpipe.custom (optionalField "interwish" (Jdec.null ()) ()) | |
| 1356 | + |> Jpipe.custom (optionalField "monoxylic" (Jdec.null ()) ()) | |
| 1357 | + |> Jpipe.custom (optionalField "myristic" (Jdec.null ()) ()) | |
| 1358 | + |> Jpipe.custom (optionalField "nightwear" (Jdec.null ()) ()) | |
| 1359 | + |> Jpipe.custom (optionalField "peruser" (Jdec.null ()) ()) | |
| 1360 | + |> Jpipe.custom (optionalField "theoastrological" (Jdec.null ()) ()) | |
| 1361 | + |> Jpipe.custom (optionalField "thumby" (Jdec.null ()) ()) | |
| 1362 | + |> Jpipe.custom (optionalField "tingitid" (Jdec.null ()) ()) | |
| 1363 | + |> Jpipe.custom (optionalField "trailless" (Jdec.null ()) ()) | |
| 1364 | + |> Jpipe.custom (optionalField "unpocketed" (Jdec.null ()) ()) | |
| 1359 | 1365 | |
| 1360 | 1366 | encodeOccupationalistClass : OccupationalistClass -> Jenc.Value |
| 1361 | 1367 | encodeOccupationalistClass x = |
| @@ -1399,26 +1405,26 @@ encodeOutrivalElement x = case x of | ||
| 1399 | 1405 | outrivalClass : Jdec.Decoder OutrivalClass |
| 1400 | 1406 | outrivalClass = |
| 1401 | 1407 | Jdec.succeed OutrivalClass |
| 1402 | - |> Jpipe.optional "adroitly" (Jdec.null ()) () | |
| 1403 | - |> Jpipe.optional "bridehood" (Jdec.null ()) () | |
| 1404 | - |> Jpipe.optional "Castoroides" (Jdec.null ()) () | |
| 1405 | - |> Jpipe.optional "Czechoslovak" (Jdec.null ()) () | |
| 1406 | - |> Jpipe.optional "diagenesis" (Jdec.null ()) () | |
| 1407 | - |> Jpipe.optional "dihexahedron" (Jdec.null ()) () | |
| 1408 | - |> Jpipe.optional "dopester" (Jdec.null ()) () | |
| 1409 | - |> Jpipe.optional "eumerism" (Jdec.null ()) () | |
| 1410 | - |> Jpipe.optional "flyness" (Jdec.null ()) () | |
| 1411 | - |> Jpipe.optional "fouler" (Jdec.null ()) () | |
| 1412 | - |> Jpipe.optional "laudanosine" (Jdec.null ()) () | |
| 1413 | - |> Jpipe.optional "Lingulidae" (Jdec.null ()) () | |
| 1414 | - |> Jpipe.optional "minutary" (Jdec.null ()) () | |
| 1415 | - |> Jpipe.optional "mitra" (Jdec.null ()) () | |
| 1416 | - |> Jpipe.optional "opisthorchiasis" (Jdec.null ()) () | |
| 1417 | - |> Jpipe.optional "pensively" (Jdec.null ()) () | |
| 1418 | - |> Jpipe.optional "pubigerous" (Jdec.null ()) () | |
| 1419 | - |> Jpipe.optional "rebellious" (Jdec.null ()) () | |
| 1420 | - |> Jpipe.optional "recodify" (Jdec.null ()) () | |
| 1421 | - |> Jpipe.optional "unpaced" (Jdec.null ()) () | |
| 1408 | + |> Jpipe.custom (optionalField "adroitly" (Jdec.null ()) ()) | |
| 1409 | + |> Jpipe.custom (optionalField "bridehood" (Jdec.null ()) ()) | |
| 1410 | + |> Jpipe.custom (optionalField "Castoroides" (Jdec.null ()) ()) | |
| 1411 | + |> Jpipe.custom (optionalField "Czechoslovak" (Jdec.null ()) ()) | |
| 1412 | + |> Jpipe.custom (optionalField "diagenesis" (Jdec.null ()) ()) | |
| 1413 | + |> Jpipe.custom (optionalField "dihexahedron" (Jdec.null ()) ()) | |
| 1414 | + |> Jpipe.custom (optionalField "dopester" (Jdec.null ()) ()) | |
| 1415 | + |> Jpipe.custom (optionalField "eumerism" (Jdec.null ()) ()) | |
| 1416 | + |> Jpipe.custom (optionalField "flyness" (Jdec.null ()) ()) | |
| 1417 | + |> Jpipe.custom (optionalField "fouler" (Jdec.null ()) ()) | |
| 1418 | + |> Jpipe.custom (optionalField "laudanosine" (Jdec.null ()) ()) | |
| 1419 | + |> Jpipe.custom (optionalField "Lingulidae" (Jdec.null ()) ()) | |
| 1420 | + |> Jpipe.custom (optionalField "minutary" (Jdec.null ()) ()) | |
| 1421 | + |> Jpipe.custom (optionalField "mitra" (Jdec.null ()) ()) | |
| 1422 | + |> Jpipe.custom (optionalField "opisthorchiasis" (Jdec.null ()) ()) | |
| 1423 | + |> Jpipe.custom (optionalField "pensively" (Jdec.null ()) ()) | |
| 1424 | + |> Jpipe.custom (optionalField "pubigerous" (Jdec.null ()) ()) | |
| 1425 | + |> Jpipe.custom (optionalField "rebellious" (Jdec.null ()) ()) | |
| 1426 | + |> Jpipe.custom (optionalField "recodify" (Jdec.null ()) ()) | |
| 1427 | + |> Jpipe.custom (optionalField "unpaced" (Jdec.null ()) ()) | |
| 1422 | 1428 | |
| 1423 | 1429 | encodeOutrivalClass : OutrivalClass -> Jenc.Value |
| 1424 | 1430 | encodeOutrivalClass x = |
| @@ -1500,31 +1506,31 @@ encodePiaculumElement x = case x of | ||
| 1500 | 1506 | piaculumClass : Jdec.Decoder PiaculumClass |
| 1501 | 1507 | piaculumClass = |
| 1502 | 1508 | Jdec.succeed PiaculumClass |
| 1503 | - |> Jpipe.optional "alada" (Jdec.nullable Jdec.int) Nothing | |
| 1504 | - |> Jpipe.optional "amphistomous" (Jdec.nullable Jdec.int) Nothing | |
| 1505 | - |> Jpipe.optional "boysenberry" (Jdec.nullable Jdec.int) Nothing | |
| 1506 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1507 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1508 | - |> Jpipe.optional "decardinalize" (Jdec.nullable Jdec.int) Nothing | |
| 1509 | - |> Jpipe.optional "discouragement" (Jdec.nullable Jdec.int) Nothing | |
| 1510 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1511 | - |> Jpipe.optional "doitrified" (Jdec.nullable Jdec.int) Nothing | |
| 1512 | - |> Jpipe.optional "hexaspermous" (Jdec.nullable Jdec.int) Nothing | |
| 1513 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1514 | - |> Jpipe.optional "insinking" (Jdec.nullable Jdec.int) Nothing | |
| 1515 | - |> Jpipe.optional "loathfulness" (Jdec.nullable Jdec.int) Nothing | |
| 1516 | - |> Jpipe.optional "miasmatical" (Jdec.nullable Jdec.int) Nothing | |
| 1517 | - |> Jpipe.optional "neurofibril" (Jdec.nullable Jdec.int) Nothing | |
| 1518 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1519 | - |> Jpipe.optional "phonendoscope" (Jdec.nullable Jdec.int) Nothing | |
| 1520 | - |> Jpipe.optional "pilferment" (Jdec.nullable Jdec.int) Nothing | |
| 1521 | - |> Jpipe.optional "predismissory" (Jdec.nullable Jdec.int) Nothing | |
| 1522 | - |> Jpipe.optional "preinscription" (Jdec.nullable Jdec.int) Nothing | |
| 1523 | - |> Jpipe.optional "quotative" (Jdec.nullable Jdec.int) Nothing | |
| 1524 | - |> Jpipe.optional "sienna" (Jdec.nullable Jdec.int) Nothing | |
| 1525 | - |> Jpipe.optional "thorax" (Jdec.nullable Jdec.int) Nothing | |
| 1526 | - |> Jpipe.optional "yachting" (Jdec.nullable Jdec.int) Nothing | |
| 1527 | - |> Jpipe.optional "Zipper" (Jdec.nullable Jdec.int) Nothing | |
| 1509 | + |> Jpipe.custom (optionalField "alada" (Jdec.nullable Jdec.int) Nothing) | |
| 1510 | + |> Jpipe.custom (optionalField "amphistomous" (Jdec.nullable Jdec.int) Nothing) | |
| 1511 | + |> Jpipe.custom (optionalField "boysenberry" (Jdec.nullable Jdec.int) Nothing) | |
| 1512 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1513 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1514 | + |> Jpipe.custom (optionalField "decardinalize" (Jdec.nullable Jdec.int) Nothing) | |
| 1515 | + |> Jpipe.custom (optionalField "discouragement" (Jdec.nullable Jdec.int) Nothing) | |
| 1516 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1517 | + |> Jpipe.custom (optionalField "doitrified" (Jdec.nullable Jdec.int) Nothing) | |
| 1518 | + |> Jpipe.custom (optionalField "hexaspermous" (Jdec.nullable Jdec.int) Nothing) | |
| 1519 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1520 | + |> Jpipe.custom (optionalField "insinking" (Jdec.nullable Jdec.int) Nothing) | |
| 1521 | + |> Jpipe.custom (optionalField "loathfulness" (Jdec.nullable Jdec.int) Nothing) | |
| 1522 | + |> Jpipe.custom (optionalField "miasmatical" (Jdec.nullable Jdec.int) Nothing) | |
| 1523 | + |> Jpipe.custom (optionalField "neurofibril" (Jdec.nullable Jdec.int) Nothing) | |
| 1524 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1525 | + |> Jpipe.custom (optionalField "phonendoscope" (Jdec.nullable Jdec.int) Nothing) | |
| 1526 | + |> Jpipe.custom (optionalField "pilferment" (Jdec.nullable Jdec.int) Nothing) | |
| 1527 | + |> Jpipe.custom (optionalField "predismissory" (Jdec.nullable Jdec.int) Nothing) | |
| 1528 | + |> Jpipe.custom (optionalField "preinscription" (Jdec.nullable Jdec.int) Nothing) | |
| 1529 | + |> Jpipe.custom (optionalField "quotative" (Jdec.nullable Jdec.int) Nothing) | |
| 1530 | + |> Jpipe.custom (optionalField "sienna" (Jdec.nullable Jdec.int) Nothing) | |
| 1531 | + |> Jpipe.custom (optionalField "thorax" (Jdec.nullable Jdec.int) Nothing) | |
| 1532 | + |> Jpipe.custom (optionalField "yachting" (Jdec.nullable Jdec.int) Nothing) | |
| 1533 | + |> Jpipe.custom (optionalField "Zipper" (Jdec.nullable Jdec.int) Nothing) | |
| 1528 | 1534 | |
| 1529 | 1535 | encodePiaculumClass : PiaculumClass -> Jenc.Value |
| 1530 | 1536 | encodePiaculumClass x = |
| @@ -1623,31 +1629,31 @@ encodePlectopterous x = case x of | ||
| 1623 | 1629 | pneumocele : Jdec.Decoder Pneumocele |
| 1624 | 1630 | pneumocele = |
| 1625 | 1631 | Jdec.succeed Pneumocele |
| 1626 | - |> Jpipe.optional "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1627 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1628 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1629 | - |> Jpipe.optional "cineolic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1630 | - |> Jpipe.optional "cobbly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1631 | - |> Jpipe.optional "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1632 | - |> Jpipe.optional "congregation" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1633 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1634 | - |> Jpipe.optional "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1635 | - |> Jpipe.optional "entophytal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1636 | - |> Jpipe.optional "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1637 | - |> Jpipe.optional "herem" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1638 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1639 | - |> Jpipe.optional "Koniga" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1640 | - |> Jpipe.optional "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1641 | - |> Jpipe.optional "Micky" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1642 | - |> Jpipe.optional "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1643 | - |> Jpipe.optional "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1644 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1645 | - |> Jpipe.optional "persuasively" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1646 | - |> Jpipe.optional "replaceable" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1647 | - |> Jpipe.optional "silex" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1648 | - |> Jpipe.optional "taillight" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1649 | - |> Jpipe.optional "unjealous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1650 | - |> Jpipe.optional "visitorial" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1632 | + |> Jpipe.custom (optionalField "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1633 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1634 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1635 | + |> Jpipe.custom (optionalField "cineolic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1636 | + |> Jpipe.custom (optionalField "cobbly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1637 | + |> Jpipe.custom (optionalField "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1638 | + |> Jpipe.custom (optionalField "congregation" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1639 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1640 | + |> Jpipe.custom (optionalField "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1641 | + |> Jpipe.custom (optionalField "entophytal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1642 | + |> Jpipe.custom (optionalField "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1643 | + |> Jpipe.custom (optionalField "herem" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1644 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1645 | + |> Jpipe.custom (optionalField "Koniga" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1646 | + |> Jpipe.custom (optionalField "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1647 | + |> Jpipe.custom (optionalField "Micky" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1648 | + |> Jpipe.custom (optionalField "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1649 | + |> Jpipe.custom (optionalField "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1650 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1651 | + |> Jpipe.custom (optionalField "persuasively" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1652 | + |> Jpipe.custom (optionalField "replaceable" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1653 | + |> Jpipe.custom (optionalField "silex" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1654 | + |> Jpipe.custom (optionalField "taillight" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1655 | + |> Jpipe.custom (optionalField "unjealous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1656 | + |> Jpipe.custom (optionalField "visitorial" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1651 | 1657 | |
| 1652 | 1658 | encodePneumocele : Pneumocele -> Jenc.Value |
| 1653 | 1659 | encodePneumocele x = |
| @@ -1722,26 +1728,26 @@ encodePotwhiskyElement x = case x of | ||
| 1722 | 1728 | potwhiskyClass : Jdec.Decoder PotwhiskyClass |
| 1723 | 1729 | potwhiskyClass = |
| 1724 | 1730 | Jdec.succeed PotwhiskyClass |
| 1725 | - |> Jpipe.optional "arciform" (Jdec.null ()) () | |
| 1726 | - |> Jpipe.optional "cresolin" (Jdec.null ()) () | |
| 1727 | - |> Jpipe.optional "disheartener" (Jdec.null ()) () | |
| 1728 | - |> Jpipe.optional "disproportionable" (Jdec.null ()) () | |
| 1729 | - |> Jpipe.optional "Euchorda" (Jdec.null ()) () | |
| 1730 | - |> Jpipe.optional "ferryway" (Jdec.null ()) () | |
| 1731 | - |> Jpipe.optional "filamentiferous" (Jdec.null ()) () | |
| 1732 | - |> Jpipe.optional "flemish" (Jdec.null ()) () | |
| 1733 | - |> Jpipe.optional "forgainst" (Jdec.null ()) () | |
| 1734 | - |> Jpipe.optional "grainering" (Jdec.null ()) () | |
| 1735 | - |> Jpipe.optional "irrevoluble" (Jdec.null ()) () | |
| 1736 | - |> Jpipe.optional "kindredship" (Jdec.null ()) () | |
| 1737 | - |> Jpipe.optional "pinguitudinous" (Jdec.null ()) () | |
| 1738 | - |> Jpipe.optional "simpletonic" (Jdec.null ()) () | |
| 1739 | - |> Jpipe.optional "singsong" (Jdec.null ()) () | |
| 1740 | - |> Jpipe.optional "submergement" (Jdec.null ()) () | |
| 1741 | - |> Jpipe.optional "supraoesophagal" (Jdec.null ()) () | |
| 1742 | - |> Jpipe.optional "thrashel" (Jdec.null ()) () | |
| 1743 | - |> Jpipe.optional "tyremesis" (Jdec.null ()) () | |
| 1744 | - |> Jpipe.optional "Yoruba" (Jdec.null ()) () | |
| 1731 | + |> Jpipe.custom (optionalField "arciform" (Jdec.null ()) ()) | |
| 1732 | + |> Jpipe.custom (optionalField "cresolin" (Jdec.null ()) ()) | |
| 1733 | + |> Jpipe.custom (optionalField "disheartener" (Jdec.null ()) ()) | |
| 1734 | + |> Jpipe.custom (optionalField "disproportionable" (Jdec.null ()) ()) | |
| 1735 | + |> Jpipe.custom (optionalField "Euchorda" (Jdec.null ()) ()) | |
| 1736 | + |> Jpipe.custom (optionalField "ferryway" (Jdec.null ()) ()) | |
| 1737 | + |> Jpipe.custom (optionalField "filamentiferous" (Jdec.null ()) ()) | |
| 1738 | + |> Jpipe.custom (optionalField "flemish" (Jdec.null ()) ()) | |
| 1739 | + |> Jpipe.custom (optionalField "forgainst" (Jdec.null ()) ()) | |
| 1740 | + |> Jpipe.custom (optionalField "grainering" (Jdec.null ()) ()) | |
| 1741 | + |> Jpipe.custom (optionalField "irrevoluble" (Jdec.null ()) ()) | |
| 1742 | + |> Jpipe.custom (optionalField "kindredship" (Jdec.null ()) ()) | |
| 1743 | + |> Jpipe.custom (optionalField "pinguitudinous" (Jdec.null ()) ()) | |
| 1744 | + |> Jpipe.custom (optionalField "simpletonic" (Jdec.null ()) ()) | |
| 1745 | + |> Jpipe.custom (optionalField "singsong" (Jdec.null ()) ()) | |
| 1746 | + |> Jpipe.custom (optionalField "submergement" (Jdec.null ()) ()) | |
| 1747 | + |> Jpipe.custom (optionalField "supraoesophagal" (Jdec.null ()) ()) | |
| 1748 | + |> Jpipe.custom (optionalField "thrashel" (Jdec.null ()) ()) | |
| 1749 | + |> Jpipe.custom (optionalField "tyremesis" (Jdec.null ()) ()) | |
| 1750 | + |> Jpipe.custom (optionalField "Yoruba" (Jdec.null ()) ()) | |
| 1745 | 1751 | |
| 1746 | 1752 | encodePotwhiskyClass : PotwhiskyClass -> Jenc.Value |
| 1747 | 1753 | encodePotwhiskyClass x = |
| @@ -1799,26 +1805,26 @@ encodePrefreshmanElement x = case x of | ||
| 1799 | 1805 | prefreshmanClass : Jdec.Decoder PrefreshmanClass |
| 1800 | 1806 | prefreshmanClass = |
| 1801 | 1807 | Jdec.succeed PrefreshmanClass |
| 1802 | - |> Jpipe.optional "azorubine" (Jdec.null ()) () | |
| 1803 | - |> Jpipe.optional "choroiditis" (Jdec.null ()) () | |
| 1804 | - |> Jpipe.optional "coagulatory" (Jdec.null ()) () | |
| 1805 | - |> Jpipe.optional "cyclorama" (Jdec.null ()) () | |
| 1806 | - |> Jpipe.optional "Dolphus" (Jdec.null ()) () | |
| 1807 | - |> Jpipe.optional "duckhearted" (Jdec.null ()) () | |
| 1808 | - |> Jpipe.optional "Ficus" (Jdec.null ()) () | |
| 1809 | - |> Jpipe.optional "Gemaric" (Jdec.null ()) () | |
| 1810 | - |> Jpipe.optional "jugation" (Jdec.null ()) () | |
| 1811 | - |> Jpipe.optional "myoliposis" (Jdec.null ()) () | |
| 1812 | - |> Jpipe.optional "nonnomination" (Jdec.null ()) () | |
| 1813 | - |> Jpipe.optional "palay" (Jdec.null ()) () | |
| 1814 | - |> Jpipe.optional "pentactinal" (Jdec.null ()) () | |
| 1815 | - |> Jpipe.optional "Phaet" (Jdec.null ()) () | |
| 1816 | - |> Jpipe.optional "piquant" (Jdec.null ()) () | |
| 1817 | - |> Jpipe.optional "registration" (Jdec.null ()) () | |
| 1818 | - |> Jpipe.optional "remancipation" (Jdec.null ()) () | |
| 1819 | - |> Jpipe.optional "scutatiform" (Jdec.null ()) () | |
| 1820 | - |> Jpipe.optional "theodolite" (Jdec.null ()) () | |
| 1821 | - |> Jpipe.optional "underward" (Jdec.null ()) () | |
| 1808 | + |> Jpipe.custom (optionalField "azorubine" (Jdec.null ()) ()) | |
| 1809 | + |> Jpipe.custom (optionalField "choroiditis" (Jdec.null ()) ()) | |
| 1810 | + |> Jpipe.custom (optionalField "coagulatory" (Jdec.null ()) ()) | |
| 1811 | + |> Jpipe.custom (optionalField "cyclorama" (Jdec.null ()) ()) | |
| 1812 | + |> Jpipe.custom (optionalField "Dolphus" (Jdec.null ()) ()) | |
| 1813 | + |> Jpipe.custom (optionalField "duckhearted" (Jdec.null ()) ()) | |
| 1814 | + |> Jpipe.custom (optionalField "Ficus" (Jdec.null ()) ()) | |
| 1815 | + |> Jpipe.custom (optionalField "Gemaric" (Jdec.null ()) ()) | |
| 1816 | + |> Jpipe.custom (optionalField "jugation" (Jdec.null ()) ()) | |
| 1817 | + |> Jpipe.custom (optionalField "myoliposis" (Jdec.null ()) ()) | |
| 1818 | + |> Jpipe.custom (optionalField "nonnomination" (Jdec.null ()) ()) | |
| 1819 | + |> Jpipe.custom (optionalField "palay" (Jdec.null ()) ()) | |
| 1820 | + |> Jpipe.custom (optionalField "pentactinal" (Jdec.null ()) ()) | |
| 1821 | + |> Jpipe.custom (optionalField "Phaet" (Jdec.null ()) ()) | |
| 1822 | + |> Jpipe.custom (optionalField "piquant" (Jdec.null ()) ()) | |
| 1823 | + |> Jpipe.custom (optionalField "registration" (Jdec.null ()) ()) | |
| 1824 | + |> Jpipe.custom (optionalField "remancipation" (Jdec.null ()) ()) | |
| 1825 | + |> Jpipe.custom (optionalField "scutatiform" (Jdec.null ()) ()) | |
| 1826 | + |> Jpipe.custom (optionalField "theodolite" (Jdec.null ()) ()) | |
| 1827 | + |> Jpipe.custom (optionalField "underward" (Jdec.null ()) ()) | |
| 1822 | 1828 | |
| 1823 | 1829 | encodePrefreshmanClass : PrefreshmanClass -> Jenc.Value |
| 1824 | 1830 | encodePrefreshmanClass x = |
Test case
2 generated files · +634 −622test/inputs/json/priority/combinations4.json
Melmarray-type-array--eed288b23e27 / QuickType.elm+317 −311
| @@ -712,6 +712,12 @@ type alias WrothyClass = | ||
| 712 | 712 | } |
| 713 | 713 | |
| 714 | 714 | -- decoders and encoders |
| 715 | +optionalField key decoder fallback = | |
| 716 | + Jdec.dict Jdec.value | |
| 717 | + |> Jdec.andThen (\m -> | |
| 718 | + case Dict.get key m of | |
| 719 | + Nothing -> Jdec.succeed fallback | |
| 720 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 715 | 721 | |
| 716 | 722 | quickTypeToString : QuickType -> String |
| 717 | 723 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -858,26 +864,26 @@ encodePulpitismElement x = case x of | ||
| 858 | 864 | pulpitismClass : Jdec.Decoder PulpitismClass |
| 859 | 865 | pulpitismClass = |
| 860 | 866 | Jdec.succeed PulpitismClass |
| 861 | - |> Jpipe.optional "abnet" (Jdec.null ()) () | |
| 862 | - |> Jpipe.optional "buckhorn" (Jdec.null ()) () | |
| 863 | - |> Jpipe.optional "calciform" (Jdec.null ()) () | |
| 864 | - |> Jpipe.optional "chelophore" (Jdec.null ()) () | |
| 865 | - |> Jpipe.optional "cogitation" (Jdec.null ()) () | |
| 866 | - |> Jpipe.optional "decreeable" (Jdec.null ()) () | |
| 867 | - |> Jpipe.optional "despicable" (Jdec.null ()) () | |
| 868 | - |> Jpipe.optional "isodiazo" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "jadedly" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "leptochlorite" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "nursling" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "palamedean" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "photoheliograph" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "pipewood" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "roberd" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "statable" (Jdec.null ()) () | |
| 877 | - |> Jpipe.optional "superassume" (Jdec.null ()) () | |
| 878 | - |> Jpipe.optional "syllabe" (Jdec.null ()) () | |
| 879 | - |> Jpipe.optional "toughhead" (Jdec.null ()) () | |
| 880 | - |> Jpipe.optional "underburn" (Jdec.null ()) () | |
| 867 | + |> Jpipe.custom (optionalField "abnet" (Jdec.null ()) ()) | |
| 868 | + |> Jpipe.custom (optionalField "buckhorn" (Jdec.null ()) ()) | |
| 869 | + |> Jpipe.custom (optionalField "calciform" (Jdec.null ()) ()) | |
| 870 | + |> Jpipe.custom (optionalField "chelophore" (Jdec.null ()) ()) | |
| 871 | + |> Jpipe.custom (optionalField "cogitation" (Jdec.null ()) ()) | |
| 872 | + |> Jpipe.custom (optionalField "decreeable" (Jdec.null ()) ()) | |
| 873 | + |> Jpipe.custom (optionalField "despicable" (Jdec.null ()) ()) | |
| 874 | + |> Jpipe.custom (optionalField "isodiazo" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "jadedly" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "leptochlorite" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "nursling" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "palamedean" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "photoheliograph" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "pipewood" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "roberd" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "statable" (Jdec.null ()) ()) | |
| 883 | + |> Jpipe.custom (optionalField "superassume" (Jdec.null ()) ()) | |
| 884 | + |> Jpipe.custom (optionalField "syllabe" (Jdec.null ()) ()) | |
| 885 | + |> Jpipe.custom (optionalField "toughhead" (Jdec.null ()) ()) | |
| 886 | + |> Jpipe.custom (optionalField "underburn" (Jdec.null ()) ()) | |
| 881 | 887 | |
| 882 | 888 | encodePulpitismClass : PulpitismClass -> Jenc.Value |
| 883 | 889 | encodePulpitismClass x = |
| @@ -919,26 +925,26 @@ encodePyodermiaElement x = case x of | ||
| 919 | 925 | pyodermiaClass : Jdec.Decoder PyodermiaClass |
| 920 | 926 | pyodermiaClass = |
| 921 | 927 | Jdec.succeed PyodermiaClass |
| 922 | - |> Jpipe.optional "aphoristically" (Jdec.null ()) () | |
| 923 | - |> Jpipe.optional "apophyllous" (Jdec.null ()) () | |
| 924 | - |> Jpipe.optional "cognize" (Jdec.null ()) () | |
| 925 | - |> Jpipe.optional "dermonosology" (Jdec.null ()) () | |
| 926 | - |> Jpipe.optional "Gyppo" (Jdec.null ()) () | |
| 927 | - |> Jpipe.optional "ither" (Jdec.null ()) () | |
| 928 | - |> Jpipe.optional "juglandaceous" (Jdec.null ()) () | |
| 929 | - |> Jpipe.optional "litho" (Jdec.null ()) () | |
| 930 | - |> Jpipe.optional "macropterous" (Jdec.null ()) () | |
| 931 | - |> Jpipe.optional "photographer" (Jdec.null ()) () | |
| 932 | - |> Jpipe.optional "romancing" (Jdec.null ()) () | |
| 933 | - |> Jpipe.optional "rumness" (Jdec.null ()) () | |
| 934 | - |> Jpipe.optional "somniloquist" (Jdec.null ()) () | |
| 935 | - |> Jpipe.optional "stressfully" (Jdec.null ()) () | |
| 936 | - |> Jpipe.optional "tactically" (Jdec.null ()) () | |
| 937 | - |> Jpipe.optional "tracheophony" (Jdec.null ()) () | |
| 938 | - |> Jpipe.optional "unappositely" (Jdec.null ()) () | |
| 939 | - |> Jpipe.optional "unclothedly" (Jdec.null ()) () | |
| 940 | - |> Jpipe.optional "unimplied" (Jdec.null ()) () | |
| 941 | - |> Jpipe.optional "unsyncopated" (Jdec.null ()) () | |
| 928 | + |> Jpipe.custom (optionalField "aphoristically" (Jdec.null ()) ()) | |
| 929 | + |> Jpipe.custom (optionalField "apophyllous" (Jdec.null ()) ()) | |
| 930 | + |> Jpipe.custom (optionalField "cognize" (Jdec.null ()) ()) | |
| 931 | + |> Jpipe.custom (optionalField "dermonosology" (Jdec.null ()) ()) | |
| 932 | + |> Jpipe.custom (optionalField "Gyppo" (Jdec.null ()) ()) | |
| 933 | + |> Jpipe.custom (optionalField "ither" (Jdec.null ()) ()) | |
| 934 | + |> Jpipe.custom (optionalField "juglandaceous" (Jdec.null ()) ()) | |
| 935 | + |> Jpipe.custom (optionalField "litho" (Jdec.null ()) ()) | |
| 936 | + |> Jpipe.custom (optionalField "macropterous" (Jdec.null ()) ()) | |
| 937 | + |> Jpipe.custom (optionalField "photographer" (Jdec.null ()) ()) | |
| 938 | + |> Jpipe.custom (optionalField "romancing" (Jdec.null ()) ()) | |
| 939 | + |> Jpipe.custom (optionalField "rumness" (Jdec.null ()) ()) | |
| 940 | + |> Jpipe.custom (optionalField "somniloquist" (Jdec.null ()) ()) | |
| 941 | + |> Jpipe.custom (optionalField "stressfully" (Jdec.null ()) ()) | |
| 942 | + |> Jpipe.custom (optionalField "tactically" (Jdec.null ()) ()) | |
| 943 | + |> Jpipe.custom (optionalField "tracheophony" (Jdec.null ()) ()) | |
| 944 | + |> Jpipe.custom (optionalField "unappositely" (Jdec.null ()) ()) | |
| 945 | + |> Jpipe.custom (optionalField "unclothedly" (Jdec.null ()) ()) | |
| 946 | + |> Jpipe.custom (optionalField "unimplied" (Jdec.null ()) ()) | |
| 947 | + |> Jpipe.custom (optionalField "unsyncopated" (Jdec.null ()) ()) | |
| 942 | 948 | |
| 943 | 949 | encodePyodermiaClass : PyodermiaClass -> Jenc.Value |
| 944 | 950 | encodePyodermiaClass x = |
| @@ -986,7 +992,7 @@ quebrachineClass = | ||
| 986 | 992 | |> Jpipe.required "Chirotherium" Jdec.int |
| 987 | 993 | |> Jpipe.required "disdiapason" Jdec.string |
| 988 | 994 | |> Jpipe.required "homocerc" Jdec.bool |
| 989 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 995 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 990 | 996 | |
| 991 | 997 | encodeQuebrachineClass : QuebrachineClass -> Jenc.Value |
| 992 | 998 | encodeQuebrachineClass x = |
| @@ -1027,31 +1033,31 @@ encodeRebarbative x = case x of | ||
| 1027 | 1033 | reimagine : Jdec.Decoder Reimagine |
| 1028 | 1034 | reimagine = |
| 1029 | 1035 | Jdec.succeed Reimagine |
| 1030 | - |> Jpipe.optional "adducible" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1031 | - |> Jpipe.optional "anabolin" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1032 | - |> Jpipe.optional "brainy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1033 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1034 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1035 | - |> Jpipe.optional "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1036 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1037 | - |> Jpipe.optional "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1038 | - |> Jpipe.optional "glaucine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1039 | - |> Jpipe.optional "grobianism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1040 | - |> Jpipe.optional "Hermo" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1041 | - |> Jpipe.optional "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1042 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1043 | - |> Jpipe.optional "icteroid" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1044 | - |> Jpipe.optional "immortal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1045 | - |> Jpipe.optional "impetulant" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1046 | - |> Jpipe.optional "irrigate" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1047 | - |> Jpipe.optional "myxedema" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1048 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1049 | - |> Jpipe.optional "onyx" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1050 | - |> Jpipe.optional "repasser" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1051 | - |> Jpipe.optional "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1052 | - |> Jpipe.optional "subdie" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1053 | - |> Jpipe.optional "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1054 | - |> Jpipe.optional "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1036 | + |> Jpipe.custom (optionalField "adducible" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1037 | + |> Jpipe.custom (optionalField "anabolin" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1038 | + |> Jpipe.custom (optionalField "brainy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1039 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1040 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1041 | + |> Jpipe.custom (optionalField "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1042 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1043 | + |> Jpipe.custom (optionalField "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1044 | + |> Jpipe.custom (optionalField "glaucine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1045 | + |> Jpipe.custom (optionalField "grobianism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1046 | + |> Jpipe.custom (optionalField "Hermo" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1047 | + |> Jpipe.custom (optionalField "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1048 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1049 | + |> Jpipe.custom (optionalField "icteroid" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1050 | + |> Jpipe.custom (optionalField "immortal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1051 | + |> Jpipe.custom (optionalField "impetulant" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1052 | + |> Jpipe.custom (optionalField "irrigate" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1053 | + |> Jpipe.custom (optionalField "myxedema" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1054 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1055 | + |> Jpipe.custom (optionalField "onyx" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1056 | + |> Jpipe.custom (optionalField "repasser" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1057 | + |> Jpipe.custom (optionalField "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1058 | + |> Jpipe.custom (optionalField "subdie" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1059 | + |> Jpipe.custom (optionalField "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1060 | + |> Jpipe.custom (optionalField "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1055 | 1061 | |
| 1056 | 1062 | encodeReimagine : Reimagine -> Jenc.Value |
| 1057 | 1063 | encodeReimagine x = |
| @@ -1173,26 +1179,26 @@ encodeRewriteElement x = case x of | ||
| 1173 | 1179 | rewriteClass : Jdec.Decoder RewriteClass |
| 1174 | 1180 | rewriteClass = |
| 1175 | 1181 | Jdec.succeed RewriteClass |
| 1176 | - |> Jpipe.optional "accountancy" (Jdec.null ()) () | |
| 1177 | - |> Jpipe.optional "cacotrophic" (Jdec.null ()) () | |
| 1178 | - |> Jpipe.optional "contest" (Jdec.null ()) () | |
| 1179 | - |> Jpipe.optional "couthily" (Jdec.null ()) () | |
| 1180 | - |> Jpipe.optional "falculate" (Jdec.null ()) () | |
| 1181 | - |> Jpipe.optional "foreseize" (Jdec.null ()) () | |
| 1182 | - |> Jpipe.optional "Hyades" (Jdec.null ()) () | |
| 1183 | - |> Jpipe.optional "lemnad" (Jdec.null ()) () | |
| 1184 | - |> Jpipe.optional "monotheistically" (Jdec.null ()) () | |
| 1185 | - |> Jpipe.optional "nonflying" (Jdec.null ()) () | |
| 1186 | - |> Jpipe.optional "Ptenoglossa" (Jdec.null ()) () | |
| 1187 | - |> Jpipe.optional "repatch" (Jdec.null ()) () | |
| 1188 | - |> Jpipe.optional "rodman" (Jdec.null ()) () | |
| 1189 | - |> Jpipe.optional "strung" (Jdec.null ()) () | |
| 1190 | - |> Jpipe.optional "titmal" (Jdec.null ()) () | |
| 1191 | - |> Jpipe.optional "twalpennyworth" (Jdec.null ()) () | |
| 1192 | - |> Jpipe.optional "unblamable" (Jdec.null ()) () | |
| 1193 | - |> Jpipe.optional "vertical" (Jdec.null ()) () | |
| 1194 | - |> Jpipe.optional "Whiggification" (Jdec.null ()) () | |
| 1195 | - |> Jpipe.optional "yardman" (Jdec.null ()) () | |
| 1182 | + |> Jpipe.custom (optionalField "accountancy" (Jdec.null ()) ()) | |
| 1183 | + |> Jpipe.custom (optionalField "cacotrophic" (Jdec.null ()) ()) | |
| 1184 | + |> Jpipe.custom (optionalField "contest" (Jdec.null ()) ()) | |
| 1185 | + |> Jpipe.custom (optionalField "couthily" (Jdec.null ()) ()) | |
| 1186 | + |> Jpipe.custom (optionalField "falculate" (Jdec.null ()) ()) | |
| 1187 | + |> Jpipe.custom (optionalField "foreseize" (Jdec.null ()) ()) | |
| 1188 | + |> Jpipe.custom (optionalField "Hyades" (Jdec.null ()) ()) | |
| 1189 | + |> Jpipe.custom (optionalField "lemnad" (Jdec.null ()) ()) | |
| 1190 | + |> Jpipe.custom (optionalField "monotheistically" (Jdec.null ()) ()) | |
| 1191 | + |> Jpipe.custom (optionalField "nonflying" (Jdec.null ()) ()) | |
| 1192 | + |> Jpipe.custom (optionalField "Ptenoglossa" (Jdec.null ()) ()) | |
| 1193 | + |> Jpipe.custom (optionalField "repatch" (Jdec.null ()) ()) | |
| 1194 | + |> Jpipe.custom (optionalField "rodman" (Jdec.null ()) ()) | |
| 1195 | + |> Jpipe.custom (optionalField "strung" (Jdec.null ()) ()) | |
| 1196 | + |> Jpipe.custom (optionalField "titmal" (Jdec.null ()) ()) | |
| 1197 | + |> Jpipe.custom (optionalField "twalpennyworth" (Jdec.null ()) ()) | |
| 1198 | + |> Jpipe.custom (optionalField "unblamable" (Jdec.null ()) ()) | |
| 1199 | + |> Jpipe.custom (optionalField "vertical" (Jdec.null ()) ()) | |
| 1200 | + |> Jpipe.custom (optionalField "Whiggification" (Jdec.null ()) ()) | |
| 1201 | + |> Jpipe.custom (optionalField "yardman" (Jdec.null ()) ()) | |
| 1196 | 1202 | |
| 1197 | 1203 | encodeRewriteClass : RewriteClass -> Jenc.Value |
| 1198 | 1204 | encodeRewriteClass x = |
| @@ -1248,26 +1254,26 @@ encodeSantirElement x = case x of | ||
| 1248 | 1254 | santirClass : Jdec.Decoder SantirClass |
| 1249 | 1255 | santirClass = |
| 1250 | 1256 | Jdec.succeed SantirClass |
| 1251 | - |> Jpipe.optional "admiredly" (Jdec.null ()) () | |
| 1252 | - |> Jpipe.optional "demicaponier" (Jdec.null ()) () | |
| 1253 | - |> Jpipe.optional "epitympanic" (Jdec.null ()) () | |
| 1254 | - |> Jpipe.optional "investitor" (Jdec.null ()) () | |
| 1255 | - |> Jpipe.optional "lupiform" (Jdec.null ()) () | |
| 1256 | - |> Jpipe.optional "monoflagellate" (Jdec.null ()) () | |
| 1257 | - |> Jpipe.optional "paleoethnic" (Jdec.null ()) () | |
| 1258 | - |> Jpipe.optional "prediscountable" (Jdec.null ()) () | |
| 1259 | - |> Jpipe.optional "rhetoricals" (Jdec.null ()) () | |
| 1260 | - |> Jpipe.optional "roomth" (Jdec.null ()) () | |
| 1261 | - |> Jpipe.optional "saccharose" (Jdec.null ()) () | |
| 1262 | - |> Jpipe.optional "septonasal" (Jdec.null ()) () | |
| 1263 | - |> Jpipe.optional "serpenticide" (Jdec.null ()) () | |
| 1264 | - |> Jpipe.optional "setarious" (Jdec.null ()) () | |
| 1265 | - |> Jpipe.optional "spaework" (Jdec.null ()) () | |
| 1266 | - |> Jpipe.optional "stylite" (Jdec.null ()) () | |
| 1267 | - |> Jpipe.optional "Suessiones" (Jdec.null ()) () | |
| 1268 | - |> Jpipe.optional "timelily" (Jdec.null ()) () | |
| 1269 | - |> Jpipe.optional "unprofaned" (Jdec.null ()) () | |
| 1270 | - |> Jpipe.optional "vorticular" (Jdec.null ()) () | |
| 1257 | + |> Jpipe.custom (optionalField "admiredly" (Jdec.null ()) ()) | |
| 1258 | + |> Jpipe.custom (optionalField "demicaponier" (Jdec.null ()) ()) | |
| 1259 | + |> Jpipe.custom (optionalField "epitympanic" (Jdec.null ()) ()) | |
| 1260 | + |> Jpipe.custom (optionalField "investitor" (Jdec.null ()) ()) | |
| 1261 | + |> Jpipe.custom (optionalField "lupiform" (Jdec.null ()) ()) | |
| 1262 | + |> Jpipe.custom (optionalField "monoflagellate" (Jdec.null ()) ()) | |
| 1263 | + |> Jpipe.custom (optionalField "paleoethnic" (Jdec.null ()) ()) | |
| 1264 | + |> Jpipe.custom (optionalField "prediscountable" (Jdec.null ()) ()) | |
| 1265 | + |> Jpipe.custom (optionalField "rhetoricals" (Jdec.null ()) ()) | |
| 1266 | + |> Jpipe.custom (optionalField "roomth" (Jdec.null ()) ()) | |
| 1267 | + |> Jpipe.custom (optionalField "saccharose" (Jdec.null ()) ()) | |
| 1268 | + |> Jpipe.custom (optionalField "septonasal" (Jdec.null ()) ()) | |
| 1269 | + |> Jpipe.custom (optionalField "serpenticide" (Jdec.null ()) ()) | |
| 1270 | + |> Jpipe.custom (optionalField "setarious" (Jdec.null ()) ()) | |
| 1271 | + |> Jpipe.custom (optionalField "spaework" (Jdec.null ()) ()) | |
| 1272 | + |> Jpipe.custom (optionalField "stylite" (Jdec.null ()) ()) | |
| 1273 | + |> Jpipe.custom (optionalField "Suessiones" (Jdec.null ()) ()) | |
| 1274 | + |> Jpipe.custom (optionalField "timelily" (Jdec.null ()) ()) | |
| 1275 | + |> Jpipe.custom (optionalField "unprofaned" (Jdec.null ()) ()) | |
| 1276 | + |> Jpipe.custom (optionalField "vorticular" (Jdec.null ()) ()) | |
| 1271 | 1277 | |
| 1272 | 1278 | encodeSantirClass : SantirClass -> Jenc.Value |
| 1273 | 1279 | encodeSantirClass x = |
| @@ -1323,31 +1329,31 @@ encodeSaxtenElement x = case x of | ||
| 1323 | 1329 | saxtenClass : Jdec.Decoder SaxtenClass |
| 1324 | 1330 | saxtenClass = |
| 1325 | 1331 | Jdec.succeed SaxtenClass |
| 1326 | - |> Jpipe.optional "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1327 | - |> Jpipe.optional "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1328 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1329 | - |> Jpipe.optional "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1330 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1331 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1332 | - |> Jpipe.optional "flix" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1333 | - |> Jpipe.optional "germanely" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1334 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1335 | - |> Jpipe.optional "inhume" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1336 | - |> Jpipe.optional "lepidote" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1337 | - |> Jpipe.optional "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1338 | - |> Jpipe.optional "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1339 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1340 | - |> Jpipe.optional "nondeist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1341 | - |> Jpipe.optional "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1342 | - |> Jpipe.optional "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1343 | - |> Jpipe.optional "sancyite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1344 | - |> Jpipe.optional "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1345 | - |> Jpipe.optional "tibiad" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1346 | - |> Jpipe.optional "transonic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1347 | - |> Jpipe.optional "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1348 | - |> Jpipe.optional "trunchman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1349 | - |> Jpipe.optional "urger" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1350 | - |> Jpipe.optional "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1332 | + |> Jpipe.custom (optionalField "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1333 | + |> Jpipe.custom (optionalField "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1334 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1335 | + |> Jpipe.custom (optionalField "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1336 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1337 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1338 | + |> Jpipe.custom (optionalField "flix" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1339 | + |> Jpipe.custom (optionalField "germanely" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1340 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1341 | + |> Jpipe.custom (optionalField "inhume" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1342 | + |> Jpipe.custom (optionalField "lepidote" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1343 | + |> Jpipe.custom (optionalField "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1344 | + |> Jpipe.custom (optionalField "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1345 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1346 | + |> Jpipe.custom (optionalField "nondeist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1347 | + |> Jpipe.custom (optionalField "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1348 | + |> Jpipe.custom (optionalField "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1349 | + |> Jpipe.custom (optionalField "sancyite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1350 | + |> Jpipe.custom (optionalField "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1351 | + |> Jpipe.custom (optionalField "tibiad" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1352 | + |> Jpipe.custom (optionalField "transonic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1353 | + |> Jpipe.custom (optionalField "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1354 | + |> Jpipe.custom (optionalField "trunchman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1355 | + |> Jpipe.custom (optionalField "urger" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1356 | + |> Jpipe.custom (optionalField "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1351 | 1357 | |
| 1352 | 1358 | encodeSaxtenClass : SaxtenClass -> Jenc.Value |
| 1353 | 1359 | encodeSaxtenClass x = |
| @@ -1382,26 +1388,26 @@ encodeSaxtenClass x = | ||
| 1382 | 1388 | scatty : Jdec.Decoder Scatty |
| 1383 | 1389 | scatty = |
| 1384 | 1390 | Jdec.succeed Scatty |
| 1385 | - |> Jpipe.optional "aeriferous" (Jdec.null ()) () | |
| 1386 | - |> Jpipe.optional "antical" (Jdec.null ()) () | |
| 1387 | - |> Jpipe.optional "antighostism" (Jdec.null ()) () | |
| 1388 | - |> Jpipe.optional "arcanum" (Jdec.null ()) () | |
| 1389 | - |> Jpipe.optional "autotrophy" (Jdec.null ()) () | |
| 1390 | - |> Jpipe.optional "baronial" (Jdec.null ()) () | |
| 1391 | - |> Jpipe.optional "caffeine" (Jdec.null ()) () | |
| 1392 | - |> Jpipe.optional "gorgoniacean" (Jdec.null ()) () | |
| 1393 | - |> Jpipe.optional "heroical" (Jdec.null ()) () | |
| 1394 | - |> Jpipe.optional "hydropical" (Jdec.null ()) () | |
| 1395 | - |> Jpipe.optional "mechanology" (Jdec.null ()) () | |
| 1396 | - |> Jpipe.optional "musicopoetic" (Jdec.null ()) () | |
| 1397 | - |> Jpipe.optional "officiality" (Jdec.null ()) () | |
| 1398 | - |> Jpipe.optional "oftentimes" (Jdec.null ()) () | |
| 1399 | - |> Jpipe.optional "ophthalmotonometer" (Jdec.null ()) () | |
| 1400 | - |> Jpipe.optional "reflectively" (Jdec.null ()) () | |
| 1401 | - |> Jpipe.optional "springer" (Jdec.null ()) () | |
| 1402 | - |> Jpipe.optional "Tabasco" (Jdec.null ()) () | |
| 1403 | - |> Jpipe.optional "teleianthous" (Jdec.null ()) () | |
| 1404 | - |> Jpipe.optional "uncombated" (Jdec.null ()) () | |
| 1391 | + |> Jpipe.custom (optionalField "aeriferous" (Jdec.null ()) ()) | |
| 1392 | + |> Jpipe.custom (optionalField "antical" (Jdec.null ()) ()) | |
| 1393 | + |> Jpipe.custom (optionalField "antighostism" (Jdec.null ()) ()) | |
| 1394 | + |> Jpipe.custom (optionalField "arcanum" (Jdec.null ()) ()) | |
| 1395 | + |> Jpipe.custom (optionalField "autotrophy" (Jdec.null ()) ()) | |
| 1396 | + |> Jpipe.custom (optionalField "baronial" (Jdec.null ()) ()) | |
| 1397 | + |> Jpipe.custom (optionalField "caffeine" (Jdec.null ()) ()) | |
| 1398 | + |> Jpipe.custom (optionalField "gorgoniacean" (Jdec.null ()) ()) | |
| 1399 | + |> Jpipe.custom (optionalField "heroical" (Jdec.null ()) ()) | |
| 1400 | + |> Jpipe.custom (optionalField "hydropical" (Jdec.null ()) ()) | |
| 1401 | + |> Jpipe.custom (optionalField "mechanology" (Jdec.null ()) ()) | |
| 1402 | + |> Jpipe.custom (optionalField "musicopoetic" (Jdec.null ()) ()) | |
| 1403 | + |> Jpipe.custom (optionalField "officiality" (Jdec.null ()) ()) | |
| 1404 | + |> Jpipe.custom (optionalField "oftentimes" (Jdec.null ()) ()) | |
| 1405 | + |> Jpipe.custom (optionalField "ophthalmotonometer" (Jdec.null ()) ()) | |
| 1406 | + |> Jpipe.custom (optionalField "reflectively" (Jdec.null ()) ()) | |
| 1407 | + |> Jpipe.custom (optionalField "springer" (Jdec.null ()) ()) | |
| 1408 | + |> Jpipe.custom (optionalField "Tabasco" (Jdec.null ()) ()) | |
| 1409 | + |> Jpipe.custom (optionalField "teleianthous" (Jdec.null ()) ()) | |
| 1410 | + |> Jpipe.custom (optionalField "uncombated" (Jdec.null ()) ()) | |
| 1405 | 1411 | |
| 1406 | 1412 | encodeScatty : Scatty -> Jenc.Value |
| 1407 | 1413 | encodeScatty x = |
| @@ -1497,26 +1503,26 @@ encodeSisteringElement x = case x of | ||
| 1497 | 1503 | sisteringClass : Jdec.Decoder SisteringClass |
| 1498 | 1504 | sisteringClass = |
| 1499 | 1505 | Jdec.succeed SisteringClass |
| 1500 | - |> Jpipe.optional "amphicarpic" (Jdec.null ()) () | |
| 1501 | - |> Jpipe.optional "Chianti" (Jdec.null ()) () | |
| 1502 | - |> Jpipe.optional "frigorific" (Jdec.null ()) () | |
| 1503 | - |> Jpipe.optional "Haplomi" (Jdec.null ()) () | |
| 1504 | - |> Jpipe.optional "hyperkinesis" (Jdec.null ()) () | |
| 1505 | - |> Jpipe.optional "laudable" (Jdec.null ()) () | |
| 1506 | - |> Jpipe.optional "madwoman" (Jdec.null ()) () | |
| 1507 | - |> Jpipe.optional "maimedly" (Jdec.null ()) () | |
| 1508 | - |> Jpipe.optional "Micropterygidae" (Jdec.null ()) () | |
| 1509 | - |> Jpipe.optional "microrhabdus" (Jdec.null ()) () | |
| 1510 | - |> Jpipe.optional "nondense" (Jdec.null ()) () | |
| 1511 | - |> Jpipe.optional "phlebemphraxis" (Jdec.null ()) () | |
| 1512 | - |> Jpipe.optional "redsear" (Jdec.null ()) () | |
| 1513 | - |> Jpipe.optional "schismatical" (Jdec.null ()) () | |
| 1514 | - |> Jpipe.optional "tartryl" (Jdec.null ()) () | |
| 1515 | - |> Jpipe.optional "unabhorred" (Jdec.null ()) () | |
| 1516 | - |> Jpipe.optional "undeliberateness" (Jdec.null ()) () | |
| 1517 | - |> Jpipe.optional "unmixable" (Jdec.null ()) () | |
| 1518 | - |> Jpipe.optional "untruckling" (Jdec.null ()) () | |
| 1519 | - |> Jpipe.optional "vineal" (Jdec.null ()) () | |
| 1506 | + |> Jpipe.custom (optionalField "amphicarpic" (Jdec.null ()) ()) | |
| 1507 | + |> Jpipe.custom (optionalField "Chianti" (Jdec.null ()) ()) | |
| 1508 | + |> Jpipe.custom (optionalField "frigorific" (Jdec.null ()) ()) | |
| 1509 | + |> Jpipe.custom (optionalField "Haplomi" (Jdec.null ()) ()) | |
| 1510 | + |> Jpipe.custom (optionalField "hyperkinesis" (Jdec.null ()) ()) | |
| 1511 | + |> Jpipe.custom (optionalField "laudable" (Jdec.null ()) ()) | |
| 1512 | + |> Jpipe.custom (optionalField "madwoman" (Jdec.null ()) ()) | |
| 1513 | + |> Jpipe.custom (optionalField "maimedly" (Jdec.null ()) ()) | |
| 1514 | + |> Jpipe.custom (optionalField "Micropterygidae" (Jdec.null ()) ()) | |
| 1515 | + |> Jpipe.custom (optionalField "microrhabdus" (Jdec.null ()) ()) | |
| 1516 | + |> Jpipe.custom (optionalField "nondense" (Jdec.null ()) ()) | |
| 1517 | + |> Jpipe.custom (optionalField "phlebemphraxis" (Jdec.null ()) ()) | |
| 1518 | + |> Jpipe.custom (optionalField "redsear" (Jdec.null ()) ()) | |
| 1519 | + |> Jpipe.custom (optionalField "schismatical" (Jdec.null ()) ()) | |
| 1520 | + |> Jpipe.custom (optionalField "tartryl" (Jdec.null ()) ()) | |
| 1521 | + |> Jpipe.custom (optionalField "unabhorred" (Jdec.null ()) ()) | |
| 1522 | + |> Jpipe.custom (optionalField "undeliberateness" (Jdec.null ()) ()) | |
| 1523 | + |> Jpipe.custom (optionalField "unmixable" (Jdec.null ()) ()) | |
| 1524 | + |> Jpipe.custom (optionalField "untruckling" (Jdec.null ()) ()) | |
| 1525 | + |> Jpipe.custom (optionalField "vineal" (Jdec.null ()) ()) | |
| 1520 | 1526 | |
| 1521 | 1527 | encodeSisteringClass : SisteringClass -> Jenc.Value |
| 1522 | 1528 | encodeSisteringClass x = |
| @@ -1546,31 +1552,31 @@ encodeSisteringClass x = | ||
| 1546 | 1552 | staghunting : Jdec.Decoder Staghunting |
| 1547 | 1553 | staghunting = |
| 1548 | 1554 | Jdec.succeed Staghunting |
| 1549 | - |> Jpipe.optional "calorimetric" (Jdec.nullable Jdec.int) Nothing | |
| 1550 | - |> Jpipe.optional "canid" (Jdec.nullable Jdec.int) Nothing | |
| 1551 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1552 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1553 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1554 | - |> Jpipe.optional "ditriglyphic" (Jdec.nullable Jdec.int) Nothing | |
| 1555 | - |> Jpipe.optional "floriferousness" (Jdec.nullable Jdec.int) Nothing | |
| 1556 | - |> Jpipe.optional "gamelike" (Jdec.nullable Jdec.int) Nothing | |
| 1557 | - |> Jpipe.optional "grig" (Jdec.nullable Jdec.int) Nothing | |
| 1558 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1559 | - |> Jpipe.optional "interloan" (Jdec.nullable Jdec.int) Nothing | |
| 1560 | - |> Jpipe.optional "lithotomy" (Jdec.nullable Jdec.int) Nothing | |
| 1561 | - |> Jpipe.optional "loric" (Jdec.nullable Jdec.int) Nothing | |
| 1562 | - |> Jpipe.optional "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing | |
| 1563 | - |> Jpipe.optional "membranogenic" (Jdec.nullable Jdec.int) Nothing | |
| 1564 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1565 | - |> Jpipe.optional "overtrump" (Jdec.nullable Jdec.int) Nothing | |
| 1566 | - |> Jpipe.optional "scotino" (Jdec.nullable Jdec.int) Nothing | |
| 1567 | - |> Jpipe.optional "seasonable" (Jdec.nullable Jdec.int) Nothing | |
| 1568 | - |> Jpipe.optional "sephen" (Jdec.nullable Jdec.int) Nothing | |
| 1569 | - |> Jpipe.optional "stigmarioid" (Jdec.nullable Jdec.int) Nothing | |
| 1570 | - |> Jpipe.optional "tired" (Jdec.nullable Jdec.int) Nothing | |
| 1571 | - |> Jpipe.optional "trifid" (Jdec.nullable Jdec.int) Nothing | |
| 1572 | - |> Jpipe.optional "undefeatedly" (Jdec.nullable Jdec.int) Nothing | |
| 1573 | - |> Jpipe.optional "ungirlish" (Jdec.nullable Jdec.int) Nothing | |
| 1555 | + |> Jpipe.custom (optionalField "calorimetric" (Jdec.nullable Jdec.int) Nothing) | |
| 1556 | + |> Jpipe.custom (optionalField "canid" (Jdec.nullable Jdec.int) Nothing) | |
| 1557 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1558 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1559 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1560 | + |> Jpipe.custom (optionalField "ditriglyphic" (Jdec.nullable Jdec.int) Nothing) | |
| 1561 | + |> Jpipe.custom (optionalField "floriferousness" (Jdec.nullable Jdec.int) Nothing) | |
| 1562 | + |> Jpipe.custom (optionalField "gamelike" (Jdec.nullable Jdec.int) Nothing) | |
| 1563 | + |> Jpipe.custom (optionalField "grig" (Jdec.nullable Jdec.int) Nothing) | |
| 1564 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1565 | + |> Jpipe.custom (optionalField "interloan" (Jdec.nullable Jdec.int) Nothing) | |
| 1566 | + |> Jpipe.custom (optionalField "lithotomy" (Jdec.nullable Jdec.int) Nothing) | |
| 1567 | + |> Jpipe.custom (optionalField "loric" (Jdec.nullable Jdec.int) Nothing) | |
| 1568 | + |> Jpipe.custom (optionalField "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing) | |
| 1569 | + |> Jpipe.custom (optionalField "membranogenic" (Jdec.nullable Jdec.int) Nothing) | |
| 1570 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1571 | + |> Jpipe.custom (optionalField "overtrump" (Jdec.nullable Jdec.int) Nothing) | |
| 1572 | + |> Jpipe.custom (optionalField "scotino" (Jdec.nullable Jdec.int) Nothing) | |
| 1573 | + |> Jpipe.custom (optionalField "seasonable" (Jdec.nullable Jdec.int) Nothing) | |
| 1574 | + |> Jpipe.custom (optionalField "sephen" (Jdec.nullable Jdec.int) Nothing) | |
| 1575 | + |> Jpipe.custom (optionalField "stigmarioid" (Jdec.nullable Jdec.int) Nothing) | |
| 1576 | + |> Jpipe.custom (optionalField "tired" (Jdec.nullable Jdec.int) Nothing) | |
| 1577 | + |> Jpipe.custom (optionalField "trifid" (Jdec.nullable Jdec.int) Nothing) | |
| 1578 | + |> Jpipe.custom (optionalField "undefeatedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1579 | + |> Jpipe.custom (optionalField "ungirlish" (Jdec.nullable Jdec.int) Nothing) | |
| 1574 | 1580 | |
| 1575 | 1581 | encodeStaghunting : Staghunting -> Jenc.Value |
| 1576 | 1582 | encodeStaghunting x = |
| @@ -1655,31 +1661,31 @@ encodeStrenuosityElement x = case x of | ||
| 1655 | 1661 | strenuosityClass : Jdec.Decoder StrenuosityClass |
| 1656 | 1662 | strenuosityClass = |
| 1657 | 1663 | Jdec.succeed StrenuosityClass |
| 1658 | - |> Jpipe.optional "bliss" (Jdec.nullable Jdec.int) Nothing | |
| 1659 | - |> Jpipe.optional "buccate" (Jdec.nullable Jdec.int) Nothing | |
| 1660 | - |> Jpipe.optional "bulletproof" (Jdec.nullable Jdec.int) Nothing | |
| 1661 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1662 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1663 | - |> Jpipe.optional "crumblingness" (Jdec.nullable Jdec.int) Nothing | |
| 1664 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1665 | - |> Jpipe.optional "engagedly" (Jdec.nullable Jdec.int) Nothing | |
| 1666 | - |> Jpipe.optional "fightable" (Jdec.nullable Jdec.int) Nothing | |
| 1667 | - |> Jpipe.optional "hoariness" (Jdec.nullable Jdec.int) Nothing | |
| 1668 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1669 | - |> Jpipe.optional "hypopodium" (Jdec.nullable Jdec.int) Nothing | |
| 1670 | - |> Jpipe.optional "luxurist" (Jdec.nullable Jdec.int) Nothing | |
| 1671 | - |> Jpipe.optional "mechanician" (Jdec.nullable Jdec.int) Nothing | |
| 1672 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1673 | - |> Jpipe.optional "Onopordon" (Jdec.nullable Jdec.int) Nothing | |
| 1674 | - |> Jpipe.optional "podgily" (Jdec.nullable Jdec.int) Nothing | |
| 1675 | - |> Jpipe.optional "reformableness" (Jdec.nullable Jdec.int) Nothing | |
| 1676 | - |> Jpipe.optional "scatterbrains" (Jdec.nullable Jdec.int) Nothing | |
| 1677 | - |> Jpipe.optional "seminuria" (Jdec.nullable Jdec.int) Nothing | |
| 1678 | - |> Jpipe.optional "Sodomite" (Jdec.nullable Jdec.int) Nothing | |
| 1679 | - |> Jpipe.optional "tramp" (Jdec.nullable Jdec.int) Nothing | |
| 1680 | - |> Jpipe.optional "undueness" (Jdec.nullable Jdec.int) Nothing | |
| 1681 | - |> Jpipe.optional "worthily" (Jdec.nullable Jdec.int) Nothing | |
| 1682 | - |> Jpipe.optional "Yankeeist" (Jdec.nullable Jdec.int) Nothing | |
| 1664 | + |> Jpipe.custom (optionalField "bliss" (Jdec.nullable Jdec.int) Nothing) | |
| 1665 | + |> Jpipe.custom (optionalField "buccate" (Jdec.nullable Jdec.int) Nothing) | |
| 1666 | + |> Jpipe.custom (optionalField "bulletproof" (Jdec.nullable Jdec.int) Nothing) | |
| 1667 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1668 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1669 | + |> Jpipe.custom (optionalField "crumblingness" (Jdec.nullable Jdec.int) Nothing) | |
| 1670 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1671 | + |> Jpipe.custom (optionalField "engagedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1672 | + |> Jpipe.custom (optionalField "fightable" (Jdec.nullable Jdec.int) Nothing) | |
| 1673 | + |> Jpipe.custom (optionalField "hoariness" (Jdec.nullable Jdec.int) Nothing) | |
| 1674 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1675 | + |> Jpipe.custom (optionalField "hypopodium" (Jdec.nullable Jdec.int) Nothing) | |
| 1676 | + |> Jpipe.custom (optionalField "luxurist" (Jdec.nullable Jdec.int) Nothing) | |
| 1677 | + |> Jpipe.custom (optionalField "mechanician" (Jdec.nullable Jdec.int) Nothing) | |
| 1678 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1679 | + |> Jpipe.custom (optionalField "Onopordon" (Jdec.nullable Jdec.int) Nothing) | |
| 1680 | + |> Jpipe.custom (optionalField "podgily" (Jdec.nullable Jdec.int) Nothing) | |
| 1681 | + |> Jpipe.custom (optionalField "reformableness" (Jdec.nullable Jdec.int) Nothing) | |
| 1682 | + |> Jpipe.custom (optionalField "scatterbrains" (Jdec.nullable Jdec.int) Nothing) | |
| 1683 | + |> Jpipe.custom (optionalField "seminuria" (Jdec.nullable Jdec.int) Nothing) | |
| 1684 | + |> Jpipe.custom (optionalField "Sodomite" (Jdec.nullable Jdec.int) Nothing) | |
| 1685 | + |> Jpipe.custom (optionalField "tramp" (Jdec.nullable Jdec.int) Nothing) | |
| 1686 | + |> Jpipe.custom (optionalField "undueness" (Jdec.nullable Jdec.int) Nothing) | |
| 1687 | + |> Jpipe.custom (optionalField "worthily" (Jdec.nullable Jdec.int) Nothing) | |
| 1688 | + |> Jpipe.custom (optionalField "Yankeeist" (Jdec.nullable Jdec.int) Nothing) | |
| 1683 | 1689 | |
| 1684 | 1690 | encodeStrenuosityClass : StrenuosityClass -> Jenc.Value |
| 1685 | 1691 | encodeStrenuosityClass x = |
| @@ -1778,31 +1784,31 @@ encodeTruantcyElement x = case x of | ||
| 1778 | 1784 | truantcyClass : Jdec.Decoder TruantcyClass |
| 1779 | 1785 | truantcyClass = |
| 1780 | 1786 | Jdec.succeed TruantcyClass |
| 1781 | - |> Jpipe.optional "alfiona" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1782 | - |> Jpipe.optional "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1783 | - |> Jpipe.optional "bungey" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1784 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1785 | - |> Jpipe.optional "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1786 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1787 | - |> Jpipe.optional "chorology" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1788 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1789 | - |> Jpipe.optional "enmarble" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1790 | - |> Jpipe.optional "Epeira" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1791 | - |> Jpipe.optional "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1792 | - |> Jpipe.optional "germination" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1793 | - |> Jpipe.optional "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1794 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1795 | - |> Jpipe.optional "lev" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1796 | - |> Jpipe.optional "mouthing" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1797 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1798 | - |> Jpipe.optional "philliloo" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1799 | - |> Jpipe.optional "planetal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1800 | - |> Jpipe.optional "poney" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1801 | - |> Jpipe.optional "punctualist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1802 | - |> Jpipe.optional "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1803 | - |> Jpipe.optional "skelder" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1804 | - |> Jpipe.optional "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1805 | - |> Jpipe.optional "Yuman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1787 | + |> Jpipe.custom (optionalField "alfiona" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1788 | + |> Jpipe.custom (optionalField "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1789 | + |> Jpipe.custom (optionalField "bungey" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1790 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1791 | + |> Jpipe.custom (optionalField "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1792 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1793 | + |> Jpipe.custom (optionalField "chorology" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1794 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1795 | + |> Jpipe.custom (optionalField "enmarble" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1796 | + |> Jpipe.custom (optionalField "Epeira" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1797 | + |> Jpipe.custom (optionalField "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1798 | + |> Jpipe.custom (optionalField "germination" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1799 | + |> Jpipe.custom (optionalField "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1800 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1801 | + |> Jpipe.custom (optionalField "lev" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1802 | + |> Jpipe.custom (optionalField "mouthing" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1803 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1804 | + |> Jpipe.custom (optionalField "philliloo" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1805 | + |> Jpipe.custom (optionalField "planetal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1806 | + |> Jpipe.custom (optionalField "poney" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1807 | + |> Jpipe.custom (optionalField "punctualist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1808 | + |> Jpipe.custom (optionalField "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1809 | + |> Jpipe.custom (optionalField "skelder" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1810 | + |> Jpipe.custom (optionalField "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1811 | + |> Jpipe.custom (optionalField "Yuman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1806 | 1812 | |
| 1807 | 1813 | encodeTruantcyClass : TruantcyClass -> Jenc.Value |
| 1808 | 1814 | encodeTruantcyClass x = |
| @@ -1905,31 +1911,31 @@ encodeUnimpeachablyElement x = case x of | ||
| 1905 | 1911 | unimpeachablyClass : Jdec.Decoder UnimpeachablyClass |
| 1906 | 1912 | unimpeachablyClass = |
| 1907 | 1913 | Jdec.succeed UnimpeachablyClass |
| 1908 | - |> Jpipe.optional "acerin" (Jdec.nullable Jdec.int) Nothing | |
| 1909 | - |> Jpipe.optional "Bobadil" (Jdec.nullable Jdec.int) Nothing | |
| 1910 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1911 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1912 | - |> Jpipe.optional "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing | |
| 1913 | - |> Jpipe.optional "conversational" (Jdec.nullable Jdec.int) Nothing | |
| 1914 | - |> Jpipe.optional "demiowl" (Jdec.nullable Jdec.int) Nothing | |
| 1915 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1916 | - |> Jpipe.optional "ectorhinal" (Jdec.nullable Jdec.int) Nothing | |
| 1917 | - |> Jpipe.optional "gamblesomeness" (Jdec.nullable Jdec.int) Nothing | |
| 1918 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1919 | - |> Jpipe.optional "irrorate" (Jdec.nullable Jdec.int) Nothing | |
| 1920 | - |> Jpipe.optional "kindergartening" (Jdec.nullable Jdec.int) Nothing | |
| 1921 | - |> Jpipe.optional "lateritic" (Jdec.nullable Jdec.int) Nothing | |
| 1922 | - |> Jpipe.optional "mespil" (Jdec.nullable Jdec.int) Nothing | |
| 1923 | - |> Jpipe.optional "misconfiguration" (Jdec.nullable Jdec.int) Nothing | |
| 1924 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1925 | - |> Jpipe.optional "planometry" (Jdec.nullable Jdec.int) Nothing | |
| 1926 | - |> Jpipe.optional "Quiina" (Jdec.nullable Jdec.int) Nothing | |
| 1927 | - |> Jpipe.optional "Robert" (Jdec.nullable Jdec.int) Nothing | |
| 1928 | - |> Jpipe.optional "rot" (Jdec.nullable Jdec.int) Nothing | |
| 1929 | - |> Jpipe.optional "subcinctorium" (Jdec.nullable Jdec.int) Nothing | |
| 1930 | - |> Jpipe.optional "tussocker" (Jdec.nullable Jdec.int) Nothing | |
| 1931 | - |> Jpipe.optional "ultraproud" (Jdec.nullable Jdec.int) Nothing | |
| 1932 | - |> Jpipe.optional "unsuggestedness" (Jdec.nullable Jdec.int) Nothing | |
| 1914 | + |> Jpipe.custom (optionalField "acerin" (Jdec.nullable Jdec.int) Nothing) | |
| 1915 | + |> Jpipe.custom (optionalField "Bobadil" (Jdec.nullable Jdec.int) Nothing) | |
| 1916 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1917 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1918 | + |> Jpipe.custom (optionalField "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing) | |
| 1919 | + |> Jpipe.custom (optionalField "conversational" (Jdec.nullable Jdec.int) Nothing) | |
| 1920 | + |> Jpipe.custom (optionalField "demiowl" (Jdec.nullable Jdec.int) Nothing) | |
| 1921 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1922 | + |> Jpipe.custom (optionalField "ectorhinal" (Jdec.nullable Jdec.int) Nothing) | |
| 1923 | + |> Jpipe.custom (optionalField "gamblesomeness" (Jdec.nullable Jdec.int) Nothing) | |
| 1924 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1925 | + |> Jpipe.custom (optionalField "irrorate" (Jdec.nullable Jdec.int) Nothing) | |
| 1926 | + |> Jpipe.custom (optionalField "kindergartening" (Jdec.nullable Jdec.int) Nothing) | |
| 1927 | + |> Jpipe.custom (optionalField "lateritic" (Jdec.nullable Jdec.int) Nothing) | |
| 1928 | + |> Jpipe.custom (optionalField "mespil" (Jdec.nullable Jdec.int) Nothing) | |
| 1929 | + |> Jpipe.custom (optionalField "misconfiguration" (Jdec.nullable Jdec.int) Nothing) | |
| 1930 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1931 | + |> Jpipe.custom (optionalField "planometry" (Jdec.nullable Jdec.int) Nothing) | |
| 1932 | + |> Jpipe.custom (optionalField "Quiina" (Jdec.nullable Jdec.int) Nothing) | |
| 1933 | + |> Jpipe.custom (optionalField "Robert" (Jdec.nullable Jdec.int) Nothing) | |
| 1934 | + |> Jpipe.custom (optionalField "rot" (Jdec.nullable Jdec.int) Nothing) | |
| 1935 | + |> Jpipe.custom (optionalField "subcinctorium" (Jdec.nullable Jdec.int) Nothing) | |
| 1936 | + |> Jpipe.custom (optionalField "tussocker" (Jdec.nullable Jdec.int) Nothing) | |
| 1937 | + |> Jpipe.custom (optionalField "ultraproud" (Jdec.nullable Jdec.int) Nothing) | |
| 1938 | + |> Jpipe.custom (optionalField "unsuggestedness" (Jdec.nullable Jdec.int) Nothing) | |
| 1933 | 1939 | |
| 1934 | 1940 | encodeUnimpeachablyClass : UnimpeachablyClass -> Jenc.Value |
| 1935 | 1941 | encodeUnimpeachablyClass x = |
| @@ -2034,26 +2040,26 @@ encodeUnstressedElement x = case x of | ||
| 2034 | 2040 | unstressedClass : Jdec.Decoder UnstressedClass |
| 2035 | 2041 | unstressedClass = |
| 2036 | 2042 | Jdec.succeed UnstressedClass |
| 2037 | - |> Jpipe.optional "Alain" (Jdec.null ()) () | |
| 2038 | - |> Jpipe.optional "Amphirhina" (Jdec.null ()) () | |
| 2039 | - |> Jpipe.optional "antimachinery" (Jdec.null ()) () | |
| 2040 | - |> Jpipe.optional "coldish" (Jdec.null ()) () | |
| 2041 | - |> Jpipe.optional "crantara" (Jdec.null ()) () | |
| 2042 | - |> Jpipe.optional "distinguishing" (Jdec.null ()) () | |
| 2043 | - |> Jpipe.optional "elytroposis" (Jdec.null ()) () | |
| 2044 | - |> Jpipe.optional "gentianwort" (Jdec.null ()) () | |
| 2045 | - |> Jpipe.optional "heliosis" (Jdec.null ()) () | |
| 2046 | - |> Jpipe.optional "instrumental" (Jdec.null ()) () | |
| 2047 | - |> Jpipe.optional "introinflection" (Jdec.null ()) () | |
| 2048 | - |> Jpipe.optional "kala" (Jdec.null ()) () | |
| 2049 | - |> Jpipe.optional "Lincolnian" (Jdec.null ()) () | |
| 2050 | - |> Jpipe.optional "metad" (Jdec.null ()) () | |
| 2051 | - |> Jpipe.optional "Sarcophilus" (Jdec.null ()) () | |
| 2052 | - |> Jpipe.optional "swingingly" (Jdec.null ()) () | |
| 2053 | - |> Jpipe.optional "unconformity" (Jdec.null ()) () | |
| 2054 | - |> Jpipe.optional "undecreed" (Jdec.null ()) () | |
| 2055 | - |> Jpipe.optional "venerable" (Jdec.null ()) () | |
| 2056 | - |> Jpipe.optional "vowellessness" (Jdec.null ()) () | |
| 2043 | + |> Jpipe.custom (optionalField "Alain" (Jdec.null ()) ()) | |
| 2044 | + |> Jpipe.custom (optionalField "Amphirhina" (Jdec.null ()) ()) | |
| 2045 | + |> Jpipe.custom (optionalField "antimachinery" (Jdec.null ()) ()) | |
| 2046 | + |> Jpipe.custom (optionalField "coldish" (Jdec.null ()) ()) | |
| 2047 | + |> Jpipe.custom (optionalField "crantara" (Jdec.null ()) ()) | |
| 2048 | + |> Jpipe.custom (optionalField "distinguishing" (Jdec.null ()) ()) | |
| 2049 | + |> Jpipe.custom (optionalField "elytroposis" (Jdec.null ()) ()) | |
| 2050 | + |> Jpipe.custom (optionalField "gentianwort" (Jdec.null ()) ()) | |
| 2051 | + |> Jpipe.custom (optionalField "heliosis" (Jdec.null ()) ()) | |
| 2052 | + |> Jpipe.custom (optionalField "instrumental" (Jdec.null ()) ()) | |
| 2053 | + |> Jpipe.custom (optionalField "introinflection" (Jdec.null ()) ()) | |
| 2054 | + |> Jpipe.custom (optionalField "kala" (Jdec.null ()) ()) | |
| 2055 | + |> Jpipe.custom (optionalField "Lincolnian" (Jdec.null ()) ()) | |
| 2056 | + |> Jpipe.custom (optionalField "metad" (Jdec.null ()) ()) | |
| 2057 | + |> Jpipe.custom (optionalField "Sarcophilus" (Jdec.null ()) ()) | |
| 2058 | + |> Jpipe.custom (optionalField "swingingly" (Jdec.null ()) ()) | |
| 2059 | + |> Jpipe.custom (optionalField "unconformity" (Jdec.null ()) ()) | |
| 2060 | + |> Jpipe.custom (optionalField "undecreed" (Jdec.null ()) ()) | |
| 2061 | + |> Jpipe.custom (optionalField "venerable" (Jdec.null ()) ()) | |
| 2062 | + |> Jpipe.custom (optionalField "vowellessness" (Jdec.null ()) ()) | |
| 2057 | 2063 | |
| 2058 | 2064 | encodeUnstressedClass : UnstressedClass -> Jenc.Value |
| 2059 | 2065 | encodeUnstressedClass x = |
| @@ -2149,26 +2155,26 @@ encodeWrothyElement x = case x of | ||
| 2149 | 2155 | wrothyClass : Jdec.Decoder WrothyClass |
| 2150 | 2156 | wrothyClass = |
| 2151 | 2157 | Jdec.succeed WrothyClass |
| 2152 | - |> Jpipe.optional "Aeschynanthus" (Jdec.null ()) () | |
| 2153 | - |> Jpipe.optional "aquiferous" (Jdec.null ()) () | |
| 2154 | - |> Jpipe.optional "cheapener" (Jdec.null ()) () | |
| 2155 | - |> Jpipe.optional "enumeration" (Jdec.null ()) () | |
| 2156 | - |> Jpipe.optional "Ephesine" (Jdec.null ()) () | |
| 2157 | - |> Jpipe.optional "escadrille" (Jdec.null ()) () | |
| 2158 | - |> Jpipe.optional "estrous" (Jdec.null ()) () | |
| 2159 | - |> Jpipe.optional "interestedly" (Jdec.null ()) () | |
| 2160 | - |> Jpipe.optional "katakinetomer" (Jdec.null ()) () | |
| 2161 | - |> Jpipe.optional "mortification" (Jdec.null ()) () | |
| 2162 | - |> Jpipe.optional "morula" (Jdec.null ()) () | |
| 2163 | - |> Jpipe.optional "orthosymmetrical" (Jdec.null ()) () | |
| 2164 | - |> Jpipe.optional "overbark" (Jdec.null ()) () | |
| 2165 | - |> Jpipe.optional "politist" (Jdec.null ()) () | |
| 2166 | - |> Jpipe.optional "qualified" (Jdec.null ()) () | |
| 2167 | - |> Jpipe.optional "sphenomalar" (Jdec.null ()) () | |
| 2168 | - |> Jpipe.optional "throatful" (Jdec.null ()) () | |
| 2169 | - |> Jpipe.optional "transhumance" (Jdec.null ()) () | |
| 2170 | - |> Jpipe.optional "triandrian" (Jdec.null ()) () | |
| 2171 | - |> Jpipe.optional "unbooked" (Jdec.null ()) () | |
| 2158 | + |> Jpipe.custom (optionalField "Aeschynanthus" (Jdec.null ()) ()) | |
| 2159 | + |> Jpipe.custom (optionalField "aquiferous" (Jdec.null ()) ()) | |
| 2160 | + |> Jpipe.custom (optionalField "cheapener" (Jdec.null ()) ()) | |
| 2161 | + |> Jpipe.custom (optionalField "enumeration" (Jdec.null ()) ()) | |
| 2162 | + |> Jpipe.custom (optionalField "Ephesine" (Jdec.null ()) ()) | |
| 2163 | + |> Jpipe.custom (optionalField "escadrille" (Jdec.null ()) ()) | |
| 2164 | + |> Jpipe.custom (optionalField "estrous" (Jdec.null ()) ()) | |
| 2165 | + |> Jpipe.custom (optionalField "interestedly" (Jdec.null ()) ()) | |
| 2166 | + |> Jpipe.custom (optionalField "katakinetomer" (Jdec.null ()) ()) | |
| 2167 | + |> Jpipe.custom (optionalField "mortification" (Jdec.null ()) ()) | |
| 2168 | + |> Jpipe.custom (optionalField "morula" (Jdec.null ()) ()) | |
| 2169 | + |> Jpipe.custom (optionalField "orthosymmetrical" (Jdec.null ()) ()) | |
| 2170 | + |> Jpipe.custom (optionalField "overbark" (Jdec.null ()) ()) | |
| 2171 | + |> Jpipe.custom (optionalField "politist" (Jdec.null ()) ()) | |
| 2172 | + |> Jpipe.custom (optionalField "qualified" (Jdec.null ()) ()) | |
| 2173 | + |> Jpipe.custom (optionalField "sphenomalar" (Jdec.null ()) ()) | |
| 2174 | + |> Jpipe.custom (optionalField "throatful" (Jdec.null ()) ()) | |
| 2175 | + |> Jpipe.custom (optionalField "transhumance" (Jdec.null ()) ()) | |
| 2176 | + |> Jpipe.custom (optionalField "triandrian" (Jdec.null ()) ()) | |
| 2177 | + |> Jpipe.custom (optionalField "unbooked" (Jdec.null ()) ()) | |
| 2172 | 2178 | |
| 2173 | 2179 | encodeWrothyClass : WrothyClass -> Jenc.Value |
| 2174 | 2180 | encodeWrothyClass x = |
Melmdefault / QuickType.elm+317 −311
| @@ -711,6 +711,12 @@ type alias WrothyClass = | ||
| 711 | 711 | } |
| 712 | 712 | |
| 713 | 713 | -- decoders and encoders |
| 714 | +optionalField key decoder fallback = | |
| 715 | + Jdec.dict Jdec.value | |
| 716 | + |> Jdec.andThen (\m -> | |
| 717 | + case Dict.get key m of | |
| 718 | + Nothing -> Jdec.succeed fallback | |
| 719 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 714 | 720 | |
| 715 | 721 | quickTypeToString : QuickType -> String |
| 716 | 722 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -857,26 +863,26 @@ encodePulpitismElement x = case x of | ||
| 857 | 863 | pulpitismClass : Jdec.Decoder PulpitismClass |
| 858 | 864 | pulpitismClass = |
| 859 | 865 | Jdec.succeed PulpitismClass |
| 860 | - |> Jpipe.optional "abnet" (Jdec.null ()) () | |
| 861 | - |> Jpipe.optional "buckhorn" (Jdec.null ()) () | |
| 862 | - |> Jpipe.optional "calciform" (Jdec.null ()) () | |
| 863 | - |> Jpipe.optional "chelophore" (Jdec.null ()) () | |
| 864 | - |> Jpipe.optional "cogitation" (Jdec.null ()) () | |
| 865 | - |> Jpipe.optional "decreeable" (Jdec.null ()) () | |
| 866 | - |> Jpipe.optional "despicable" (Jdec.null ()) () | |
| 867 | - |> Jpipe.optional "isodiazo" (Jdec.null ()) () | |
| 868 | - |> Jpipe.optional "jadedly" (Jdec.null ()) () | |
| 869 | - |> Jpipe.optional "leptochlorite" (Jdec.null ()) () | |
| 870 | - |> Jpipe.optional "nursling" (Jdec.null ()) () | |
| 871 | - |> Jpipe.optional "palamedean" (Jdec.null ()) () | |
| 872 | - |> Jpipe.optional "photoheliograph" (Jdec.null ()) () | |
| 873 | - |> Jpipe.optional "pipewood" (Jdec.null ()) () | |
| 874 | - |> Jpipe.optional "roberd" (Jdec.null ()) () | |
| 875 | - |> Jpipe.optional "statable" (Jdec.null ()) () | |
| 876 | - |> Jpipe.optional "superassume" (Jdec.null ()) () | |
| 877 | - |> Jpipe.optional "syllabe" (Jdec.null ()) () | |
| 878 | - |> Jpipe.optional "toughhead" (Jdec.null ()) () | |
| 879 | - |> Jpipe.optional "underburn" (Jdec.null ()) () | |
| 866 | + |> Jpipe.custom (optionalField "abnet" (Jdec.null ()) ()) | |
| 867 | + |> Jpipe.custom (optionalField "buckhorn" (Jdec.null ()) ()) | |
| 868 | + |> Jpipe.custom (optionalField "calciform" (Jdec.null ()) ()) | |
| 869 | + |> Jpipe.custom (optionalField "chelophore" (Jdec.null ()) ()) | |
| 870 | + |> Jpipe.custom (optionalField "cogitation" (Jdec.null ()) ()) | |
| 871 | + |> Jpipe.custom (optionalField "decreeable" (Jdec.null ()) ()) | |
| 872 | + |> Jpipe.custom (optionalField "despicable" (Jdec.null ()) ()) | |
| 873 | + |> Jpipe.custom (optionalField "isodiazo" (Jdec.null ()) ()) | |
| 874 | + |> Jpipe.custom (optionalField "jadedly" (Jdec.null ()) ()) | |
| 875 | + |> Jpipe.custom (optionalField "leptochlorite" (Jdec.null ()) ()) | |
| 876 | + |> Jpipe.custom (optionalField "nursling" (Jdec.null ()) ()) | |
| 877 | + |> Jpipe.custom (optionalField "palamedean" (Jdec.null ()) ()) | |
| 878 | + |> Jpipe.custom (optionalField "photoheliograph" (Jdec.null ()) ()) | |
| 879 | + |> Jpipe.custom (optionalField "pipewood" (Jdec.null ()) ()) | |
| 880 | + |> Jpipe.custom (optionalField "roberd" (Jdec.null ()) ()) | |
| 881 | + |> Jpipe.custom (optionalField "statable" (Jdec.null ()) ()) | |
| 882 | + |> Jpipe.custom (optionalField "superassume" (Jdec.null ()) ()) | |
| 883 | + |> Jpipe.custom (optionalField "syllabe" (Jdec.null ()) ()) | |
| 884 | + |> Jpipe.custom (optionalField "toughhead" (Jdec.null ()) ()) | |
| 885 | + |> Jpipe.custom (optionalField "underburn" (Jdec.null ()) ()) | |
| 880 | 886 | |
| 881 | 887 | encodePulpitismClass : PulpitismClass -> Jenc.Value |
| 882 | 888 | encodePulpitismClass x = |
| @@ -918,26 +924,26 @@ encodePyodermiaElement x = case x of | ||
| 918 | 924 | pyodermiaClass : Jdec.Decoder PyodermiaClass |
| 919 | 925 | pyodermiaClass = |
| 920 | 926 | Jdec.succeed PyodermiaClass |
| 921 | - |> Jpipe.optional "aphoristically" (Jdec.null ()) () | |
| 922 | - |> Jpipe.optional "apophyllous" (Jdec.null ()) () | |
| 923 | - |> Jpipe.optional "cognize" (Jdec.null ()) () | |
| 924 | - |> Jpipe.optional "dermonosology" (Jdec.null ()) () | |
| 925 | - |> Jpipe.optional "Gyppo" (Jdec.null ()) () | |
| 926 | - |> Jpipe.optional "ither" (Jdec.null ()) () | |
| 927 | - |> Jpipe.optional "juglandaceous" (Jdec.null ()) () | |
| 928 | - |> Jpipe.optional "litho" (Jdec.null ()) () | |
| 929 | - |> Jpipe.optional "macropterous" (Jdec.null ()) () | |
| 930 | - |> Jpipe.optional "photographer" (Jdec.null ()) () | |
| 931 | - |> Jpipe.optional "romancing" (Jdec.null ()) () | |
| 932 | - |> Jpipe.optional "rumness" (Jdec.null ()) () | |
| 933 | - |> Jpipe.optional "somniloquist" (Jdec.null ()) () | |
| 934 | - |> Jpipe.optional "stressfully" (Jdec.null ()) () | |
| 935 | - |> Jpipe.optional "tactically" (Jdec.null ()) () | |
| 936 | - |> Jpipe.optional "tracheophony" (Jdec.null ()) () | |
| 937 | - |> Jpipe.optional "unappositely" (Jdec.null ()) () | |
| 938 | - |> Jpipe.optional "unclothedly" (Jdec.null ()) () | |
| 939 | - |> Jpipe.optional "unimplied" (Jdec.null ()) () | |
| 940 | - |> Jpipe.optional "unsyncopated" (Jdec.null ()) () | |
| 927 | + |> Jpipe.custom (optionalField "aphoristically" (Jdec.null ()) ()) | |
| 928 | + |> Jpipe.custom (optionalField "apophyllous" (Jdec.null ()) ()) | |
| 929 | + |> Jpipe.custom (optionalField "cognize" (Jdec.null ()) ()) | |
| 930 | + |> Jpipe.custom (optionalField "dermonosology" (Jdec.null ()) ()) | |
| 931 | + |> Jpipe.custom (optionalField "Gyppo" (Jdec.null ()) ()) | |
| 932 | + |> Jpipe.custom (optionalField "ither" (Jdec.null ()) ()) | |
| 933 | + |> Jpipe.custom (optionalField "juglandaceous" (Jdec.null ()) ()) | |
| 934 | + |> Jpipe.custom (optionalField "litho" (Jdec.null ()) ()) | |
| 935 | + |> Jpipe.custom (optionalField "macropterous" (Jdec.null ()) ()) | |
| 936 | + |> Jpipe.custom (optionalField "photographer" (Jdec.null ()) ()) | |
| 937 | + |> Jpipe.custom (optionalField "romancing" (Jdec.null ()) ()) | |
| 938 | + |> Jpipe.custom (optionalField "rumness" (Jdec.null ()) ()) | |
| 939 | + |> Jpipe.custom (optionalField "somniloquist" (Jdec.null ()) ()) | |
| 940 | + |> Jpipe.custom (optionalField "stressfully" (Jdec.null ()) ()) | |
| 941 | + |> Jpipe.custom (optionalField "tactically" (Jdec.null ()) ()) | |
| 942 | + |> Jpipe.custom (optionalField "tracheophony" (Jdec.null ()) ()) | |
| 943 | + |> Jpipe.custom (optionalField "unappositely" (Jdec.null ()) ()) | |
| 944 | + |> Jpipe.custom (optionalField "unclothedly" (Jdec.null ()) ()) | |
| 945 | + |> Jpipe.custom (optionalField "unimplied" (Jdec.null ()) ()) | |
| 946 | + |> Jpipe.custom (optionalField "unsyncopated" (Jdec.null ()) ()) | |
| 941 | 947 | |
| 942 | 948 | encodePyodermiaClass : PyodermiaClass -> Jenc.Value |
| 943 | 949 | encodePyodermiaClass x = |
| @@ -985,7 +991,7 @@ quebrachineClass = | ||
| 985 | 991 | |> Jpipe.required "Chirotherium" Jdec.int |
| 986 | 992 | |> Jpipe.required "disdiapason" Jdec.string |
| 987 | 993 | |> Jpipe.required "homocerc" Jdec.bool |
| 988 | - |> Jpipe.optional "nonbookish" (Jdec.null ()) () | |
| 994 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ()) | |
| 989 | 995 | |
| 990 | 996 | encodeQuebrachineClass : QuebrachineClass -> Jenc.Value |
| 991 | 997 | encodeQuebrachineClass x = |
| @@ -1026,31 +1032,31 @@ encodeRebarbative x = case x of | ||
| 1026 | 1032 | reimagine : Jdec.Decoder Reimagine |
| 1027 | 1033 | reimagine = |
| 1028 | 1034 | Jdec.succeed Reimagine |
| 1029 | - |> Jpipe.optional "adducible" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1030 | - |> Jpipe.optional "anabolin" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1031 | - |> Jpipe.optional "brainy" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1032 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1033 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1034 | - |> Jpipe.optional "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1035 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1036 | - |> Jpipe.optional "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1037 | - |> Jpipe.optional "glaucine" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1038 | - |> Jpipe.optional "grobianism" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1039 | - |> Jpipe.optional "Hermo" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1040 | - |> Jpipe.optional "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1041 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1042 | - |> Jpipe.optional "icteroid" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1043 | - |> Jpipe.optional "immortal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1044 | - |> Jpipe.optional "impetulant" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1045 | - |> Jpipe.optional "irrigate" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1046 | - |> Jpipe.optional "myxedema" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1047 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1048 | - |> Jpipe.optional "onyx" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1049 | - |> Jpipe.optional "repasser" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1050 | - |> Jpipe.optional "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1051 | - |> Jpipe.optional "subdie" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1052 | - |> Jpipe.optional "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1053 | - |> Jpipe.optional "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1035 | + |> Jpipe.custom (optionalField "adducible" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1036 | + |> Jpipe.custom (optionalField "anabolin" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1037 | + |> Jpipe.custom (optionalField "brainy" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1038 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1039 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1040 | + |> Jpipe.custom (optionalField "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1041 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1042 | + |> Jpipe.custom (optionalField "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1043 | + |> Jpipe.custom (optionalField "glaucine" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1044 | + |> Jpipe.custom (optionalField "grobianism" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1045 | + |> Jpipe.custom (optionalField "Hermo" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1046 | + |> Jpipe.custom (optionalField "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1047 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1048 | + |> Jpipe.custom (optionalField "icteroid" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1049 | + |> Jpipe.custom (optionalField "immortal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1050 | + |> Jpipe.custom (optionalField "impetulant" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1051 | + |> Jpipe.custom (optionalField "irrigate" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1052 | + |> Jpipe.custom (optionalField "myxedema" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1053 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1054 | + |> Jpipe.custom (optionalField "onyx" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1055 | + |> Jpipe.custom (optionalField "repasser" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1056 | + |> Jpipe.custom (optionalField "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1057 | + |> Jpipe.custom (optionalField "subdie" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1058 | + |> Jpipe.custom (optionalField "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1059 | + |> Jpipe.custom (optionalField "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1054 | 1060 | |
| 1055 | 1061 | encodeReimagine : Reimagine -> Jenc.Value |
| 1056 | 1062 | encodeReimagine x = |
| @@ -1172,26 +1178,26 @@ encodeRewriteElement x = case x of | ||
| 1172 | 1178 | rewriteClass : Jdec.Decoder RewriteClass |
| 1173 | 1179 | rewriteClass = |
| 1174 | 1180 | Jdec.succeed RewriteClass |
| 1175 | - |> Jpipe.optional "accountancy" (Jdec.null ()) () | |
| 1176 | - |> Jpipe.optional "cacotrophic" (Jdec.null ()) () | |
| 1177 | - |> Jpipe.optional "contest" (Jdec.null ()) () | |
| 1178 | - |> Jpipe.optional "couthily" (Jdec.null ()) () | |
| 1179 | - |> Jpipe.optional "falculate" (Jdec.null ()) () | |
| 1180 | - |> Jpipe.optional "foreseize" (Jdec.null ()) () | |
| 1181 | - |> Jpipe.optional "Hyades" (Jdec.null ()) () | |
| 1182 | - |> Jpipe.optional "lemnad" (Jdec.null ()) () | |
| 1183 | - |> Jpipe.optional "monotheistically" (Jdec.null ()) () | |
| 1184 | - |> Jpipe.optional "nonflying" (Jdec.null ()) () | |
| 1185 | - |> Jpipe.optional "Ptenoglossa" (Jdec.null ()) () | |
| 1186 | - |> Jpipe.optional "repatch" (Jdec.null ()) () | |
| 1187 | - |> Jpipe.optional "rodman" (Jdec.null ()) () | |
| 1188 | - |> Jpipe.optional "strung" (Jdec.null ()) () | |
| 1189 | - |> Jpipe.optional "titmal" (Jdec.null ()) () | |
| 1190 | - |> Jpipe.optional "twalpennyworth" (Jdec.null ()) () | |
| 1191 | - |> Jpipe.optional "unblamable" (Jdec.null ()) () | |
| 1192 | - |> Jpipe.optional "vertical" (Jdec.null ()) () | |
| 1193 | - |> Jpipe.optional "Whiggification" (Jdec.null ()) () | |
| 1194 | - |> Jpipe.optional "yardman" (Jdec.null ()) () | |
| 1181 | + |> Jpipe.custom (optionalField "accountancy" (Jdec.null ()) ()) | |
| 1182 | + |> Jpipe.custom (optionalField "cacotrophic" (Jdec.null ()) ()) | |
| 1183 | + |> Jpipe.custom (optionalField "contest" (Jdec.null ()) ()) | |
| 1184 | + |> Jpipe.custom (optionalField "couthily" (Jdec.null ()) ()) | |
| 1185 | + |> Jpipe.custom (optionalField "falculate" (Jdec.null ()) ()) | |
| 1186 | + |> Jpipe.custom (optionalField "foreseize" (Jdec.null ()) ()) | |
| 1187 | + |> Jpipe.custom (optionalField "Hyades" (Jdec.null ()) ()) | |
| 1188 | + |> Jpipe.custom (optionalField "lemnad" (Jdec.null ()) ()) | |
| 1189 | + |> Jpipe.custom (optionalField "monotheistically" (Jdec.null ()) ()) | |
| 1190 | + |> Jpipe.custom (optionalField "nonflying" (Jdec.null ()) ()) | |
| 1191 | + |> Jpipe.custom (optionalField "Ptenoglossa" (Jdec.null ()) ()) | |
| 1192 | + |> Jpipe.custom (optionalField "repatch" (Jdec.null ()) ()) | |
| 1193 | + |> Jpipe.custom (optionalField "rodman" (Jdec.null ()) ()) | |
| 1194 | + |> Jpipe.custom (optionalField "strung" (Jdec.null ()) ()) | |
| 1195 | + |> Jpipe.custom (optionalField "titmal" (Jdec.null ()) ()) | |
| 1196 | + |> Jpipe.custom (optionalField "twalpennyworth" (Jdec.null ()) ()) | |
| 1197 | + |> Jpipe.custom (optionalField "unblamable" (Jdec.null ()) ()) | |
| 1198 | + |> Jpipe.custom (optionalField "vertical" (Jdec.null ()) ()) | |
| 1199 | + |> Jpipe.custom (optionalField "Whiggification" (Jdec.null ()) ()) | |
| 1200 | + |> Jpipe.custom (optionalField "yardman" (Jdec.null ()) ()) | |
| 1195 | 1201 | |
| 1196 | 1202 | encodeRewriteClass : RewriteClass -> Jenc.Value |
| 1197 | 1203 | encodeRewriteClass x = |
| @@ -1247,26 +1253,26 @@ encodeSantirElement x = case x of | ||
| 1247 | 1253 | santirClass : Jdec.Decoder SantirClass |
| 1248 | 1254 | santirClass = |
| 1249 | 1255 | Jdec.succeed SantirClass |
| 1250 | - |> Jpipe.optional "admiredly" (Jdec.null ()) () | |
| 1251 | - |> Jpipe.optional "demicaponier" (Jdec.null ()) () | |
| 1252 | - |> Jpipe.optional "epitympanic" (Jdec.null ()) () | |
| 1253 | - |> Jpipe.optional "investitor" (Jdec.null ()) () | |
| 1254 | - |> Jpipe.optional "lupiform" (Jdec.null ()) () | |
| 1255 | - |> Jpipe.optional "monoflagellate" (Jdec.null ()) () | |
| 1256 | - |> Jpipe.optional "paleoethnic" (Jdec.null ()) () | |
| 1257 | - |> Jpipe.optional "prediscountable" (Jdec.null ()) () | |
| 1258 | - |> Jpipe.optional "rhetoricals" (Jdec.null ()) () | |
| 1259 | - |> Jpipe.optional "roomth" (Jdec.null ()) () | |
| 1260 | - |> Jpipe.optional "saccharose" (Jdec.null ()) () | |
| 1261 | - |> Jpipe.optional "septonasal" (Jdec.null ()) () | |
| 1262 | - |> Jpipe.optional "serpenticide" (Jdec.null ()) () | |
| 1263 | - |> Jpipe.optional "setarious" (Jdec.null ()) () | |
| 1264 | - |> Jpipe.optional "spaework" (Jdec.null ()) () | |
| 1265 | - |> Jpipe.optional "stylite" (Jdec.null ()) () | |
| 1266 | - |> Jpipe.optional "Suessiones" (Jdec.null ()) () | |
| 1267 | - |> Jpipe.optional "timelily" (Jdec.null ()) () | |
| 1268 | - |> Jpipe.optional "unprofaned" (Jdec.null ()) () | |
| 1269 | - |> Jpipe.optional "vorticular" (Jdec.null ()) () | |
| 1256 | + |> Jpipe.custom (optionalField "admiredly" (Jdec.null ()) ()) | |
| 1257 | + |> Jpipe.custom (optionalField "demicaponier" (Jdec.null ()) ()) | |
| 1258 | + |> Jpipe.custom (optionalField "epitympanic" (Jdec.null ()) ()) | |
| 1259 | + |> Jpipe.custom (optionalField "investitor" (Jdec.null ()) ()) | |
| 1260 | + |> Jpipe.custom (optionalField "lupiform" (Jdec.null ()) ()) | |
| 1261 | + |> Jpipe.custom (optionalField "monoflagellate" (Jdec.null ()) ()) | |
| 1262 | + |> Jpipe.custom (optionalField "paleoethnic" (Jdec.null ()) ()) | |
| 1263 | + |> Jpipe.custom (optionalField "prediscountable" (Jdec.null ()) ()) | |
| 1264 | + |> Jpipe.custom (optionalField "rhetoricals" (Jdec.null ()) ()) | |
| 1265 | + |> Jpipe.custom (optionalField "roomth" (Jdec.null ()) ()) | |
| 1266 | + |> Jpipe.custom (optionalField "saccharose" (Jdec.null ()) ()) | |
| 1267 | + |> Jpipe.custom (optionalField "septonasal" (Jdec.null ()) ()) | |
| 1268 | + |> Jpipe.custom (optionalField "serpenticide" (Jdec.null ()) ()) | |
| 1269 | + |> Jpipe.custom (optionalField "setarious" (Jdec.null ()) ()) | |
| 1270 | + |> Jpipe.custom (optionalField "spaework" (Jdec.null ()) ()) | |
| 1271 | + |> Jpipe.custom (optionalField "stylite" (Jdec.null ()) ()) | |
| 1272 | + |> Jpipe.custom (optionalField "Suessiones" (Jdec.null ()) ()) | |
| 1273 | + |> Jpipe.custom (optionalField "timelily" (Jdec.null ()) ()) | |
| 1274 | + |> Jpipe.custom (optionalField "unprofaned" (Jdec.null ()) ()) | |
| 1275 | + |> Jpipe.custom (optionalField "vorticular" (Jdec.null ()) ()) | |
| 1270 | 1276 | |
| 1271 | 1277 | encodeSantirClass : SantirClass -> Jenc.Value |
| 1272 | 1278 | encodeSantirClass x = |
| @@ -1322,31 +1328,31 @@ encodeSaxtenElement x = case x of | ||
| 1322 | 1328 | saxtenClass : Jdec.Decoder SaxtenClass |
| 1323 | 1329 | saxtenClass = |
| 1324 | 1330 | Jdec.succeed SaxtenClass |
| 1325 | - |> Jpipe.optional "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1326 | - |> Jpipe.optional "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1327 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1328 | - |> Jpipe.optional "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1329 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1330 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1331 | - |> Jpipe.optional "flix" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1332 | - |> Jpipe.optional "germanely" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1333 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1334 | - |> Jpipe.optional "inhume" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1335 | - |> Jpipe.optional "lepidote" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1336 | - |> Jpipe.optional "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1337 | - |> Jpipe.optional "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1338 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1339 | - |> Jpipe.optional "nondeist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1340 | - |> Jpipe.optional "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1341 | - |> Jpipe.optional "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1342 | - |> Jpipe.optional "sancyite" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1343 | - |> Jpipe.optional "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1344 | - |> Jpipe.optional "tibiad" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1345 | - |> Jpipe.optional "transonic" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1346 | - |> Jpipe.optional "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1347 | - |> Jpipe.optional "trunchman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1348 | - |> Jpipe.optional "urger" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1349 | - |> Jpipe.optional "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1331 | + |> Jpipe.custom (optionalField "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1332 | + |> Jpipe.custom (optionalField "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1333 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1334 | + |> Jpipe.custom (optionalField "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1335 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1336 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1337 | + |> Jpipe.custom (optionalField "flix" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1338 | + |> Jpipe.custom (optionalField "germanely" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1339 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1340 | + |> Jpipe.custom (optionalField "inhume" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1341 | + |> Jpipe.custom (optionalField "lepidote" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1342 | + |> Jpipe.custom (optionalField "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1343 | + |> Jpipe.custom (optionalField "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1344 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1345 | + |> Jpipe.custom (optionalField "nondeist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1346 | + |> Jpipe.custom (optionalField "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1347 | + |> Jpipe.custom (optionalField "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1348 | + |> Jpipe.custom (optionalField "sancyite" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1349 | + |> Jpipe.custom (optionalField "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1350 | + |> Jpipe.custom (optionalField "tibiad" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1351 | + |> Jpipe.custom (optionalField "transonic" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1352 | + |> Jpipe.custom (optionalField "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1353 | + |> Jpipe.custom (optionalField "trunchman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1354 | + |> Jpipe.custom (optionalField "urger" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1355 | + |> Jpipe.custom (optionalField "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1350 | 1356 | |
| 1351 | 1357 | encodeSaxtenClass : SaxtenClass -> Jenc.Value |
| 1352 | 1358 | encodeSaxtenClass x = |
| @@ -1381,26 +1387,26 @@ encodeSaxtenClass x = | ||
| 1381 | 1387 | scatty : Jdec.Decoder Scatty |
| 1382 | 1388 | scatty = |
| 1383 | 1389 | Jdec.succeed Scatty |
| 1384 | - |> Jpipe.optional "aeriferous" (Jdec.null ()) () | |
| 1385 | - |> Jpipe.optional "antical" (Jdec.null ()) () | |
| 1386 | - |> Jpipe.optional "antighostism" (Jdec.null ()) () | |
| 1387 | - |> Jpipe.optional "arcanum" (Jdec.null ()) () | |
| 1388 | - |> Jpipe.optional "autotrophy" (Jdec.null ()) () | |
| 1389 | - |> Jpipe.optional "baronial" (Jdec.null ()) () | |
| 1390 | - |> Jpipe.optional "caffeine" (Jdec.null ()) () | |
| 1391 | - |> Jpipe.optional "gorgoniacean" (Jdec.null ()) () | |
| 1392 | - |> Jpipe.optional "heroical" (Jdec.null ()) () | |
| 1393 | - |> Jpipe.optional "hydropical" (Jdec.null ()) () | |
| 1394 | - |> Jpipe.optional "mechanology" (Jdec.null ()) () | |
| 1395 | - |> Jpipe.optional "musicopoetic" (Jdec.null ()) () | |
| 1396 | - |> Jpipe.optional "officiality" (Jdec.null ()) () | |
| 1397 | - |> Jpipe.optional "oftentimes" (Jdec.null ()) () | |
| 1398 | - |> Jpipe.optional "ophthalmotonometer" (Jdec.null ()) () | |
| 1399 | - |> Jpipe.optional "reflectively" (Jdec.null ()) () | |
| 1400 | - |> Jpipe.optional "springer" (Jdec.null ()) () | |
| 1401 | - |> Jpipe.optional "Tabasco" (Jdec.null ()) () | |
| 1402 | - |> Jpipe.optional "teleianthous" (Jdec.null ()) () | |
| 1403 | - |> Jpipe.optional "uncombated" (Jdec.null ()) () | |
| 1390 | + |> Jpipe.custom (optionalField "aeriferous" (Jdec.null ()) ()) | |
| 1391 | + |> Jpipe.custom (optionalField "antical" (Jdec.null ()) ()) | |
| 1392 | + |> Jpipe.custom (optionalField "antighostism" (Jdec.null ()) ()) | |
| 1393 | + |> Jpipe.custom (optionalField "arcanum" (Jdec.null ()) ()) | |
| 1394 | + |> Jpipe.custom (optionalField "autotrophy" (Jdec.null ()) ()) | |
| 1395 | + |> Jpipe.custom (optionalField "baronial" (Jdec.null ()) ()) | |
| 1396 | + |> Jpipe.custom (optionalField "caffeine" (Jdec.null ()) ()) | |
| 1397 | + |> Jpipe.custom (optionalField "gorgoniacean" (Jdec.null ()) ()) | |
| 1398 | + |> Jpipe.custom (optionalField "heroical" (Jdec.null ()) ()) | |
| 1399 | + |> Jpipe.custom (optionalField "hydropical" (Jdec.null ()) ()) | |
| 1400 | + |> Jpipe.custom (optionalField "mechanology" (Jdec.null ()) ()) | |
| 1401 | + |> Jpipe.custom (optionalField "musicopoetic" (Jdec.null ()) ()) | |
| 1402 | + |> Jpipe.custom (optionalField "officiality" (Jdec.null ()) ()) | |
| 1403 | + |> Jpipe.custom (optionalField "oftentimes" (Jdec.null ()) ()) | |
| 1404 | + |> Jpipe.custom (optionalField "ophthalmotonometer" (Jdec.null ()) ()) | |
| 1405 | + |> Jpipe.custom (optionalField "reflectively" (Jdec.null ()) ()) | |
| 1406 | + |> Jpipe.custom (optionalField "springer" (Jdec.null ()) ()) | |
| 1407 | + |> Jpipe.custom (optionalField "Tabasco" (Jdec.null ()) ()) | |
| 1408 | + |> Jpipe.custom (optionalField "teleianthous" (Jdec.null ()) ()) | |
| 1409 | + |> Jpipe.custom (optionalField "uncombated" (Jdec.null ()) ()) | |
| 1404 | 1410 | |
| 1405 | 1411 | encodeScatty : Scatty -> Jenc.Value |
| 1406 | 1412 | encodeScatty x = |
| @@ -1496,26 +1502,26 @@ encodeSisteringElement x = case x of | ||
| 1496 | 1502 | sisteringClass : Jdec.Decoder SisteringClass |
| 1497 | 1503 | sisteringClass = |
| 1498 | 1504 | Jdec.succeed SisteringClass |
| 1499 | - |> Jpipe.optional "amphicarpic" (Jdec.null ()) () | |
| 1500 | - |> Jpipe.optional "Chianti" (Jdec.null ()) () | |
| 1501 | - |> Jpipe.optional "frigorific" (Jdec.null ()) () | |
| 1502 | - |> Jpipe.optional "Haplomi" (Jdec.null ()) () | |
| 1503 | - |> Jpipe.optional "hyperkinesis" (Jdec.null ()) () | |
| 1504 | - |> Jpipe.optional "laudable" (Jdec.null ()) () | |
| 1505 | - |> Jpipe.optional "madwoman" (Jdec.null ()) () | |
| 1506 | - |> Jpipe.optional "maimedly" (Jdec.null ()) () | |
| 1507 | - |> Jpipe.optional "Micropterygidae" (Jdec.null ()) () | |
| 1508 | - |> Jpipe.optional "microrhabdus" (Jdec.null ()) () | |
| 1509 | - |> Jpipe.optional "nondense" (Jdec.null ()) () | |
| 1510 | - |> Jpipe.optional "phlebemphraxis" (Jdec.null ()) () | |
| 1511 | - |> Jpipe.optional "redsear" (Jdec.null ()) () | |
| 1512 | - |> Jpipe.optional "schismatical" (Jdec.null ()) () | |
| 1513 | - |> Jpipe.optional "tartryl" (Jdec.null ()) () | |
| 1514 | - |> Jpipe.optional "unabhorred" (Jdec.null ()) () | |
| 1515 | - |> Jpipe.optional "undeliberateness" (Jdec.null ()) () | |
| 1516 | - |> Jpipe.optional "unmixable" (Jdec.null ()) () | |
| 1517 | - |> Jpipe.optional "untruckling" (Jdec.null ()) () | |
| 1518 | - |> Jpipe.optional "vineal" (Jdec.null ()) () | |
| 1505 | + |> Jpipe.custom (optionalField "amphicarpic" (Jdec.null ()) ()) | |
| 1506 | + |> Jpipe.custom (optionalField "Chianti" (Jdec.null ()) ()) | |
| 1507 | + |> Jpipe.custom (optionalField "frigorific" (Jdec.null ()) ()) | |
| 1508 | + |> Jpipe.custom (optionalField "Haplomi" (Jdec.null ()) ()) | |
| 1509 | + |> Jpipe.custom (optionalField "hyperkinesis" (Jdec.null ()) ()) | |
| 1510 | + |> Jpipe.custom (optionalField "laudable" (Jdec.null ()) ()) | |
| 1511 | + |> Jpipe.custom (optionalField "madwoman" (Jdec.null ()) ()) | |
| 1512 | + |> Jpipe.custom (optionalField "maimedly" (Jdec.null ()) ()) | |
| 1513 | + |> Jpipe.custom (optionalField "Micropterygidae" (Jdec.null ()) ()) | |
| 1514 | + |> Jpipe.custom (optionalField "microrhabdus" (Jdec.null ()) ()) | |
| 1515 | + |> Jpipe.custom (optionalField "nondense" (Jdec.null ()) ()) | |
| 1516 | + |> Jpipe.custom (optionalField "phlebemphraxis" (Jdec.null ()) ()) | |
| 1517 | + |> Jpipe.custom (optionalField "redsear" (Jdec.null ()) ()) | |
| 1518 | + |> Jpipe.custom (optionalField "schismatical" (Jdec.null ()) ()) | |
| 1519 | + |> Jpipe.custom (optionalField "tartryl" (Jdec.null ()) ()) | |
| 1520 | + |> Jpipe.custom (optionalField "unabhorred" (Jdec.null ()) ()) | |
| 1521 | + |> Jpipe.custom (optionalField "undeliberateness" (Jdec.null ()) ()) | |
| 1522 | + |> Jpipe.custom (optionalField "unmixable" (Jdec.null ()) ()) | |
| 1523 | + |> Jpipe.custom (optionalField "untruckling" (Jdec.null ()) ()) | |
| 1524 | + |> Jpipe.custom (optionalField "vineal" (Jdec.null ()) ()) | |
| 1519 | 1525 | |
| 1520 | 1526 | encodeSisteringClass : SisteringClass -> Jenc.Value |
| 1521 | 1527 | encodeSisteringClass x = |
| @@ -1545,31 +1551,31 @@ encodeSisteringClass x = | ||
| 1545 | 1551 | staghunting : Jdec.Decoder Staghunting |
| 1546 | 1552 | staghunting = |
| 1547 | 1553 | Jdec.succeed Staghunting |
| 1548 | - |> Jpipe.optional "calorimetric" (Jdec.nullable Jdec.int) Nothing | |
| 1549 | - |> Jpipe.optional "canid" (Jdec.nullable Jdec.int) Nothing | |
| 1550 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1551 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1552 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1553 | - |> Jpipe.optional "ditriglyphic" (Jdec.nullable Jdec.int) Nothing | |
| 1554 | - |> Jpipe.optional "floriferousness" (Jdec.nullable Jdec.int) Nothing | |
| 1555 | - |> Jpipe.optional "gamelike" (Jdec.nullable Jdec.int) Nothing | |
| 1556 | - |> Jpipe.optional "grig" (Jdec.nullable Jdec.int) Nothing | |
| 1557 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1558 | - |> Jpipe.optional "interloan" (Jdec.nullable Jdec.int) Nothing | |
| 1559 | - |> Jpipe.optional "lithotomy" (Jdec.nullable Jdec.int) Nothing | |
| 1560 | - |> Jpipe.optional "loric" (Jdec.nullable Jdec.int) Nothing | |
| 1561 | - |> Jpipe.optional "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing | |
| 1562 | - |> Jpipe.optional "membranogenic" (Jdec.nullable Jdec.int) Nothing | |
| 1563 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1564 | - |> Jpipe.optional "overtrump" (Jdec.nullable Jdec.int) Nothing | |
| 1565 | - |> Jpipe.optional "scotino" (Jdec.nullable Jdec.int) Nothing | |
| 1566 | - |> Jpipe.optional "seasonable" (Jdec.nullable Jdec.int) Nothing | |
| 1567 | - |> Jpipe.optional "sephen" (Jdec.nullable Jdec.int) Nothing | |
| 1568 | - |> Jpipe.optional "stigmarioid" (Jdec.nullable Jdec.int) Nothing | |
| 1569 | - |> Jpipe.optional "tired" (Jdec.nullable Jdec.int) Nothing | |
| 1570 | - |> Jpipe.optional "trifid" (Jdec.nullable Jdec.int) Nothing | |
| 1571 | - |> Jpipe.optional "undefeatedly" (Jdec.nullable Jdec.int) Nothing | |
| 1572 | - |> Jpipe.optional "ungirlish" (Jdec.nullable Jdec.int) Nothing | |
| 1554 | + |> Jpipe.custom (optionalField "calorimetric" (Jdec.nullable Jdec.int) Nothing) | |
| 1555 | + |> Jpipe.custom (optionalField "canid" (Jdec.nullable Jdec.int) Nothing) | |
| 1556 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1557 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1558 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1559 | + |> Jpipe.custom (optionalField "ditriglyphic" (Jdec.nullable Jdec.int) Nothing) | |
| 1560 | + |> Jpipe.custom (optionalField "floriferousness" (Jdec.nullable Jdec.int) Nothing) | |
| 1561 | + |> Jpipe.custom (optionalField "gamelike" (Jdec.nullable Jdec.int) Nothing) | |
| 1562 | + |> Jpipe.custom (optionalField "grig" (Jdec.nullable Jdec.int) Nothing) | |
| 1563 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1564 | + |> Jpipe.custom (optionalField "interloan" (Jdec.nullable Jdec.int) Nothing) | |
| 1565 | + |> Jpipe.custom (optionalField "lithotomy" (Jdec.nullable Jdec.int) Nothing) | |
| 1566 | + |> Jpipe.custom (optionalField "loric" (Jdec.nullable Jdec.int) Nothing) | |
| 1567 | + |> Jpipe.custom (optionalField "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing) | |
| 1568 | + |> Jpipe.custom (optionalField "membranogenic" (Jdec.nullable Jdec.int) Nothing) | |
| 1569 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1570 | + |> Jpipe.custom (optionalField "overtrump" (Jdec.nullable Jdec.int) Nothing) | |
| 1571 | + |> Jpipe.custom (optionalField "scotino" (Jdec.nullable Jdec.int) Nothing) | |
| 1572 | + |> Jpipe.custom (optionalField "seasonable" (Jdec.nullable Jdec.int) Nothing) | |
| 1573 | + |> Jpipe.custom (optionalField "sephen" (Jdec.nullable Jdec.int) Nothing) | |
| 1574 | + |> Jpipe.custom (optionalField "stigmarioid" (Jdec.nullable Jdec.int) Nothing) | |
| 1575 | + |> Jpipe.custom (optionalField "tired" (Jdec.nullable Jdec.int) Nothing) | |
| 1576 | + |> Jpipe.custom (optionalField "trifid" (Jdec.nullable Jdec.int) Nothing) | |
| 1577 | + |> Jpipe.custom (optionalField "undefeatedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1578 | + |> Jpipe.custom (optionalField "ungirlish" (Jdec.nullable Jdec.int) Nothing) | |
| 1573 | 1579 | |
| 1574 | 1580 | encodeStaghunting : Staghunting -> Jenc.Value |
| 1575 | 1581 | encodeStaghunting x = |
| @@ -1654,31 +1660,31 @@ encodeStrenuosityElement x = case x of | ||
| 1654 | 1660 | strenuosityClass : Jdec.Decoder StrenuosityClass |
| 1655 | 1661 | strenuosityClass = |
| 1656 | 1662 | Jdec.succeed StrenuosityClass |
| 1657 | - |> Jpipe.optional "bliss" (Jdec.nullable Jdec.int) Nothing | |
| 1658 | - |> Jpipe.optional "buccate" (Jdec.nullable Jdec.int) Nothing | |
| 1659 | - |> Jpipe.optional "bulletproof" (Jdec.nullable Jdec.int) Nothing | |
| 1660 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1661 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1662 | - |> Jpipe.optional "crumblingness" (Jdec.nullable Jdec.int) Nothing | |
| 1663 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1664 | - |> Jpipe.optional "engagedly" (Jdec.nullable Jdec.int) Nothing | |
| 1665 | - |> Jpipe.optional "fightable" (Jdec.nullable Jdec.int) Nothing | |
| 1666 | - |> Jpipe.optional "hoariness" (Jdec.nullable Jdec.int) Nothing | |
| 1667 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1668 | - |> Jpipe.optional "hypopodium" (Jdec.nullable Jdec.int) Nothing | |
| 1669 | - |> Jpipe.optional "luxurist" (Jdec.nullable Jdec.int) Nothing | |
| 1670 | - |> Jpipe.optional "mechanician" (Jdec.nullable Jdec.int) Nothing | |
| 1671 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1672 | - |> Jpipe.optional "Onopordon" (Jdec.nullable Jdec.int) Nothing | |
| 1673 | - |> Jpipe.optional "podgily" (Jdec.nullable Jdec.int) Nothing | |
| 1674 | - |> Jpipe.optional "reformableness" (Jdec.nullable Jdec.int) Nothing | |
| 1675 | - |> Jpipe.optional "scatterbrains" (Jdec.nullable Jdec.int) Nothing | |
| 1676 | - |> Jpipe.optional "seminuria" (Jdec.nullable Jdec.int) Nothing | |
| 1677 | - |> Jpipe.optional "Sodomite" (Jdec.nullable Jdec.int) Nothing | |
| 1678 | - |> Jpipe.optional "tramp" (Jdec.nullable Jdec.int) Nothing | |
| 1679 | - |> Jpipe.optional "undueness" (Jdec.nullable Jdec.int) Nothing | |
| 1680 | - |> Jpipe.optional "worthily" (Jdec.nullable Jdec.int) Nothing | |
| 1681 | - |> Jpipe.optional "Yankeeist" (Jdec.nullable Jdec.int) Nothing | |
| 1663 | + |> Jpipe.custom (optionalField "bliss" (Jdec.nullable Jdec.int) Nothing) | |
| 1664 | + |> Jpipe.custom (optionalField "buccate" (Jdec.nullable Jdec.int) Nothing) | |
| 1665 | + |> Jpipe.custom (optionalField "bulletproof" (Jdec.nullable Jdec.int) Nothing) | |
| 1666 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1667 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1668 | + |> Jpipe.custom (optionalField "crumblingness" (Jdec.nullable Jdec.int) Nothing) | |
| 1669 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1670 | + |> Jpipe.custom (optionalField "engagedly" (Jdec.nullable Jdec.int) Nothing) | |
| 1671 | + |> Jpipe.custom (optionalField "fightable" (Jdec.nullable Jdec.int) Nothing) | |
| 1672 | + |> Jpipe.custom (optionalField "hoariness" (Jdec.nullable Jdec.int) Nothing) | |
| 1673 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1674 | + |> Jpipe.custom (optionalField "hypopodium" (Jdec.nullable Jdec.int) Nothing) | |
| 1675 | + |> Jpipe.custom (optionalField "luxurist" (Jdec.nullable Jdec.int) Nothing) | |
| 1676 | + |> Jpipe.custom (optionalField "mechanician" (Jdec.nullable Jdec.int) Nothing) | |
| 1677 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1678 | + |> Jpipe.custom (optionalField "Onopordon" (Jdec.nullable Jdec.int) Nothing) | |
| 1679 | + |> Jpipe.custom (optionalField "podgily" (Jdec.nullable Jdec.int) Nothing) | |
| 1680 | + |> Jpipe.custom (optionalField "reformableness" (Jdec.nullable Jdec.int) Nothing) | |
| 1681 | + |> Jpipe.custom (optionalField "scatterbrains" (Jdec.nullable Jdec.int) Nothing) | |
| 1682 | + |> Jpipe.custom (optionalField "seminuria" (Jdec.nullable Jdec.int) Nothing) | |
| 1683 | + |> Jpipe.custom (optionalField "Sodomite" (Jdec.nullable Jdec.int) Nothing) | |
| 1684 | + |> Jpipe.custom (optionalField "tramp" (Jdec.nullable Jdec.int) Nothing) | |
| 1685 | + |> Jpipe.custom (optionalField "undueness" (Jdec.nullable Jdec.int) Nothing) | |
| 1686 | + |> Jpipe.custom (optionalField "worthily" (Jdec.nullable Jdec.int) Nothing) | |
| 1687 | + |> Jpipe.custom (optionalField "Yankeeist" (Jdec.nullable Jdec.int) Nothing) | |
| 1682 | 1688 | |
| 1683 | 1689 | encodeStrenuosityClass : StrenuosityClass -> Jenc.Value |
| 1684 | 1690 | encodeStrenuosityClass x = |
| @@ -1777,31 +1783,31 @@ encodeTruantcyElement x = case x of | ||
| 1777 | 1783 | truantcyClass : Jdec.Decoder TruantcyClass |
| 1778 | 1784 | truantcyClass = |
| 1779 | 1785 | Jdec.succeed TruantcyClass |
| 1780 | - |> Jpipe.optional "alfiona" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1781 | - |> Jpipe.optional "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1782 | - |> Jpipe.optional "bungey" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1783 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1784 | - |> Jpipe.optional "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1785 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1786 | - |> Jpipe.optional "chorology" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1787 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1788 | - |> Jpipe.optional "enmarble" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1789 | - |> Jpipe.optional "Epeira" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1790 | - |> Jpipe.optional "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1791 | - |> Jpipe.optional "germination" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1792 | - |> Jpipe.optional "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1793 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1794 | - |> Jpipe.optional "lev" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1795 | - |> Jpipe.optional "mouthing" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1796 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1797 | - |> Jpipe.optional "philliloo" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1798 | - |> Jpipe.optional "planetal" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1799 | - |> Jpipe.optional "poney" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1800 | - |> Jpipe.optional "punctualist" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1801 | - |> Jpipe.optional "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1802 | - |> Jpipe.optional "skelder" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1803 | - |> Jpipe.optional "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1804 | - |> Jpipe.optional "Yuman" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1786 | + |> Jpipe.custom (optionalField "alfiona" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1787 | + |> Jpipe.custom (optionalField "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1788 | + |> Jpipe.custom (optionalField "bungey" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1789 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1790 | + |> Jpipe.custom (optionalField "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1791 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1792 | + |> Jpipe.custom (optionalField "chorology" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1793 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1794 | + |> Jpipe.custom (optionalField "enmarble" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1795 | + |> Jpipe.custom (optionalField "Epeira" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1796 | + |> Jpipe.custom (optionalField "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1797 | + |> Jpipe.custom (optionalField "germination" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1798 | + |> Jpipe.custom (optionalField "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1799 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1800 | + |> Jpipe.custom (optionalField "lev" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1801 | + |> Jpipe.custom (optionalField "mouthing" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1802 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1803 | + |> Jpipe.custom (optionalField "philliloo" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1804 | + |> Jpipe.custom (optionalField "planetal" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1805 | + |> Jpipe.custom (optionalField "poney" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1806 | + |> Jpipe.custom (optionalField "punctualist" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1807 | + |> Jpipe.custom (optionalField "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1808 | + |> Jpipe.custom (optionalField "skelder" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1809 | + |> Jpipe.custom (optionalField "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1810 | + |> Jpipe.custom (optionalField "Yuman" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1805 | 1811 | |
| 1806 | 1812 | encodeTruantcyClass : TruantcyClass -> Jenc.Value |
| 1807 | 1813 | encodeTruantcyClass x = |
| @@ -1904,31 +1910,31 @@ encodeUnimpeachablyElement x = case x of | ||
| 1904 | 1910 | unimpeachablyClass : Jdec.Decoder UnimpeachablyClass |
| 1905 | 1911 | unimpeachablyClass = |
| 1906 | 1912 | Jdec.succeed UnimpeachablyClass |
| 1907 | - |> Jpipe.optional "acerin" (Jdec.nullable Jdec.int) Nothing | |
| 1908 | - |> Jpipe.optional "Bobadil" (Jdec.nullable Jdec.int) Nothing | |
| 1909 | - |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing | |
| 1910 | - |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing | |
| 1911 | - |> Jpipe.optional "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing | |
| 1912 | - |> Jpipe.optional "conversational" (Jdec.nullable Jdec.int) Nothing | |
| 1913 | - |> Jpipe.optional "demiowl" (Jdec.nullable Jdec.int) Nothing | |
| 1914 | - |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing | |
| 1915 | - |> Jpipe.optional "ectorhinal" (Jdec.nullable Jdec.int) Nothing | |
| 1916 | - |> Jpipe.optional "gamblesomeness" (Jdec.nullable Jdec.int) Nothing | |
| 1917 | - |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing | |
| 1918 | - |> Jpipe.optional "irrorate" (Jdec.nullable Jdec.int) Nothing | |
| 1919 | - |> Jpipe.optional "kindergartening" (Jdec.nullable Jdec.int) Nothing | |
| 1920 | - |> Jpipe.optional "lateritic" (Jdec.nullable Jdec.int) Nothing | |
| 1921 | - |> Jpipe.optional "mespil" (Jdec.nullable Jdec.int) Nothing | |
| 1922 | - |> Jpipe.optional "misconfiguration" (Jdec.nullable Jdec.int) Nothing | |
| 1923 | - |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing | |
| 1924 | - |> Jpipe.optional "planometry" (Jdec.nullable Jdec.int) Nothing | |
| 1925 | - |> Jpipe.optional "Quiina" (Jdec.nullable Jdec.int) Nothing | |
| 1926 | - |> Jpipe.optional "Robert" (Jdec.nullable Jdec.int) Nothing | |
| 1927 | - |> Jpipe.optional "rot" (Jdec.nullable Jdec.int) Nothing | |
| 1928 | - |> Jpipe.optional "subcinctorium" (Jdec.nullable Jdec.int) Nothing | |
| 1929 | - |> Jpipe.optional "tussocker" (Jdec.nullable Jdec.int) Nothing | |
| 1930 | - |> Jpipe.optional "ultraproud" (Jdec.nullable Jdec.int) Nothing | |
| 1931 | - |> Jpipe.optional "unsuggestedness" (Jdec.nullable Jdec.int) Nothing | |
| 1913 | + |> Jpipe.custom (optionalField "acerin" (Jdec.nullable Jdec.int) Nothing) | |
| 1914 | + |> Jpipe.custom (optionalField "Bobadil" (Jdec.nullable Jdec.int) Nothing) | |
| 1915 | + |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing) | |
| 1916 | + |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing) | |
| 1917 | + |> Jpipe.custom (optionalField "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing) | |
| 1918 | + |> Jpipe.custom (optionalField "conversational" (Jdec.nullable Jdec.int) Nothing) | |
| 1919 | + |> Jpipe.custom (optionalField "demiowl" (Jdec.nullable Jdec.int) Nothing) | |
| 1920 | + |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing) | |
| 1921 | + |> Jpipe.custom (optionalField "ectorhinal" (Jdec.nullable Jdec.int) Nothing) | |
| 1922 | + |> Jpipe.custom (optionalField "gamblesomeness" (Jdec.nullable Jdec.int) Nothing) | |
| 1923 | + |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing) | |
| 1924 | + |> Jpipe.custom (optionalField "irrorate" (Jdec.nullable Jdec.int) Nothing) | |
| 1925 | + |> Jpipe.custom (optionalField "kindergartening" (Jdec.nullable Jdec.int) Nothing) | |
| 1926 | + |> Jpipe.custom (optionalField "lateritic" (Jdec.nullable Jdec.int) Nothing) | |
| 1927 | + |> Jpipe.custom (optionalField "mespil" (Jdec.nullable Jdec.int) Nothing) | |
| 1928 | + |> Jpipe.custom (optionalField "misconfiguration" (Jdec.nullable Jdec.int) Nothing) | |
| 1929 | + |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 1930 | + |> Jpipe.custom (optionalField "planometry" (Jdec.nullable Jdec.int) Nothing) | |
| 1931 | + |> Jpipe.custom (optionalField "Quiina" (Jdec.nullable Jdec.int) Nothing) | |
| 1932 | + |> Jpipe.custom (optionalField "Robert" (Jdec.nullable Jdec.int) Nothing) | |
| 1933 | + |> Jpipe.custom (optionalField "rot" (Jdec.nullable Jdec.int) Nothing) | |
| 1934 | + |> Jpipe.custom (optionalField "subcinctorium" (Jdec.nullable Jdec.int) Nothing) | |
| 1935 | + |> Jpipe.custom (optionalField "tussocker" (Jdec.nullable Jdec.int) Nothing) | |
| 1936 | + |> Jpipe.custom (optionalField "ultraproud" (Jdec.nullable Jdec.int) Nothing) | |
| 1937 | + |> Jpipe.custom (optionalField "unsuggestedness" (Jdec.nullable Jdec.int) Nothing) | |
| 1932 | 1938 | |
| 1933 | 1939 | encodeUnimpeachablyClass : UnimpeachablyClass -> Jenc.Value |
| 1934 | 1940 | encodeUnimpeachablyClass x = |
| @@ -2033,26 +2039,26 @@ encodeUnstressedElement x = case x of | ||
| 2033 | 2039 | unstressedClass : Jdec.Decoder UnstressedClass |
| 2034 | 2040 | unstressedClass = |
| 2035 | 2041 | Jdec.succeed UnstressedClass |
| 2036 | - |> Jpipe.optional "Alain" (Jdec.null ()) () | |
| 2037 | - |> Jpipe.optional "Amphirhina" (Jdec.null ()) () | |
| 2038 | - |> Jpipe.optional "antimachinery" (Jdec.null ()) () | |
| 2039 | - |> Jpipe.optional "coldish" (Jdec.null ()) () | |
| 2040 | - |> Jpipe.optional "crantara" (Jdec.null ()) () | |
| 2041 | - |> Jpipe.optional "distinguishing" (Jdec.null ()) () | |
| 2042 | - |> Jpipe.optional "elytroposis" (Jdec.null ()) () | |
| 2043 | - |> Jpipe.optional "gentianwort" (Jdec.null ()) () | |
| 2044 | - |> Jpipe.optional "heliosis" (Jdec.null ()) () | |
| 2045 | - |> Jpipe.optional "instrumental" (Jdec.null ()) () | |
| 2046 | - |> Jpipe.optional "introinflection" (Jdec.null ()) () | |
| 2047 | - |> Jpipe.optional "kala" (Jdec.null ()) () | |
| 2048 | - |> Jpipe.optional "Lincolnian" (Jdec.null ()) () | |
| 2049 | - |> Jpipe.optional "metad" (Jdec.null ()) () | |
| 2050 | - |> Jpipe.optional "Sarcophilus" (Jdec.null ()) () | |
| 2051 | - |> Jpipe.optional "swingingly" (Jdec.null ()) () | |
| 2052 | - |> Jpipe.optional "unconformity" (Jdec.null ()) () | |
| 2053 | - |> Jpipe.optional "undecreed" (Jdec.null ()) () | |
| 2054 | - |> Jpipe.optional "venerable" (Jdec.null ()) () | |
| 2055 | - |> Jpipe.optional "vowellessness" (Jdec.null ()) () | |
| 2042 | + |> Jpipe.custom (optionalField "Alain" (Jdec.null ()) ()) | |
| 2043 | + |> Jpipe.custom (optionalField "Amphirhina" (Jdec.null ()) ()) | |
| 2044 | + |> Jpipe.custom (optionalField "antimachinery" (Jdec.null ()) ()) | |
| 2045 | + |> Jpipe.custom (optionalField "coldish" (Jdec.null ()) ()) | |
| 2046 | + |> Jpipe.custom (optionalField "crantara" (Jdec.null ()) ()) | |
| 2047 | + |> Jpipe.custom (optionalField "distinguishing" (Jdec.null ()) ()) | |
| 2048 | + |> Jpipe.custom (optionalField "elytroposis" (Jdec.null ()) ()) | |
| 2049 | + |> Jpipe.custom (optionalField "gentianwort" (Jdec.null ()) ()) | |
| 2050 | + |> Jpipe.custom (optionalField "heliosis" (Jdec.null ()) ()) | |
| 2051 | + |> Jpipe.custom (optionalField "instrumental" (Jdec.null ()) ()) | |
| 2052 | + |> Jpipe.custom (optionalField "introinflection" (Jdec.null ()) ()) | |
| 2053 | + |> Jpipe.custom (optionalField "kala" (Jdec.null ()) ()) | |
| 2054 | + |> Jpipe.custom (optionalField "Lincolnian" (Jdec.null ()) ()) | |
| 2055 | + |> Jpipe.custom (optionalField "metad" (Jdec.null ()) ()) | |
| 2056 | + |> Jpipe.custom (optionalField "Sarcophilus" (Jdec.null ()) ()) | |
| 2057 | + |> Jpipe.custom (optionalField "swingingly" (Jdec.null ()) ()) | |
| 2058 | + |> Jpipe.custom (optionalField "unconformity" (Jdec.null ()) ()) | |
| 2059 | + |> Jpipe.custom (optionalField "undecreed" (Jdec.null ()) ()) | |
| 2060 | + |> Jpipe.custom (optionalField "venerable" (Jdec.null ()) ()) | |
| 2061 | + |> Jpipe.custom (optionalField "vowellessness" (Jdec.null ()) ()) | |
| 2056 | 2062 | |
| 2057 | 2063 | encodeUnstressedClass : UnstressedClass -> Jenc.Value |
| 2058 | 2064 | encodeUnstressedClass x = |
| @@ -2148,26 +2154,26 @@ encodeWrothyElement x = case x of | ||
| 2148 | 2154 | wrothyClass : Jdec.Decoder WrothyClass |
| 2149 | 2155 | wrothyClass = |
| 2150 | 2156 | Jdec.succeed WrothyClass |
| 2151 | - |> Jpipe.optional "Aeschynanthus" (Jdec.null ()) () | |
| 2152 | - |> Jpipe.optional "aquiferous" (Jdec.null ()) () | |
| 2153 | - |> Jpipe.optional "cheapener" (Jdec.null ()) () | |
| 2154 | - |> Jpipe.optional "enumeration" (Jdec.null ()) () | |
| 2155 | - |> Jpipe.optional "Ephesine" (Jdec.null ()) () | |
| 2156 | - |> Jpipe.optional "escadrille" (Jdec.null ()) () | |
| 2157 | - |> Jpipe.optional "estrous" (Jdec.null ()) () | |
| 2158 | - |> Jpipe.optional "interestedly" (Jdec.null ()) () | |
| 2159 | - |> Jpipe.optional "katakinetomer" (Jdec.null ()) () | |
| 2160 | - |> Jpipe.optional "mortification" (Jdec.null ()) () | |
| 2161 | - |> Jpipe.optional "morula" (Jdec.null ()) () | |
| 2162 | - |> Jpipe.optional "orthosymmetrical" (Jdec.null ()) () | |
| 2163 | - |> Jpipe.optional "overbark" (Jdec.null ()) () | |
| 2164 | - |> Jpipe.optional "politist" (Jdec.null ()) () | |
| 2165 | - |> Jpipe.optional "qualified" (Jdec.null ()) () | |
| 2166 | - |> Jpipe.optional "sphenomalar" (Jdec.null ()) () | |
| 2167 | - |> Jpipe.optional "throatful" (Jdec.null ()) () | |
| 2168 | - |> Jpipe.optional "transhumance" (Jdec.null ()) () | |
| 2169 | - |> Jpipe.optional "triandrian" (Jdec.null ()) () | |
| 2170 | - |> Jpipe.optional "unbooked" (Jdec.null ()) () | |
| 2157 | + |> Jpipe.custom (optionalField "Aeschynanthus" (Jdec.null ()) ()) | |
| 2158 | + |> Jpipe.custom (optionalField "aquiferous" (Jdec.null ()) ()) | |
| 2159 | + |> Jpipe.custom (optionalField "cheapener" (Jdec.null ()) ()) | |
| 2160 | + |> Jpipe.custom (optionalField "enumeration" (Jdec.null ()) ()) | |
| 2161 | + |> Jpipe.custom (optionalField "Ephesine" (Jdec.null ()) ()) | |
| 2162 | + |> Jpipe.custom (optionalField "escadrille" (Jdec.null ()) ()) | |
| 2163 | + |> Jpipe.custom (optionalField "estrous" (Jdec.null ()) ()) | |
| 2164 | + |> Jpipe.custom (optionalField "interestedly" (Jdec.null ()) ()) | |
| 2165 | + |> Jpipe.custom (optionalField "katakinetomer" (Jdec.null ()) ()) | |
| 2166 | + |> Jpipe.custom (optionalField "mortification" (Jdec.null ()) ()) | |
| 2167 | + |> Jpipe.custom (optionalField "morula" (Jdec.null ()) ()) | |
| 2168 | + |> Jpipe.custom (optionalField "orthosymmetrical" (Jdec.null ()) ()) | |
| 2169 | + |> Jpipe.custom (optionalField "overbark" (Jdec.null ()) ()) | |
| 2170 | + |> Jpipe.custom (optionalField "politist" (Jdec.null ()) ()) | |
| 2171 | + |> Jpipe.custom (optionalField "qualified" (Jdec.null ()) ()) | |
| 2172 | + |> Jpipe.custom (optionalField "sphenomalar" (Jdec.null ()) ()) | |
| 2173 | + |> Jpipe.custom (optionalField "throatful" (Jdec.null ()) ()) | |
| 2174 | + |> Jpipe.custom (optionalField "transhumance" (Jdec.null ()) ()) | |
| 2175 | + |> Jpipe.custom (optionalField "triandrian" (Jdec.null ()) ()) | |
| 2176 | + |> Jpipe.custom (optionalField "unbooked" (Jdec.null ()) ()) | |
| 2171 | 2177 | |
| 2172 | 2178 | encodeWrothyClass : WrothyClass -> Jenc.Value |
| 2173 | 2179 | encodeWrothyClass x = |
Test case
1 generated file · +6 −0test/inputs/json/priority/combined-enum.json
Melmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type X | ||
| 39 | 39 | | Two |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickTypeToString : QuickType -> String |
| 44 | 50 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/priority/empty-enum.json
Melmdefault / QuickType.elm+7 −1
| @@ -32,6 +32,12 @@ type alias Foo = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -50,7 +56,7 @@ encodeQuickType x = | ||
| 50 | 56 | foo : Jdec.Decoder Foo |
| 51 | 57 | foo = |
| 52 | 58 | Jdec.succeed Foo |
| 53 | - |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing | |
| 59 | + |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing) | |
| 54 | 60 | |
| 55 | 61 | encodeFoo : Foo -> Jenc.Value |
| 56 | 62 | encodeFoo x = |
Test case
1 generated file · +6 −0test/inputs/json/priority/identifiers.json
Melmdefault / QuickType.elm+6 −0
| @@ -65,6 +65,12 @@ type alias ThisIsAToughOne = | ||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | -- decoders and encoders |
| 68 | +optionalField key decoder fallback = | |
| 69 | + Jdec.dict Jdec.value | |
| 70 | + |> Jdec.andThen (\m -> | |
| 71 | + case Dict.get key m of | |
| 72 | + Nothing -> Jdec.succeed fallback | |
| 73 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 68 | 74 | |
| 69 | 75 | quickTypeToString : QuickType -> String |
| 70 | 76 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/issue2680-object-array.json
Melmdefault / QuickType.elm+6 −0
| @@ -30,6 +30,12 @@ type alias QuickTypeElement = | ||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | -- decoders and encoders |
| 33 | +optionalField key decoder fallback = | |
| 34 | + Jdec.dict Jdec.value | |
| 35 | + |> Jdec.andThen (\m -> | |
| 36 | + case Dict.get key m of | |
| 37 | + Nothing -> Jdec.succeed fallback | |
| 38 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 33 | 39 | |
| 34 | 40 | quickType : Jdec.Decoder QuickType |
| 35 | 41 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/priority/issue2680-scalar-array.json
Melmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = List Int |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.list Jdec.int |
Test case
1 generated file · +6 −0test/inputs/json/priority/keywords.json
Melmdefault / QuickType.elm+6 −0
| @@ -1731,6 +1731,12 @@ type alias Yield = | ||
| 1731 | 1731 | } |
| 1732 | 1732 | |
| 1733 | 1733 | -- decoders and encoders |
| 1734 | +optionalField key decoder fallback = | |
| 1735 | + Jdec.dict Jdec.value | |
| 1736 | + |> Jdec.andThen (\m -> | |
| 1737 | + case Dict.get key m of | |
| 1738 | + Nothing -> Jdec.succeed fallback | |
| 1739 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 1734 | 1740 | |
| 1735 | 1741 | quickTypeToString : QuickType -> String |
| 1736 | 1742 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/kotlin-enum-class-case-collision.json
Melmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type CategoryEnum | ||
| 35 | 35 | | Category |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = Jdec.list quickTypeElement |
Test case
1 generated file · +6 −0test/inputs/json/priority/name-style.json
Melmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias QuickType = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +34 −28test/inputs/json/priority/nbl-stats.json
Melmdefault / QuickType.elm+34 −28
| @@ -384,6 +384,12 @@ type alias Totallds = | ||
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | -- decoders and encoders |
| 387 | +optionalField key decoder fallback = | |
| 388 | + Jdec.dict Jdec.value | |
| 389 | + |> Jdec.andThen (\m -> | |
| 390 | + case Dict.get key m of | |
| 391 | + Nothing -> Jdec.succeed fallback | |
| 392 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 387 | 393 | |
| 388 | 394 | quickTypeToString : QuickType -> String |
| 389 | 395 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -535,15 +541,15 @@ pbp : Jdec.Decoder Pbp | ||
| 535 | 541 | pbp = |
| 536 | 542 | Jdec.succeed Pbp |
| 537 | 543 | |> Jpipe.required "actionType" actionType |
| 538 | - |> Jpipe.optional "familyName" (Jdec.nullable Jdec.string) Nothing | |
| 539 | - |> Jpipe.optional "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing | |
| 540 | - |> Jpipe.optional "firstName" (Jdec.nullable Jdec.string) Nothing | |
| 541 | - |> Jpipe.optional "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing | |
| 544 | + |> Jpipe.custom (optionalField "familyName" (Jdec.nullable Jdec.string) Nothing) | |
| 545 | + |> Jpipe.custom (optionalField "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing) | |
| 546 | + |> Jpipe.custom (optionalField "firstName" (Jdec.nullable Jdec.string) Nothing) | |
| 547 | + |> Jpipe.custom (optionalField "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing) | |
| 542 | 548 | |> Jpipe.required "gt" Jdec.string |
| 543 | - |> Jpipe.optional "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing | |
| 544 | - |> Jpipe.optional "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing | |
| 545 | - |> Jpipe.optional "internationalFirstName" (Jdec.nullable Jdec.string) Nothing | |
| 546 | - |> Jpipe.optional "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing | |
| 549 | + |> Jpipe.custom (optionalField "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing) | |
| 550 | + |> Jpipe.custom (optionalField "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing) | |
| 551 | + |> Jpipe.custom (optionalField "internationalFirstName" (Jdec.nullable Jdec.string) Nothing) | |
| 552 | + |> Jpipe.custom (optionalField "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing) | |
| 547 | 553 | |> Jpipe.required "lead" Jdec.int |
| 548 | 554 | |> Jpipe.required "period" Jdec.int |
| 549 | 555 | |> Jpipe.required "periodType" perType |
| @@ -552,7 +558,7 @@ pbp = | ||
| 552 | 558 | |> Jpipe.required "qualifier" Jdec.string |
| 553 | 559 | |> Jpipe.required "s1" Jdec.int |
| 554 | 560 | |> Jpipe.required "s2" Jdec.int |
| 555 | - |> Jpipe.optional "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing | |
| 561 | + |> Jpipe.custom (optionalField "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing) | |
| 556 | 562 | |> Jpipe.required "scoring" Jdec.int |
| 557 | 563 | |> Jpipe.required "shirtNumber" Jdec.string |
| 558 | 564 | |> Jpipe.required "subType" Jdec.string |
| @@ -727,26 +733,26 @@ encodeScoreboardNameEnum x = case x of | ||
| 727 | 733 | scorer : Jdec.Decoder Scorer |
| 728 | 734 | scorer = |
| 729 | 735 | Jdec.succeed Scorer |
| 730 | - |> Jpipe.optional "familyName" (Jdec.nullable Jdec.string) Nothing | |
| 731 | - |> Jpipe.optional "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing | |
| 732 | - |> Jpipe.optional "firstName" (Jdec.nullable Jdec.string) Nothing | |
| 733 | - |> Jpipe.optional "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing | |
| 734 | - |> Jpipe.optional "gt" (Jdec.nullable Jdec.string) Nothing | |
| 735 | - |> Jpipe.optional "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing | |
| 736 | - |> Jpipe.optional "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing | |
| 737 | - |> Jpipe.optional "internationalFirstName" (Jdec.nullable Jdec.string) Nothing | |
| 738 | - |> Jpipe.optional "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing | |
| 739 | - |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing | |
| 740 | - |> Jpipe.optional "per" (Jdec.nullable Jdec.int) Nothing | |
| 741 | - |> Jpipe.optional "perType" (Jdec.nullable perType) Nothing | |
| 742 | - |> Jpipe.optional "player" (Jdec.nullable Jdec.string) Nothing | |
| 736 | + |> Jpipe.custom (optionalField "familyName" (Jdec.nullable Jdec.string) Nothing) | |
| 737 | + |> Jpipe.custom (optionalField "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing) | |
| 738 | + |> Jpipe.custom (optionalField "firstName" (Jdec.nullable Jdec.string) Nothing) | |
| 739 | + |> Jpipe.custom (optionalField "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing) | |
| 740 | + |> Jpipe.custom (optionalField "gt" (Jdec.nullable Jdec.string) Nothing) | |
| 741 | + |> Jpipe.custom (optionalField "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing) | |
| 742 | + |> Jpipe.custom (optionalField "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing) | |
| 743 | + |> Jpipe.custom (optionalField "internationalFirstName" (Jdec.nullable Jdec.string) Nothing) | |
| 744 | + |> Jpipe.custom (optionalField "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing) | |
| 745 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing) | |
| 746 | + |> Jpipe.custom (optionalField "per" (Jdec.nullable Jdec.int) Nothing) | |
| 747 | + |> Jpipe.custom (optionalField "perType" (Jdec.nullable perType) Nothing) | |
| 748 | + |> Jpipe.custom (optionalField "player" (Jdec.nullable Jdec.string) Nothing) | |
| 743 | 749 | |> Jpipe.required "pno" Jdec.int |
| 744 | - |> Jpipe.optional "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing | |
| 750 | + |> Jpipe.custom (optionalField "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing) | |
| 745 | 751 | |> Jpipe.required "shirtNumber" Jdec.string |
| 746 | - |> Jpipe.optional "summary" (Jdec.nullable Jdec.string) Nothing | |
| 747 | - |> Jpipe.optional "times" (Jdec.nullable (Jdec.list time)) Nothing | |
| 752 | + |> Jpipe.custom (optionalField "summary" (Jdec.nullable Jdec.string) Nothing) | |
| 753 | + |> Jpipe.custom (optionalField "times" (Jdec.nullable (Jdec.list time)) Nothing) | |
| 748 | 754 | |> Jpipe.required "tno" Jdec.int |
| 749 | - |> Jpipe.optional "tot" (Jdec.nullable Jdec.int) Nothing | |
| 755 | + |> Jpipe.custom (optionalField "tot" (Jdec.nullable Jdec.int) Nothing) | |
| 750 | 756 | |
| 751 | 757 | encodeScorer : Scorer -> Jenc.Value |
| 752 | 758 | encodeScorer x = |
| @@ -961,8 +967,8 @@ pl : Jdec.Decoder Pl | ||
| 961 | 967 | pl = |
| 962 | 968 | Jdec.succeed Pl |
| 963 | 969 | |> Jpipe.required "active" Jdec.int |
| 964 | - |> Jpipe.optional "captain" (Jdec.nullable Jdec.int) Nothing | |
| 965 | - |> Jpipe.optional "comp" (Jdec.nullable comp) Nothing | |
| 970 | + |> Jpipe.custom (optionalField "captain" (Jdec.nullable Jdec.int) Nothing) | |
| 971 | + |> Jpipe.custom (optionalField "comp" (Jdec.nullable comp) Nothing) | |
| 966 | 972 | |> Jpipe.required "eff_1" Jdec.int |
| 967 | 973 | |> Jpipe.required "eff_2" Jdec.int |
| 968 | 974 | |> Jpipe.required "eff_3" Jdec.float |
Test case
1 generated file · +6 −0test/inputs/json/priority/nested-objects.json
Melmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/no-classes.json
Melmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = Int |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.int |
Test case
1 generated file · +7 −1test/inputs/json/priority/nst-test-suite.json
Melmdefault / QuickType.elm+7 −1
| @@ -184,6 +184,12 @@ type alias YObjectWithNewlinesJSON = | ||
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | -- decoders and encoders |
| 187 | +optionalField key decoder fallback = | |
| 188 | + Jdec.dict Jdec.value | |
| 189 | + |> Jdec.andThen (\m -> | |
| 190 | + case Dict.get key m of | |
| 191 | + Nothing -> Jdec.succeed fallback | |
| 192 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 187 | 193 | |
| 188 | 194 | quickTypeToString : QuickType -> String |
| 189 | 195 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -277,7 +283,7 @@ quickType = | ||
| 277 | 283 | |> Jpipe.required "y_structure_lonely_false.json" Jdec.bool |
| 278 | 284 | |> Jpipe.required "y_structure_lonely_int.json" Jdec.int |
| 279 | 285 | |> Jpipe.required "y_structure_lonely_negative_real.json" Jdec.float |
| 280 | - |> Jpipe.optional "y_structure_lonely_null.json" (Jdec.null ()) () | |
| 286 | + |> Jpipe.custom (optionalField "y_structure_lonely_null.json" (Jdec.null ()) ()) | |
| 281 | 287 | |> Jpipe.required "y_structure_lonely_string.json" Jdec.string |
| 282 | 288 | |> Jpipe.required "y_structure_lonely_true.json" Jdec.bool |
| 283 | 289 | |> Jpipe.required "y_structure_string_empty.json" Jdec.string |
Test case
1 generated file · +6 −0test/inputs/json/priority/number-map.json
Melmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/json/priority/omit-empty.json
Melmdefault / QuickType.elm+7 −1
| @@ -33,6 +33,12 @@ type alias Result = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -52,7 +58,7 @@ result : Jdec.Decoder Result | ||
| 52 | 58 | result = |
| 53 | 59 | Jdec.succeed Result |
| 54 | 60 | |> Jpipe.required "age" Jdec.int |
| 55 | - |> Jpipe.optional "name" (Jdec.nullable (Jdec.null ())) Nothing | |
| 61 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable (Jdec.null ())) Nothing) | |
| 56 | 62 | |
| 57 | 63 | encodeResult : Result -> Jenc.Value |
| 58 | 64 | encodeResult x = |
Test case
1 generated file · +7 −1test/inputs/json/priority/optional-union.json
Melmdefault / QuickType.elm+7 −1
| @@ -35,6 +35,12 @@ type A | ||
| 35 | 35 | | StringInA String |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = Jdec.list quickTypeElement |
| @@ -45,7 +51,7 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r) | ||
| 45 | 51 | quickTypeElement : Jdec.Decoder QuickTypeElement |
| 46 | 52 | quickTypeElement = |
| 47 | 53 | Jdec.succeed QuickTypeElement |
| 48 | - |> Jpipe.optional "a" (Jdec.nullable a) Nothing | |
| 54 | + |> Jpipe.custom (optionalField "a" (Jdec.nullable a) Nothing) | |
| 49 | 55 | |
| 50 | 56 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| 51 | 57 | encodeQuickTypeElement x = |
Test case
1 generated file · +6 −0test/inputs/json/priority/php-mixed-union.json
Melmdefault / QuickType.elm+6 −0
| @@ -40,6 +40,12 @@ type alias MixedClass = | ||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | -- decoders and encoders |
| 43 | +optionalField key decoder fallback = | |
| 44 | + Jdec.dict Jdec.value | |
| 45 | + |> Jdec.andThen (\m -> | |
| 46 | + case Dict.get key m of | |
| 47 | + Nothing -> Jdec.succeed fallback | |
| 48 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 43 | 49 | |
| 44 | 50 | quickTypeToString : QuickType -> String |
| 45 | 51 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/php-validation.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickType = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickTypeToString : QuickType -> String |
| 36 | 42 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/simple-identifiers.json
Melmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type alias QuickType = | ||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/union-constructor-clash.json
Melmdefault / QuickType.elm+6 −0
| @@ -38,6 +38,12 @@ type Union | ||
| 38 | 38 | | PurpleBoolInUnion Bool |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/unions.json
Melmdefault / QuickType.elm+6 −0
| @@ -46,6 +46,12 @@ type alias ZClass = | ||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | -- decoders and encoders |
| 49 | +optionalField key decoder fallback = | |
| 50 | + Jdec.dict Jdec.value | |
| 51 | + |> Jdec.andThen (\m -> | |
| 52 | + case Dict.get key m of | |
| 53 | + Nothing -> Jdec.succeed fallback | |
| 54 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 49 | 55 | |
| 50 | 56 | quickTypeToString : QuickType -> String |
| 51 | 57 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/url.json
Melmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/priority/uuids.json
Melmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type alias QuickType = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/samples/bitcoin-block.json
Melmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias QuickType = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickTypeToString : QuickType -> String |
| 36 | 42 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/json/samples/getting-started.json
Melmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +35 −29test/inputs/json/samples/github-events.json
Melmdefault / QuickType.elm+35 −29
| @@ -333,6 +333,12 @@ type alias QuickTypeRepo = | ||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | -- decoders and encoders |
| 336 | +optionalField key decoder fallback = | |
| 337 | + Jdec.dict Jdec.value | |
| 338 | + |> Jdec.andThen (\m -> | |
| 339 | + case Dict.get key m of | |
| 340 | + Nothing -> Jdec.succeed fallback | |
| 341 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 336 | 342 | |
| 337 | 343 | quickType : Jdec.Decoder QuickType |
| 338 | 344 | quickType = Jdec.list quickTypeElement |
| @@ -346,7 +352,7 @@ quickTypeElement = | ||
| 346 | 352 | |> Jpipe.required "actor" actor |
| 347 | 353 | |> Jpipe.required "created_at" Jdec.string |
| 348 | 354 | |> Jpipe.required "id" Jdec.string |
| 349 | - |> Jpipe.optional "org" (Jdec.nullable actor) Nothing | |
| 355 | + |> Jpipe.custom (optionalField "org" (Jdec.nullable actor) Nothing) | |
| 350 | 356 | |> Jpipe.required "payload" payload |
| 351 | 357 | |> Jpipe.required "public" Jdec.bool |
| 352 | 358 | |> Jpipe.required "type" Jdec.string |
| @@ -369,7 +375,7 @@ actor : Jdec.Decoder Actor | ||
| 369 | 375 | actor = |
| 370 | 376 | Jdec.succeed Actor |
| 371 | 377 | |> Jpipe.required "avatar_url" Jdec.string |
| 372 | - |> Jpipe.optional "display_login" (Jdec.nullable Jdec.string) Nothing | |
| 378 | + |> Jpipe.custom (optionalField "display_login" (Jdec.nullable Jdec.string) Nothing) | |
| 373 | 379 | |> Jpipe.required "gravatar_id" Jdec.string |
| 374 | 380 | |> Jpipe.required "id" Jdec.int |
| 375 | 381 | |> Jpipe.required "login" Jdec.string |
| @@ -389,22 +395,22 @@ encodeActor x = | ||
| 389 | 395 | payload : Jdec.Decoder Payload |
| 390 | 396 | payload = |
| 391 | 397 | Jdec.succeed Payload |
| 392 | - |> Jpipe.optional "action" (Jdec.nullable Jdec.string) Nothing | |
| 393 | - |> Jpipe.optional "before" (Jdec.nullable Jdec.string) Nothing | |
| 394 | - |> Jpipe.optional "comment" (Jdec.nullable comment) Nothing | |
| 395 | - |> Jpipe.optional "commits" (Jdec.nullable (Jdec.list commit)) Nothing | |
| 396 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 397 | - |> Jpipe.optional "distinct_size" (Jdec.nullable Jdec.int) Nothing | |
| 398 | - |> Jpipe.optional "head" (Jdec.nullable Jdec.string) Nothing | |
| 399 | - |> Jpipe.optional "issue" (Jdec.nullable issue) Nothing | |
| 400 | - |> Jpipe.optional "master_branch" (Jdec.nullable Jdec.string) Nothing | |
| 401 | - |> Jpipe.optional "number" (Jdec.nullable Jdec.int) Nothing | |
| 402 | - |> Jpipe.optional "pull_request" (Jdec.nullable payloadPullRequest) Nothing | |
| 403 | - |> Jpipe.optional "push_id" (Jdec.nullable Jdec.int) Nothing | |
| 404 | - |> Jpipe.optional "pusher_type" (Jdec.nullable Jdec.string) Nothing | |
| 405 | - |> Jpipe.optional "ref" (Jdec.nullable Jdec.string) Nothing | |
| 406 | - |> Jpipe.optional "ref_type" (Jdec.nullable Jdec.string) Nothing | |
| 407 | - |> Jpipe.optional "size" (Jdec.nullable Jdec.int) Nothing | |
| 398 | + |> Jpipe.custom (optionalField "action" (Jdec.nullable Jdec.string) Nothing) | |
| 399 | + |> Jpipe.custom (optionalField "before" (Jdec.nullable Jdec.string) Nothing) | |
| 400 | + |> Jpipe.custom (optionalField "comment" (Jdec.nullable comment) Nothing) | |
| 401 | + |> Jpipe.custom (optionalField "commits" (Jdec.nullable (Jdec.list commit)) Nothing) | |
| 402 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 403 | + |> Jpipe.custom (optionalField "distinct_size" (Jdec.nullable Jdec.int) Nothing) | |
| 404 | + |> Jpipe.custom (optionalField "head" (Jdec.nullable Jdec.string) Nothing) | |
| 405 | + |> Jpipe.custom (optionalField "issue" (Jdec.nullable issue) Nothing) | |
| 406 | + |> Jpipe.custom (optionalField "master_branch" (Jdec.nullable Jdec.string) Nothing) | |
| 407 | + |> Jpipe.custom (optionalField "number" (Jdec.nullable Jdec.int) Nothing) | |
| 408 | + |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable payloadPullRequest) Nothing) | |
| 409 | + |> Jpipe.custom (optionalField "push_id" (Jdec.nullable Jdec.int) Nothing) | |
| 410 | + |> Jpipe.custom (optionalField "pusher_type" (Jdec.nullable Jdec.string) Nothing) | |
| 411 | + |> Jpipe.custom (optionalField "ref" (Jdec.nullable Jdec.string) Nothing) | |
| 412 | + |> Jpipe.custom (optionalField "ref_type" (Jdec.nullable Jdec.string) Nothing) | |
| 413 | + |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.int) Nothing) | |
| 408 | 414 | |
| 409 | 415 | encodePayload : Payload -> Jenc.Value |
| 410 | 416 | encodePayload x = |
| @@ -545,10 +551,10 @@ encodeAuthor x = | ||
| 545 | 551 | issue : Jdec.Decoder Issue |
| 546 | 552 | issue = |
| 547 | 553 | Jdec.succeed Issue |
| 548 | - |> Jpipe.optional "assignee" (Jdec.null ()) () | |
| 554 | + |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ()) | |
| 549 | 555 | |> Jpipe.required "assignees" (Jdec.list Jdec.value) |
| 550 | 556 | |> Jpipe.required "body" Jdec.string |
| 551 | - |> Jpipe.optional "closed_at" (Jdec.nullable Jdec.string) Nothing | |
| 557 | + |> Jpipe.custom (optionalField "closed_at" (Jdec.nullable Jdec.string) Nothing) | |
| 552 | 558 | |> Jpipe.required "comments" Jdec.int |
| 553 | 559 | |> Jpipe.required "comments_url" Jdec.string |
| 554 | 560 | |> Jpipe.required "created_at" Jdec.string |
| @@ -558,9 +564,9 @@ issue = | ||
| 558 | 564 | |> Jpipe.required "labels" (Jdec.list label) |
| 559 | 565 | |> Jpipe.required "labels_url" Jdec.string |
| 560 | 566 | |> Jpipe.required "locked" Jdec.bool |
| 561 | - |> Jpipe.optional "milestone" (Jdec.nullable milestone) Nothing | |
| 567 | + |> Jpipe.custom (optionalField "milestone" (Jdec.nullable milestone) Nothing) | |
| 562 | 568 | |> Jpipe.required "number" Jdec.int |
| 563 | - |> Jpipe.optional "pull_request" (Jdec.nullable issuePullRequest) Nothing | |
| 569 | + |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable issuePullRequest) Nothing) | |
| 564 | 570 | |> Jpipe.required "repository_url" Jdec.string |
| 565 | 571 | |> Jpipe.required "state" Jdec.string |
| 566 | 572 | |> Jpipe.required "title" Jdec.string |
| @@ -617,12 +623,12 @@ encodeLabel x = | ||
| 617 | 623 | milestone : Jdec.Decoder Milestone |
| 618 | 624 | milestone = |
| 619 | 625 | Jdec.succeed Milestone |
| 620 | - |> Jpipe.optional "closed_at" (Jdec.null ()) () | |
| 626 | + |> Jpipe.custom (optionalField "closed_at" (Jdec.null ()) ()) | |
| 621 | 627 | |> Jpipe.required "closed_issues" Jdec.int |
| 622 | 628 | |> Jpipe.required "created_at" Jdec.string |
| 623 | 629 | |> Jpipe.required "creator" userClass |
| 624 | 630 | |> Jpipe.required "description" Jdec.string |
| 625 | - |> Jpipe.optional "due_on" (Jdec.nullable Jdec.string) Nothing | |
| 631 | + |> Jpipe.custom (optionalField "due_on" (Jdec.nullable Jdec.string) Nothing) | |
| 626 | 632 | |> Jpipe.required "html_url" Jdec.string |
| 627 | 633 | |> Jpipe.required "id" Jdec.int |
| 628 | 634 | |> Jpipe.required "labels_url" Jdec.string |
| @@ -674,7 +680,7 @@ payloadPullRequest : Jdec.Decoder PayloadPullRequest | ||
| 674 | 680 | payloadPullRequest = |
| 675 | 681 | Jdec.succeed PayloadPullRequest |
| 676 | 682 | |> Jpipe.required "additions" Jdec.int |
| 677 | - |> Jpipe.optional "assignee" (Jdec.null ()) () | |
| 683 | + |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ()) | |
| 678 | 684 | |> Jpipe.required "assignees" (Jdec.list Jdec.value) |
| 679 | 685 | |> Jpipe.required "base" base |
| 680 | 686 | |> Jpipe.required "body" Jdec.string |
| @@ -695,15 +701,15 @@ payloadPullRequest = | ||
| 695 | 701 | |> Jpipe.required "locked" Jdec.bool |
| 696 | 702 | |> Jpipe.required "maintainer_can_modify" Jdec.bool |
| 697 | 703 | |> Jpipe.required "merge_commit_sha" Jdec.string |
| 698 | - |> Jpipe.optional "mergeable" (Jdec.null ()) () | |
| 704 | + |> Jpipe.custom (optionalField "mergeable" (Jdec.null ()) ()) | |
| 699 | 705 | |> Jpipe.required "mergeable_state" Jdec.string |
| 700 | 706 | |> Jpipe.required "merged" Jdec.bool |
| 701 | 707 | |> Jpipe.required "merged_at" Jdec.string |
| 702 | 708 | |> Jpipe.required "merged_by" userClass |
| 703 | - |> Jpipe.optional "milestone" (Jdec.null ()) () | |
| 709 | + |> Jpipe.custom (optionalField "milestone" (Jdec.null ()) ()) | |
| 704 | 710 | |> Jpipe.required "number" Jdec.int |
| 705 | 711 | |> Jpipe.required "patch_url" Jdec.string |
| 706 | - |> Jpipe.optional "rebaseable" (Jdec.null ()) () | |
| 712 | + |> Jpipe.custom (optionalField "rebaseable" (Jdec.null ()) ()) | |
| 707 | 713 | |> Jpipe.required "requested_reviewers" (Jdec.list Jdec.value) |
| 708 | 714 | |> Jpipe.required "review_comment_url" Jdec.string |
| 709 | 715 | |> Jpipe.required "review_comments" Jdec.int |
| @@ -827,7 +833,7 @@ baseRepo = | ||
| 827 | 833 | |> Jpipe.required "languages_url" Jdec.string |
| 828 | 834 | |> Jpipe.required "merges_url" Jdec.string |
| 829 | 835 | |> Jpipe.required "milestones_url" Jdec.string |
| 830 | - |> Jpipe.optional "mirror_url" (Jdec.null ()) () | |
| 836 | + |> Jpipe.custom (optionalField "mirror_url" (Jdec.null ()) ()) | |
| 831 | 837 | |> Jpipe.required "name" Jdec.string |
| 832 | 838 | |> Jpipe.required "notifications_url" Jdec.string |
| 833 | 839 | |> Jpipe.required "open_issues" Jdec.int |
Test case
1 generated file · +9 −3test/inputs/json/samples/kitchen-sink.json
Melmdefault / QuickType.elm+9 −3
| @@ -69,6 +69,12 @@ type alias PurplePerson = | ||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | -- decoders and encoders |
| 72 | +optionalField key decoder fallback = | |
| 73 | + Jdec.dict Jdec.value | |
| 74 | + |> Jdec.andThen (\m -> | |
| 75 | + case Dict.get key m of | |
| 76 | + Nothing -> Jdec.succeed fallback | |
| 77 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 72 | 78 | |
| 73 | 79 | quickTypeToString : QuickType -> String |
| 74 | 80 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -82,8 +88,8 @@ quickType = | ||
| 82 | 88 | |> Jpipe.required "doubleValue" Jdec.float |
| 83 | 89 | |> Jpipe.required "intValue" Jdec.int |
| 84 | 90 | |> Jpipe.required "mapValue" (Jdec.dict (Jdec.nullable Jdec.int)) |
| 85 | - |> Jpipe.optional "name with spaces" (Jdec.null ()) () | |
| 86 | - |> Jpipe.optional "nullValue" (Jdec.null ()) () | |
| 91 | + |> Jpipe.custom (optionalField "name with spaces" (Jdec.null ()) ()) | |
| 92 | + |> Jpipe.custom (optionalField "nullValue" (Jdec.null ()) ()) | |
| 87 | 93 | |> Jpipe.required "nullableMapValue" (Jdec.dict (Jdec.nullable Jdec.int)) |
| 88 | 94 | |> Jpipe.required "people" (Jdec.list personElement) |
| 89 | 95 | |> Jpipe.required "person" purplePerson |
| @@ -140,7 +146,7 @@ personElement = | ||
| 140 | 146 | Jdec.succeed PersonElement |
| 141 | 147 | |> Jpipe.required "intOrString" intOrString |
| 142 | 148 | |> Jpipe.required "name" Jdec.string |
| 143 | - |> Jpipe.optional "optionalValue" (Jdec.nullable Jdec.bool) Nothing | |
| 149 | + |> Jpipe.custom (optionalField "optionalValue" (Jdec.nullable Jdec.bool) Nothing) | |
| 144 | 150 | |
| 145 | 151 | encodePersonElement : PersonElement -> Jenc.Value |
| 146 | 152 | encodePersonElement x = |
Test case
1 generated file · +9 −3test/inputs/json/samples/null-safe.json
Melmdefault / QuickType.elm+9 −3
| @@ -42,6 +42,12 @@ type alias Address = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -60,10 +66,10 @@ encodeQuickType x = | ||
| 60 | 66 | item : Jdec.Decoder Item |
| 61 | 67 | item = |
| 62 | 68 | Jdec.succeed Item |
| 63 | - |> Jpipe.optional "address" (Jdec.nullable address) Nothing | |
| 64 | - |> Jpipe.optional "created_at" (Jdec.nullable Jdec.string) Nothing | |
| 69 | + |> Jpipe.custom (optionalField "address" (Jdec.nullable address) Nothing) | |
| 70 | + |> Jpipe.custom (optionalField "created_at" (Jdec.nullable Jdec.string) Nothing) | |
| 65 | 71 | |> Jpipe.required "name" Jdec.string |
| 66 | - |> Jpipe.optional "sex" (Jdec.nullable Jdec.int) Nothing | |
| 72 | + |> Jpipe.custom (optionalField "sex" (Jdec.nullable Jdec.int) Nothing) | |
| 67 | 73 | |
| 68 | 74 | encodeItem : Item -> Jenc.Value |
| 69 | 75 | encodeItem x = |
Test case
1 generated file · +10 −4test/inputs/json/samples/pokedex.json
Melmdefault / QuickType.elm+10 −4
| @@ -83,6 +83,12 @@ type Type | ||
| 83 | 83 | | Normal |
| 84 | 84 | |
| 85 | 85 | -- decoders and encoders |
| 86 | +optionalField key decoder fallback = | |
| 87 | + Jdec.dict Jdec.value | |
| 88 | + |> Jdec.andThen (\m -> | |
| 89 | + case Dict.get key m of | |
| 90 | + Nothing -> Jdec.succeed fallback | |
| 91 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 86 | 92 | |
| 87 | 93 | quickTypeToString : QuickType -> String |
| 88 | 94 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -103,17 +109,17 @@ pokemon = | ||
| 103 | 109 | Jdec.succeed Pokemon |
| 104 | 110 | |> Jpipe.required "avg_spawns" Jdec.float |
| 105 | 111 | |> Jpipe.required "candy" Jdec.string |
| 106 | - |> Jpipe.optional "candy_count" (Jdec.nullable Jdec.int) Nothing | |
| 112 | + |> Jpipe.custom (optionalField "candy_count" (Jdec.nullable Jdec.int) Nothing) | |
| 107 | 113 | |> Jpipe.required "egg" egg |
| 108 | 114 | |> Jpipe.required "height" Jdec.string |
| 109 | 115 | |> Jpipe.required "id" Jdec.int |
| 110 | 116 | |> Jpipe.required "img" Jdec.string |
| 111 | - |> Jpipe.optional "multipliers" (Jdec.nullable (Jdec.list Jdec.float)) Nothing | |
| 117 | + |> Jpipe.custom (optionalField "multipliers" (Jdec.nullable (Jdec.list Jdec.float)) Nothing) | |
| 112 | 118 | |> Jpipe.required "name" Jdec.string |
| 113 | - |> Jpipe.optional "next_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing | |
| 119 | + |> Jpipe.custom (optionalField "next_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing) | |
| 114 | 120 | |> Jpipe.required "num" Jdec.string |
| 115 | 121 | |> Jpipe.required "type" (Jdec.list purpleType) |
| 116 | - |> Jpipe.optional "prev_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing | |
| 122 | + |> Jpipe.custom (optionalField "prev_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing) | |
| 117 | 123 | |> Jpipe.required "spawn_chance" Jdec.float |
| 118 | 124 | |> Jpipe.required "spawn_time" Jdec.string |
| 119 | 125 | |> Jpipe.required "weaknesses" (Jdec.list purpleType) |
Test case
1 generated file · +27 −21test/inputs/json/samples/reddit.json
Melmdefault / QuickType.elm+27 −21
| @@ -186,6 +186,12 @@ type Kind | ||
| 186 | 186 | = T3 |
| 187 | 187 | |
| 188 | 188 | -- decoders and encoders |
| 189 | +optionalField key decoder fallback = | |
| 190 | + Jdec.dict Jdec.value | |
| 191 | + |> Jdec.andThen (\m -> | |
| 192 | + case Dict.get key m of | |
| 193 | + Nothing -> Jdec.succeed fallback | |
| 194 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 189 | 195 | |
| 190 | 196 | quickTypeToString : QuickType -> String |
| 191 | 197 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -207,7 +213,7 @@ quickTypeData : Jdec.Decoder QuickTypeData | ||
| 207 | 213 | quickTypeData = |
| 208 | 214 | Jdec.succeed QuickTypeData |
| 209 | 215 | |> Jpipe.required "after" Jdec.string |
| 210 | - |> Jpipe.optional "before" (Jdec.null ()) () | |
| 216 | + |> Jpipe.custom (optionalField "before" (Jdec.null ()) ()) | |
| 211 | 217 | |> Jpipe.required "children" (Jdec.list child) |
| 212 | 218 | |> Jpipe.required "modhash" Jdec.string |
| 213 | 219 | |
| @@ -236,14 +242,14 @@ encodeChild x = | ||
| 236 | 242 | childData : Jdec.Decoder ChildData |
| 237 | 243 | childData = |
| 238 | 244 | Jdec.succeed ChildData |
| 239 | - |> Jpipe.optional "approved_at_utc" (Jdec.null ()) () | |
| 240 | - |> Jpipe.optional "approved_by" (Jdec.null ()) () | |
| 245 | + |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ()) | |
| 246 | + |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ()) | |
| 241 | 247 | |> Jpipe.required "archived" Jdec.bool |
| 242 | 248 | |> Jpipe.required "author" Jdec.string |
| 243 | - |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 244 | - |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 245 | - |> Jpipe.optional "banned_at_utc" (Jdec.null ()) () | |
| 246 | - |> Jpipe.optional "banned_by" (Jdec.null ()) () | |
| 249 | + |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 250 | + |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 251 | + |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ()) | |
| 252 | + |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ()) | |
| 247 | 253 | |> Jpipe.required "brand_safe" Jdec.bool |
| 248 | 254 | |> Jpipe.required "can_gild" Jdec.bool |
| 249 | 255 | |> Jpipe.required "can_mod_post" Jdec.bool |
| @@ -251,7 +257,7 @@ childData = | ||
| 251 | 257 | |> Jpipe.required "contest_mode" Jdec.bool |
| 252 | 258 | |> Jpipe.required "created" Jdec.int |
| 253 | 259 | |> Jpipe.required "created_utc" Jdec.int |
| 254 | - |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing | |
| 260 | + |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing) | |
| 255 | 261 | |> Jpipe.required "domain" domain |
| 256 | 262 | |> Jpipe.required "downs" Jdec.int |
| 257 | 263 | |> Jpipe.required "edited" Jdec.bool |
| @@ -261,37 +267,37 @@ childData = | ||
| 261 | 267 | |> Jpipe.required "id" Jdec.string |
| 262 | 268 | |> Jpipe.required "is_self" Jdec.bool |
| 263 | 269 | |> Jpipe.required "is_video" Jdec.bool |
| 264 | - |> Jpipe.optional "likes" (Jdec.null ()) () | |
| 265 | - |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing | |
| 266 | - |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing | |
| 270 | + |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ()) | |
| 271 | + |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing) | |
| 272 | + |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing) | |
| 267 | 273 | |> Jpipe.required "locked" Jdec.bool |
| 268 | - |> Jpipe.optional "media" (Jdec.null ()) () | |
| 274 | + |> Jpipe.custom (optionalField "media" (Jdec.null ()) ()) | |
| 269 | 275 | |> Jpipe.required "media_embed" mediaEmbed |
| 270 | 276 | |> Jpipe.required "mod_reports" (Jdec.list Jdec.value) |
| 271 | 277 | |> Jpipe.required "name" Jdec.string |
| 272 | 278 | |> Jpipe.required "num_comments" Jdec.int |
| 273 | - |> Jpipe.optional "num_reports" (Jdec.null ()) () | |
| 279 | + |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ()) | |
| 274 | 280 | |> Jpipe.required "over_18" Jdec.bool |
| 275 | 281 | |> Jpipe.required "parent_whitelist_status" whitelistStatus |
| 276 | 282 | |> Jpipe.required "permalink" Jdec.string |
| 277 | 283 | |> Jpipe.required "post_hint" postHint |
| 278 | 284 | |> Jpipe.required "preview" preview |
| 279 | 285 | |> Jpipe.required "quarantine" Jdec.bool |
| 280 | - |> Jpipe.optional "removal_reason" (Jdec.null ()) () | |
| 281 | - |> Jpipe.optional "report_reasons" (Jdec.null ()) () | |
| 286 | + |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ()) | |
| 287 | + |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ()) | |
| 282 | 288 | |> Jpipe.required "saved" Jdec.bool |
| 283 | 289 | |> Jpipe.required "score" Jdec.int |
| 284 | - |> Jpipe.optional "secure_media" (Jdec.null ()) () | |
| 290 | + |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ()) | |
| 285 | 291 | |> Jpipe.required "secure_media_embed" mediaEmbed |
| 286 | 292 | |> Jpipe.required "selftext" Jdec.string |
| 287 | - |> Jpipe.optional "selftext_html" (Jdec.null ()) () | |
| 293 | + |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ()) | |
| 288 | 294 | |> Jpipe.required "spoiler" Jdec.bool |
| 289 | 295 | |> Jpipe.required "stickied" Jdec.bool |
| 290 | 296 | |> Jpipe.required "subreddit" subreddit |
| 291 | 297 | |> Jpipe.required "subreddit_id" subredditID |
| 292 | 298 | |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed |
| 293 | 299 | |> Jpipe.required "subreddit_type" subredditType |
| 294 | - |> Jpipe.optional "suggested_sort" (Jdec.null ()) () | |
| 300 | + |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ()) | |
| 295 | 301 | |> Jpipe.required "thumbnail" Jdec.string |
| 296 | 302 | |> Jpipe.required "thumbnail_height" Jdec.int |
| 297 | 303 | |> Jpipe.required "thumbnail_width" Jdec.int |
| @@ -299,7 +305,7 @@ childData = | ||
| 299 | 305 | |> Jpipe.required "ups" Jdec.int |
| 300 | 306 | |> Jpipe.required "url" Jdec.string |
| 301 | 307 | |> Jpipe.required "user_reports" (Jdec.list Jdec.value) |
| 302 | - |> Jpipe.optional "view_count" (Jdec.null ()) () | |
| 308 | + |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ()) | |
| 303 | 309 | |> Jpipe.required "visited" Jdec.bool |
| 304 | 310 | |> Jpipe.required "whitelist_status" whitelistStatus |
| 305 | 311 | |
| @@ -479,8 +485,8 @@ encodeSource x = | ||
| 479 | 485 | variants : Jdec.Decoder Variants |
| 480 | 486 | variants = |
| 481 | 487 | Jdec.succeed Variants |
| 482 | - |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing | |
| 483 | - |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing | |
| 488 | + |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing) | |
| 489 | + |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing) | |
| 484 | 490 | |
| 485 | 491 | encodeVariants : Variants -> Jenc.Value |
| 486 | 492 | encodeVariants x = |
Test case
1 generated file · +6 −0test/inputs/json/samples/simple-object.json
Melmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/json/samples/spotify-album.json
Melmdefault / QuickType.elm+8 −2
| @@ -104,6 +104,12 @@ type alias Item = | ||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | -- decoders and encoders |
| 107 | +optionalField key decoder fallback = | |
| 108 | + Jdec.dict Jdec.value | |
| 109 | + |> Jdec.andThen (\m -> | |
| 110 | + case Dict.get key m of | |
| 111 | + Nothing -> Jdec.succeed fallback | |
| 112 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 107 | 113 | |
| 108 | 114 | quickTypeToString : QuickType -> String |
| 109 | 115 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -228,9 +234,9 @@ tracks = | ||
| 228 | 234 | |> Jpipe.required "href" Jdec.string |
| 229 | 235 | |> Jpipe.required "items" (Jdec.list item) |
| 230 | 236 | |> Jpipe.required "limit" Jdec.int |
| 231 | - |> Jpipe.optional "next" (Jdec.null ()) () | |
| 237 | + |> Jpipe.custom (optionalField "next" (Jdec.null ()) ()) | |
| 232 | 238 | |> Jpipe.required "offset" Jdec.int |
| 233 | - |> Jpipe.optional "previous" (Jdec.null ()) () | |
| 239 | + |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ()) | |
| 234 | 240 | |> Jpipe.required "total" Jdec.int |
| 235 | 241 | |
| 236 | 242 | encodeTracks : Tracks -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/json/samples/us-avg-temperatures.json
Melmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type alias Description = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +13 −7test/inputs/json/samples/us-senators.json
Melmdefault / QuickType.elm+13 −7
| @@ -147,6 +147,12 @@ type Title | ||
| 147 | 147 | = Sen |
| 148 | 148 | |
| 149 | 149 | -- decoders and encoders |
| 150 | +optionalField key decoder fallback = | |
| 151 | + Jdec.dict Jdec.value | |
| 152 | + |> Jdec.andThen (\m -> | |
| 153 | + case Dict.get key m of | |
| 154 | + Nothing -> Jdec.succeed fallback | |
| 155 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 150 | 156 | |
| 151 | 157 | quickTypeToString : QuickType -> String |
| 152 | 158 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -182,14 +188,14 @@ encodeMeta x = | ||
| 182 | 188 | object : Jdec.Decoder Object |
| 183 | 189 | object = |
| 184 | 190 | Jdec.succeed Object |
| 185 | - |> Jpipe.optional "caucus" (Jdec.nullable party) Nothing | |
| 191 | + |> Jpipe.custom (optionalField "caucus" (Jdec.nullable party) Nothing) | |
| 186 | 192 | |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int) |
| 187 | 193 | |> Jpipe.required "current" Jdec.bool |
| 188 | 194 | |> Jpipe.required "description" Jdec.string |
| 189 | - |> Jpipe.optional "district" (Jdec.null ()) () | |
| 195 | + |> Jpipe.custom (optionalField "district" (Jdec.null ()) ()) | |
| 190 | 196 | |> Jpipe.required "enddate" Jdec.string |
| 191 | 197 | |> Jpipe.required "extra" extra |
| 192 | - |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing | |
| 198 | + |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing) | |
| 193 | 199 | |> Jpipe.required "party" party |
| 194 | 200 | |> Jpipe.required "person" person |
| 195 | 201 | |> Jpipe.required "phone" Jdec.string |
| @@ -254,9 +260,9 @@ extra = | ||
| 254 | 260 | Jdec.succeed Extra |
| 255 | 261 | |> Jpipe.required "address" Jdec.string |
| 256 | 262 | |> Jpipe.required "contact_form" Jdec.string |
| 257 | - |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing | |
| 263 | + |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing) | |
| 258 | 264 | |> Jpipe.required "office" Jdec.string |
| 259 | - |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing | |
| 265 | + |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing) | |
| 260 | 266 | |
| 261 | 267 | encodeExtra : Extra -> Jenc.Value |
| 262 | 268 | encodeExtra x = |
| @@ -286,8 +292,8 @@ person = | ||
| 286 | 292 | |> Jpipe.required "osid" Jdec.string |
| 287 | 293 | |> Jpipe.required "pvsid" Jdec.string |
| 288 | 294 | |> Jpipe.required "sortname" Jdec.string |
| 289 | - |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing | |
| 290 | - |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing | |
| 295 | + |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing) | |
| 296 | + |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing) | |
| 291 | 297 | |
| 292 | 298 | encodePerson : Person -> Jenc.Value |
| 293 | 299 | encodePerson x = |
Test case
1 generated file · +6 −0test/inputs/schema/accessors.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -41,6 +41,12 @@ type Union | ||
| 41 | 41 | | Presence Bool |
| 42 | 42 | |
| 43 | 43 | -- decoders and encoders |
| 44 | +optionalField key decoder fallback = | |
| 45 | + Jdec.dict Jdec.value | |
| 46 | + |> Jdec.andThen (\m -> | |
| 47 | + case Dict.get key m of | |
| 48 | + Nothing -> Jdec.succeed fallback | |
| 49 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 44 | 50 | |
| 45 | 51 | quickTypeToString : QuickType -> String |
| 46 | 52 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/all-of-additional-properties-false.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -41,6 +41,12 @@ type Type | ||
| 41 | 41 | | Overtime |
| 42 | 42 | |
| 43 | 43 | -- decoders and encoders |
| 44 | +optionalField key decoder fallback = | |
| 45 | + Jdec.dict Jdec.value | |
| 46 | + |> Jdec.andThen (\m -> | |
| 47 | + case Dict.get key m of | |
| 48 | + Nothing -> Jdec.succeed fallback | |
| 49 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 44 | 50 | |
| 45 | 51 | quickTypeToString : QuickType -> String |
| 46 | 52 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -50,7 +56,7 @@ quickType = | ||
| 50 | 56 | Jdec.succeed QuickType |
| 51 | 57 | |> Jpipe.required "amount" Jdec.float |
| 52 | 58 | |> Jpipe.required "frequency" frequency |
| 53 | - |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing | |
| 59 | + |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing) | |
| 54 | 60 | |> Jpipe.required "type" purpleType |
| 55 | 61 | |
| 56 | 62 | encodeQuickType : QuickType -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/schema/any.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +10 −4test/inputs/schema/bool-string.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -38,6 +38,12 @@ type UnionWithBool | ||
| 38 | 38 | | StringInUnionWithBool String |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -45,11 +51,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 45 | 51 | quickType : Jdec.Decoder QuickType |
| 46 | 52 | quickType = |
| 47 | 53 | Jdec.succeed QuickType |
| 48 | - |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing | |
| 49 | - |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 50 | - |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing | |
| 54 | + |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing) | |
| 55 | + |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 56 | + |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing) | |
| 51 | 57 | |> Jpipe.required "one" Jdec.string |
| 52 | - |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing | |
| 58 | + |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing) | |
| 53 | 59 | |> Jpipe.required "unionWithBool" unionWithBool |
| 54 | 60 | |> Jpipe.required "unionWithBoolAndEnum" unionWithBool |
Test case
1 generated file · +8 −2test/inputs/schema/boolean-subschema.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -30,6 +30,12 @@ type alias QuickType = | ||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | -- decoders and encoders |
| 33 | +optionalField key decoder fallback = | |
| 34 | + Jdec.dict Jdec.value | |
| 35 | + |> Jdec.andThen (\m -> | |
| 36 | + case Dict.get key m of | |
| 37 | + Nothing -> Jdec.succeed fallback | |
| 38 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 33 | 39 | |
| 34 | 40 | quickTypeToString : QuickType -> String |
| 35 | 41 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -37,10 +43,10 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 37 | 43 | quickType : Jdec.Decoder QuickType |
| 38 | 44 | quickType = |
| 39 | 45 | Jdec.succeed QuickType |
| 40 | - |> Jpipe.optional "disallowed" (Jdec.nullable Jdec.value) Nothing | |
| 46 | + |> Jpipe.custom (optionalField "disallowed" (Jdec.nullable Jdec.value) Nothing) | |
| 41 | 47 | |> Jpipe.required "empty" (Jdec.list Jdec.value) |
| 42 | 48 | |> Jpipe.required "foo" Jdec.string |
| 43 | - |> Jpipe.optional "impossible" (Jdec.nullable Jdec.value) Nothing | |
| 49 | + |> Jpipe.custom (optionalField "impossible" (Jdec.nullable Jdec.value) Nothing) | |
| 44 | 50 | |
| 45 | 51 | encodeQuickType : QuickType -> Jenc.Value |
| 46 | 52 | encodeQuickType x = |
Test case
1 generated file · +8 −2test/inputs/schema/camelCase.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -35,8 +41,8 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 35 | 41 | quickType : Jdec.Decoder QuickType |
| 36 | 42 | quickType = |
| 37 | 43 | Jdec.succeed QuickType |
| 38 | - |> Jpipe.optional "myProperty" (Jdec.nullable Jdec.string) Nothing | |
| 39 | - |> Jpipe.optional "secondProperty" (Jdec.nullable Jdec.string) Nothing | |
| 44 | + |> Jpipe.custom (optionalField "myProperty" (Jdec.nullable Jdec.string) Nothing) | |
| 45 | + |> Jpipe.custom (optionalField "secondProperty" (Jdec.nullable Jdec.string) Nothing) | |
| 40 | 46 | |
| 41 | 47 | encodeQuickType : QuickType -> Jenc.Value |
| 42 | 48 | encodeQuickType x = |
Test case
1 generated file · +8 −2test/inputs/schema/class-map-union.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -39,6 +39,12 @@ type alias UnionClass = | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickTypeToString : QuickType -> String |
| 44 | 50 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -46,7 +52,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 46 | 52 | quickType : Jdec.Decoder QuickType |
| 47 | 53 | quickType = |
| 48 | 54 | Jdec.succeed QuickType |
| 49 | - |> Jpipe.optional "union" (Jdec.nullable (Jdec.dict unionValue)) Nothing | |
| 55 | + |> Jpipe.custom (optionalField "union" (Jdec.nullable (Jdec.dict unionValue)) Nothing) | |
| 50 | 56 | |
| 51 | 57 | encodeQuickType : QuickType -> Jenc.Value |
| 52 | 58 | encodeQuickType x = |
| @@ -73,7 +79,7 @@ encodeUnionValue x = case x of | ||
| 73 | 79 | unionClass : Jdec.Decoder UnionClass |
| 74 | 80 | unionClass = |
| 75 | 81 | Jdec.succeed UnionClass |
| 76 | - |> Jpipe.optional "quux" (Jdec.nullable Jdec.int) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "quux" (Jdec.nullable Jdec.int) Nothing) | |
| 77 | 83 | |
| 78 | 84 | encodeUnionClass : UnionClass -> Jenc.Value |
| 79 | 85 | encodeUnionClass x = |
Test case
1 generated file · +7 −1test/inputs/schema/class-with-additional.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -32,6 +32,12 @@ type Map | ||
| 32 | 32 | | DoubleInMap Float |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -39,7 +45,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = |
| 41 | 47 | Jdec.succeed QuickType |
| 42 | - |> Jpipe.optional "map" (Jdec.nullable (Jdec.dict map)) Nothing | |
| 48 | + |> Jpipe.custom (optionalField "map" (Jdec.nullable (Jdec.dict map)) Nothing) | |
| 43 | 49 | |
| 44 | 50 | encodeQuickType : QuickType -> Jenc.Value |
| 45 | 51 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/comment-injection-enum-nested-comment.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type Kind | ||
| 42 | 42 | = Ok |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/comment-injection-enum.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -48,6 +48,12 @@ type Kind | ||
| 48 | 48 | = Ok |
| 49 | 49 | |
| 50 | 50 | -- decoders and encoders |
| 51 | +optionalField key decoder fallback = | |
| 52 | + Jdec.dict Jdec.value | |
| 53 | + |> Jdec.andThen (\m -> | |
| 54 | + case Dict.get key m of | |
| 55 | + Nothing -> Jdec.succeed fallback | |
| 56 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 51 | 57 | |
| 52 | 58 | quickTypeToString : QuickType -> String |
| 53 | 59 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/comment-injection-nested-comment.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -38,6 +38,12 @@ type alias QuickType = | ||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +9 −3test/inputs/schema/comment-injection.schema
Mschema-elmdefault / QuickType.elm+9 −3
| @@ -66,6 +66,12 @@ type alias QuickType = | ||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | -- decoders and encoders |
| 69 | +optionalField key decoder fallback = | |
| 70 | + Jdec.dict Jdec.value | |
| 71 | + |> Jdec.andThen (\m -> | |
| 72 | + case Dict.get key m of | |
| 73 | + Nothing -> Jdec.succeed fallback | |
| 74 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 69 | 75 | |
| 70 | 76 | quickTypeToString : QuickType -> String |
| 71 | 77 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -73,9 +79,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 73 | 79 | quickType : Jdec.Decoder QuickType |
| 74 | 80 | quickType = |
| 75 | 81 | Jdec.succeed QuickType |
| 76 | - |> Jpipe.optional "trailingBackslash" (Jdec.nullable Jdec.string) Nothing | |
| 77 | - |> Jpipe.optional "trailingQuote" (Jdec.nullable Jdec.string) Nothing | |
| 78 | - |> Jpipe.optional "trailingTripleQuote" (Jdec.nullable Jdec.string) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "trailingBackslash" (Jdec.nullable Jdec.string) Nothing) | |
| 83 | + |> Jpipe.custom (optionalField "trailingQuote" (Jdec.nullable Jdec.string) Nothing) | |
| 84 | + |> Jpipe.custom (optionalField "trailingTripleQuote" (Jdec.nullable Jdec.string) Nothing) | |
| 79 | 85 | |> Jpipe.required "value" Jdec.string |
| 80 | 86 | |
| 81 | 87 | encodeQuickType : QuickType -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/schema/const-non-string.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type Kind | ||
| 35 | 35 | = Widget |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +89 −0test/inputs/schema/constructor.schema
Aschema-elmdefault / QuickType.elm+89 −0
| @@ -0,0 +1,89 @@ | ||
| 1 | +-- To decode the JSON data, add this file to your project, run | |
| 2 | +-- | |
| 3 | +-- elm install NoRedInk/elm-json-decode-pipeline | |
| 4 | +-- | |
| 5 | +-- add these imports | |
| 6 | +-- | |
| 7 | +-- import Json.Decode exposing (decodeString) | |
| 8 | +-- import QuickType exposing (quickType) | |
| 9 | +-- | |
| 10 | +-- and you're off to the races with | |
| 11 | +-- | |
| 12 | +-- decodeString quickType myJsonString | |
| 13 | + | |
| 14 | +module QuickType exposing | |
| 15 | + ( QuickType | |
| 16 | + , quickTypeToString | |
| 17 | + , quickType | |
| 18 | + , Constructor | |
| 19 | + , UnionConstructor(..) | |
| 20 | + ) | |
| 21 | + | |
| 22 | +import Json.Decode as Jdec | |
| 23 | +import Json.Decode.Pipeline as Jpipe | |
| 24 | +import Json.Encode as Jenc | |
| 25 | +import Dict exposing (Dict) | |
| 26 | + | |
| 27 | +type alias QuickType = | |
| 28 | + { constructor : Maybe UnionConstructor | |
| 29 | + } | |
| 30 | + | |
| 31 | +type UnionConstructor | |
| 32 | + = ConstructorInUnionConstructor Constructor | |
| 33 | + | DoubleInUnionConstructor Float | |
| 34 | + | |
| 35 | +type alias Constructor = | |
| 36 | + { | |
| 37 | + } | |
| 38 | + | |
| 39 | +-- decoders and encoders | |
| 40 | +optionalField key decoder fallback = | |
| 41 | + Jdec.dict Jdec.value | |
| 42 | + |> Jdec.andThen (\m -> | |
| 43 | + case Dict.get key m of | |
| 44 | + Nothing -> Jdec.succeed fallback | |
| 45 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 46 | + | |
| 47 | +quickTypeToString : QuickType -> String | |
| 48 | +quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | |
| 49 | + | |
| 50 | +quickType : Jdec.Decoder QuickType | |
| 51 | +quickType = | |
| 52 | + Jdec.succeed QuickType | |
| 53 | + |> Jpipe.custom (optionalField "constructor" (Jdec.nullable unionConstructor) Nothing) | |
| 54 | + | |
| 55 | +encodeQuickType : QuickType -> Jenc.Value | |
| 56 | +encodeQuickType x = | |
| 57 | + Jenc.object | |
| 58 | + [ ("constructor", makeNullableEncoder encodeUnionConstructor x.constructor) | |
| 59 | + ] | |
| 60 | + | |
| 61 | +unionConstructor : Jdec.Decoder UnionConstructor | |
| 62 | +unionConstructor = | |
| 63 | + Jdec.oneOf | |
| 64 | + [ Jdec.map DoubleInUnionConstructor Jdec.float | |
| 65 | + , Jdec.map ConstructorInUnionConstructor constructor | |
| 66 | + ] | |
| 67 | + | |
| 68 | +encodeUnionConstructor : UnionConstructor -> Jenc.Value | |
| 69 | +encodeUnionConstructor x = case x of | |
| 70 | + DoubleInUnionConstructor y -> Jenc.float y | |
| 71 | + ConstructorInUnionConstructor y -> encodeConstructor y | |
| 72 | + | |
| 73 | +constructor : Jdec.Decoder Constructor | |
| 74 | +constructor = | |
| 75 | + Jdec.succeed Constructor | |
| 76 | + | |
| 77 | +encodeConstructor : Constructor -> Jenc.Value | |
| 78 | +encodeConstructor x = | |
| 79 | + Jenc.object | |
| 80 | + [ | |
| 81 | + ] | |
| 82 | + | |
| 83 | +--- encoder helpers | |
| 84 | + | |
| 85 | +makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value | |
| 86 | +makeNullableEncoder f m = | |
| 87 | + case m of | |
| 88 | + Just x -> f x | |
| 89 | + Nothing -> Jenc.null |
Test case
1 generated file · +6 −0test/inputs/schema/cut-enum.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/date-time-or-string.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/date-time.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -36,6 +36,12 @@ type ComplexUnionArray | ||
| 36 | 36 | | StringInComplexUnionArray String |
| 37 | 37 | |
| 38 | 38 | -- decoders and encoders |
| 39 | +optionalField key decoder fallback = | |
| 40 | + Jdec.dict Jdec.value | |
| 41 | + |> Jdec.andThen (\m -> | |
| 42 | + case Dict.get key m of | |
| 43 | + Nothing -> Jdec.succeed fallback | |
| 44 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 39 | 45 | |
| 40 | 46 | quickTypeToString : QuickType -> String |
| 41 | 47 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/default-value.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/description-with-double-quotes.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -36,7 +42,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 36 | 42 | quickType : Jdec.Decoder QuickType |
| 37 | 43 | quickType = |
| 38 | 44 | Jdec.succeed QuickType |
| 39 | - |> Jpipe.optional "foo" (Jdec.nullable Jdec.bool) Nothing | |
| 45 | + |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.bool) Nothing) | |
| 40 | 46 | |
| 41 | 47 | encodeQuickType : QuickType -> Jenc.Value |
| 42 | 48 | encodeQuickType x = |
Test case
1 generated file · +8 −2test/inputs/schema/description.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -70,6 +70,12 @@ type Union | ||
| 70 | 70 | | StringInUnion String |
| 71 | 71 | |
| 72 | 72 | -- decoders and encoders |
| 73 | +optionalField key decoder fallback = | |
| 74 | + Jdec.dict Jdec.value | |
| 75 | + |> Jdec.andThen (\m -> | |
| 76 | + case Dict.get key m of | |
| 77 | + Nothing -> Jdec.succeed fallback | |
| 78 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 73 | 79 | |
| 74 | 80 | quickTypeToString : QuickType -> String |
| 75 | 81 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -77,9 +83,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 77 | 83 | quickType : Jdec.Decoder QuickType |
| 78 | 84 | quickType = |
| 79 | 85 | Jdec.succeed QuickType |
| 80 | - |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing | |
| 86 | + |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.bool) Nothing) | |
| 81 | 87 | |> Jpipe.required "enum" enum |
| 82 | - |> Jpipe.optional "foo" (Jdec.nullable Jdec.float) Nothing | |
| 88 | + |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.float) Nothing) | |
| 83 | 89 | |> Jpipe.required "object-or-string" objectOrStringUnion |
| 84 | 90 | |> Jpipe.required "union" union |
Test case
1 generated file · +7 −1test/inputs/schema/direct-union.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -43,6 +43,12 @@ type Anything | ||
| 43 | 43 | | StringInAnything String |
| 44 | 44 | |
| 45 | 45 | -- decoders and encoders |
| 46 | +optionalField key decoder fallback = | |
| 47 | + Jdec.dict Jdec.value | |
| 48 | + |> Jdec.andThen (\m -> | |
| 49 | + case Dict.get key m of | |
| 50 | + Nothing -> Jdec.succeed fallback | |
| 51 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 46 | 52 | |
| 47 | 53 | quickTypeToString : QuickType -> String |
| 48 | 54 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -61,7 +67,7 @@ encodeQuickType x = | ||
| 61 | 67 | thing : Jdec.Decoder Thing |
| 62 | 68 | thing = |
| 63 | 69 | Jdec.succeed Thing |
| 64 | - |> Jpipe.optional "optional" (Jdec.nullable anything) Nothing | |
| 70 | + |> Jpipe.custom (optionalField "optional" (Jdec.nullable anything) Nothing) | |
| 65 | 71 | |> Jpipe.required "required" anything |
| 66 | 72 | |
| 67 | 73 | encodeThing : Thing -> Jenc.Value |
Test case
1 generated file · +6 −0test/inputs/schema/empty-object.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = Dict String Jdec.Value |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.dict Jdec.value |
Test case
1 generated file · +6 −0test/inputs/schema/enum-large.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -57,6 +57,12 @@ type Priority | ||
| 57 | 57 | | High |
| 58 | 58 | |
| 59 | 59 | -- decoders and encoders |
| 60 | +optionalField key decoder fallback = | |
| 61 | + Jdec.dict Jdec.value | |
| 62 | + |> Jdec.andThen (\m -> | |
| 63 | + case Dict.get key m of | |
| 64 | + Nothing -> Jdec.succeed fallback | |
| 65 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 60 | 66 | |
| 61 | 67 | quickTypeToString : QuickType -> String |
| 62 | 68 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/enum-with-null.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -32,6 +32,12 @@ type Enum | ||
| 32 | 32 | | Bar |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -39,7 +45,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = |
| 41 | 47 | Jdec.succeed QuickType |
| 42 | - |> Jpipe.optional "enum" (Jdec.nullable enum) Nothing | |
| 48 | + |> Jpipe.custom (optionalField "enum" (Jdec.nullable enum) Nothing) | |
| 43 | 49 | |
| 44 | 50 | encodeQuickType : QuickType -> Jenc.Value |
| 45 | 51 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/enum-with-values.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -37,6 +37,12 @@ type Weekdays | ||
| 37 | 37 | | Sunday |
| 38 | 38 | |
| 39 | 39 | -- decoders and encoders |
| 40 | +optionalField key decoder fallback = | |
| 41 | + Jdec.dict Jdec.value | |
| 42 | + |> Jdec.andThen (\m -> | |
| 43 | + case Dict.get key m of | |
| 44 | + Nothing -> Jdec.succeed fallback | |
| 45 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 40 | 46 | |
| 41 | 47 | quickTypeToString : QuickType -> String |
| 42 | 48 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +10 −4test/inputs/schema/enum.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -54,6 +54,12 @@ type Lvc | ||
| 54 | 54 | | Chaotic |
| 55 | 55 | |
| 56 | 56 | -- decoders and encoders |
| 57 | +optionalField key decoder fallback = | |
| 58 | + Jdec.dict Jdec.value | |
| 59 | + |> Jdec.andThen (\m -> | |
| 60 | + case Dict.get key m of | |
| 61 | + Nothing -> Jdec.succeed fallback | |
| 62 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 57 | 63 | |
| 58 | 64 | quickTypeToString : QuickType -> String |
| 59 | 65 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -61,11 +67,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 61 | 67 | quickType : Jdec.Decoder QuickType |
| 62 | 68 | quickType = |
| 63 | 69 | Jdec.succeed QuickType |
| 64 | - |> Jpipe.optional "arr" (Jdec.nullable (Jdec.list arr)) Nothing | |
| 65 | - |> Jpipe.optional "for" (Jdec.nullable Jdec.string) Nothing | |
| 70 | + |> Jpipe.custom (optionalField "arr" (Jdec.nullable (Jdec.list arr)) Nothing) | |
| 71 | + |> Jpipe.custom (optionalField "for" (Jdec.nullable Jdec.string) Nothing) | |
| 66 | 72 | |> Jpipe.required "gve" gve |
| 67 | - |> Jpipe.optional "lvc" (Jdec.nullable lvc) Nothing | |
| 68 | - |> Jpipe.optional "otherArr" (Jdec.nullable (Jdec.list otherArr)) Nothing | |
| 73 | + |> Jpipe.custom (optionalField "lvc" (Jdec.nullable lvc) Nothing) | |
| 74 | + |> Jpipe.custom (optionalField "otherArr" (Jdec.nullable (Jdec.list otherArr)) Nothing) | |
| 69 | 75 | |
| 70 | 76 | encodeQuickType : QuickType -> Jenc.Value |
| 71 | 77 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/go-schema-pattern-properties.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/haskell-enum-forbidden.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type Health | ||
| 32 | 32 | | Error |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/id-no-address.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/id-root.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/ie-suffix-singularization.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type alias Cookie = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/implicit-all-of.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/implicit-class-array-union.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -42,6 +42,12 @@ type alias FooClass = | ||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | -- decoders and encoders |
| 45 | +optionalField key decoder fallback = | |
| 46 | + Jdec.dict Jdec.value | |
| 47 | + |> Jdec.andThen (\m -> | |
| 48 | + case Dict.get key m of | |
| 49 | + Nothing -> Jdec.succeed fallback | |
| 50 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 45 | 51 | |
| 46 | 52 | quickTypeToString : QuickType -> String |
| 47 | 53 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/schema/implicit-one-of.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -37,8 +43,8 @@ quickType : Jdec.Decoder QuickType | ||
| 37 | 43 | quickType = |
| 38 | 44 | Jdec.succeed QuickType |
| 39 | 45 | |> Jpipe.required "foo" Jdec.int |
| 40 | - |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing | |
| 41 | - |> Jpipe.optional "quux" (Jdec.nullable Jdec.string) Nothing | |
| 46 | + |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.bool) Nothing) | |
| 47 | + |> Jpipe.custom (optionalField "quux" (Jdec.nullable Jdec.string) Nothing) | |
| 42 | 48 | |
| 43 | 49 | encodeQuickType : QuickType -> Jenc.Value |
| 44 | 50 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/integer-float-union.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type Number | ||
| 32 | 32 | | IntegerInNumber Int |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +10 −4test/inputs/schema/integer-string.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -38,6 +38,12 @@ type UnionWithInt | ||
| 38 | 38 | | StringInUnionWithInt String |
| 39 | 39 | |
| 40 | 40 | -- decoders and encoders |
| 41 | +optionalField key decoder fallback = | |
| 42 | + Jdec.dict Jdec.value | |
| 43 | + |> Jdec.andThen (\m -> | |
| 44 | + case Dict.get key m of | |
| 45 | + Nothing -> Jdec.succeed fallback | |
| 46 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 41 | 47 | |
| 42 | 48 | quickTypeToString : QuickType -> String |
| 43 | 49 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -45,11 +51,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 45 | 51 | quickType : Jdec.Decoder QuickType |
| 46 | 52 | quickType = |
| 47 | 53 | Jdec.succeed QuickType |
| 48 | - |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing | |
| 49 | - |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 50 | - |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing | |
| 54 | + |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing) | |
| 55 | + |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 56 | + |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing) | |
| 51 | 57 | |> Jpipe.required "one" Jdec.string |
| 52 | - |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing | |
| 58 | + |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing) | |
| 53 | 59 | |> Jpipe.required "unionWithInt" unionWithInt |
| 54 | 60 | |> Jpipe.required "unionWithIntAndEnum" unionWithInt |
Test case
1 generated file · +6 −0test/inputs/schema/integer-type.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -35,6 +35,12 @@ type alias QuickType = | ||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | -- decoders and encoders |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 38 | 44 | |
| 39 | 45 | quickTypeToString : QuickType -> String |
| 40 | 46 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/intersection-nested.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -34,7 +40,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 34 | 40 | quickType : Jdec.Decoder QuickType |
| 35 | 41 | quickType = |
| 36 | 42 | Jdec.succeed QuickType |
| 37 | - |> Jpipe.optional "intersection" (Jdec.nullable Jdec.float) Nothing | |
| 43 | + |> Jpipe.custom (optionalField "intersection" (Jdec.nullable Jdec.float) Nothing) | |
| 38 | 44 | |
| 39 | 45 | encodeQuickType : QuickType -> Jenc.Value |
| 40 | 46 | encodeQuickType x = |
Test case
1 generated file · +8 −2test/inputs/schema/intersection.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -33,6 +33,12 @@ type alias Intersection = | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -40,7 +46,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 40 | 46 | quickType : Jdec.Decoder QuickType |
| 41 | 47 | quickType = |
| 42 | 48 | Jdec.succeed QuickType |
| 43 | - |> Jpipe.optional "intersection" (Jdec.nullable intersection) Nothing | |
| 49 | + |> Jpipe.custom (optionalField "intersection" (Jdec.nullable intersection) Nothing) | |
| 44 | 50 | |
| 45 | 51 | encodeQuickType : QuickType -> Jenc.Value |
| 46 | 52 | encodeQuickType x = |
| @@ -52,7 +58,7 @@ intersection : Jdec.Decoder Intersection | ||
| 52 | 58 | intersection = |
| 53 | 59 | Jdec.succeed Intersection |
| 54 | 60 | |> Jpipe.required "foo" Jdec.float |
| 55 | - |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing | |
| 61 | + |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing) | |
| 56 | 62 | |
| 57 | 63 | encodeIntersection : Intersection -> Jenc.Value |
| 58 | 64 | encodeIntersection x = |
Test case
1 generated file · +6 −0test/inputs/schema/issue2680-top-level-array.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = List Int |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.list Jdec.int |
Test case
1 generated file · +7 −1test/inputs/schema/keyword-enum.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -307,6 +307,12 @@ type EnumEnum | ||
| 307 | 307 | | Dummy |
| 308 | 308 | |
| 309 | 309 | -- decoders and encoders |
| 310 | +optionalField key decoder fallback = | |
| 311 | + Jdec.dict Jdec.value | |
| 312 | + |> Jdec.andThen (\m -> | |
| 313 | + case Dict.get key m of | |
| 314 | + Nothing -> Jdec.succeed fallback | |
| 315 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 310 | 316 | |
| 311 | 317 | quickTypeToString : QuickType -> String |
| 312 | 318 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -314,7 +320,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 314 | 320 | quickType : Jdec.Decoder QuickType |
| 315 | 321 | quickType = |
| 316 | 322 | Jdec.succeed QuickType |
| 317 | - |> Jpipe.optional "enum" (Jdec.nullable enumEnum) Nothing | |
| 323 | + |> Jpipe.custom (optionalField "enum" (Jdec.nullable enumEnum) Nothing) | |
| 318 | 324 | |
| 319 | 325 | encodeQuickType : QuickType -> Jenc.Value |
| 320 | 326 | encodeQuickType x = |
Test case
1 generated file · +9,717 −0test/inputs/schema/keyword-unions.schema
Aschema-elmdefault / QuickType.elm+9,717 −0
| @@ -0,0 +1,9717 @@ | ||
| 1 | +-- To decode the JSON data, add this file to your project, run | |
| 2 | +-- | |
| 3 | +-- elm install NoRedInk/elm-json-decode-pipeline | |
| 4 | +-- | |
| 5 | +-- add these imports | |
| 6 | +-- | |
| 7 | +-- import Json.Decode exposing (decodeString) | |
| 8 | +-- import QuickType exposing (quickType) | |
| 9 | +-- | |
| 10 | +-- and you're off to the races with | |
| 11 | +-- | |
| 12 | +-- decodeString quickType myJsonString | |
| 13 | + | |
| 14 | +module QuickType exposing | |
| 15 | + ( QuickType | |
| 16 | + , quickTypeToString | |
| 17 | + , quickType | |
| 18 | + , Abstract | |
| 19 | + , Alignas | |
| 20 | + , Alignof | |
| 21 | + , And | |
| 22 | + , AndEq | |
| 23 | + , Any | |
| 24 | + , ArrayClass | |
| 25 | + , ASM | |
| 26 | + , Assert | |
| 27 | + , Associatedtype | |
| 28 | + , Associativity | |
| 29 | + , Async | |
| 30 | + , Atomic | |
| 31 | + , AtomicCancel | |
| 32 | + , AtomicCommit | |
| 33 | + , AtomicNoexcept | |
| 34 | + , Auto | |
| 35 | + , Await | |
| 36 | + , Base | |
| 37 | + , Bitand | |
| 38 | + , Bitor | |
| 39 | + , Boolean | |
| 40 | + , Break | |
| 41 | + , Bycopy | |
| 42 | + , Byref | |
| 43 | + , Byte | |
| 44 | + , Catch | |
| 45 | + , Chan | |
| 46 | + , Char | |
| 47 | + , Char16T | |
| 48 | + , Char32T | |
| 49 | + , Checked | |
| 50 | + , Class | |
| 51 | + , CoAwait | |
| 52 | + , CoReturn | |
| 53 | + , CoYield | |
| 54 | + , Compl | |
| 55 | + , Complex | |
| 56 | + , Concept | |
| 57 | + , Console | |
| 58 | + , Const | |
| 59 | + , ConstCast | |
| 60 | + , Constexpr | |
| 61 | + , Constructor | |
| 62 | + , Continue | |
| 63 | + , Convenience | |
| 64 | + , Convert | |
| 65 | + , Converter | |
| 66 | + , Date | |
| 67 | + , DateParseHandling | |
| 68 | + , Debugger | |
| 69 | + , Decimal | |
| 70 | + , Declare | |
| 71 | + , Decltype | |
| 72 | + , DecodeString | |
| 73 | + , Def | |
| 74 | + , Default | |
| 75 | + , Defer | |
| 76 | + , Deinit | |
| 77 | + , Del | |
| 78 | + , Delegate | |
| 79 | + , Delete | |
| 80 | + , DictClass | |
| 81 | + , Dictionary | |
| 82 | + , DidSet | |
| 83 | + , Do | |
| 84 | + , Double | |
| 85 | + , Dynamic | |
| 86 | + , DynamicCast | |
| 87 | + , Elif | |
| 88 | + , Empty | |
| 89 | + , EncodeQuickType | |
| 90 | + , Enum | |
| 91 | + , Event | |
| 92 | + , Except | |
| 93 | + , Exception | |
| 94 | + , Explicit | |
| 95 | + , Export | |
| 96 | + , Extends | |
| 97 | + , Extension | |
| 98 | + , Extern | |
| 99 | + , Fallthrough | |
| 100 | + , FalseClass | |
| 101 | + , Fileprivate | |
| 102 | + , Final | |
| 103 | + , Finally | |
| 104 | + , Fixed | |
| 105 | + , For | |
| 106 | + , Foreach | |
| 107 | + , Friend | |
| 108 | + , From | |
| 109 | + , FromJSON | |
| 110 | + , Func | |
| 111 | + , Function | |
| 112 | + , Get | |
| 113 | + , Global | |
| 114 | + , Go | |
| 115 | + , Goto | |
| 116 | + , Guard | |
| 117 | + , HasOwnProperty | |
| 118 | + , ID | |
| 119 | + , Imaginery | |
| 120 | + , Imp | |
| 121 | + , Implements | |
| 122 | + , Implicit | |
| 123 | + , Indirect | |
| 124 | + , Init | |
| 125 | + , Inline | |
| 126 | + , Inout | |
| 127 | + , Instanceof | |
| 128 | + , Interface | |
| 129 | + , Internal | |
| 130 | + , Is | |
| 131 | + , Iterable | |
| 132 | + , JdecClass | |
| 133 | + , JencClass | |
| 134 | + , JpipeClass | |
| 135 | + , JSON | |
| 136 | + , JSONConverter | |
| 137 | + , JSONSerializer | |
| 138 | + , JSONToken | |
| 139 | + , JSONWriter | |
| 140 | + , Lambda | |
| 141 | + , Lazy | |
| 142 | + , Left | |
| 143 | + , ListClass | |
| 144 | + , Lock | |
| 145 | + , Long | |
| 146 | + , Map | |
| 147 | + , MetadataPropertyHandling | |
| 148 | + , Mutable | |
| 149 | + , Mutating | |
| 150 | + , Namespace | |
| 151 | + , Native | |
| 152 | + , New | |
| 153 | + , Newtonsoft | |
| 154 | + , Nil | |
| 155 | + , No | |
| 156 | + , Noexcept | |
| 157 | + , Nonatomic | |
| 158 | + , None | |
| 159 | + , Nonlocal | |
| 160 | + , Nonmutating | |
| 161 | + , Not | |
| 162 | + , NotEq | |
| 163 | + , NSString | |
| 164 | + , Null | |
| 165 | + , Nullptr | |
| 166 | + , Number | |
| 167 | + , Object | |
| 168 | + , Oneway | |
| 169 | + , Open | |
| 170 | + , Operator | |
| 171 | + , Optional | |
| 172 | + , Or | |
| 173 | + , OrEq | |
| 174 | + , Out | |
| 175 | + , Override | |
| 176 | + , Package | |
| 177 | + , Params | |
| 178 | + , Pass | |
| 179 | + , Postfix | |
| 180 | + , Precedence | |
| 181 | + , Prefix | |
| 182 | ||
| 183 | + , Printf | |
| 184 | + , Private | |
| 185 | + , Protected | |
| 186 | + , Protocol | |
| 187 | + , Public | |
| 188 | + , UnionBoolBool | |
| 189 | + , TypeClass | |
| 190 | + , AnyClass | |
| 191 | + , As | |
| 192 | + , Bool | |
| 193 | + , BoolClass | |
| 194 | + , Case | |
| 195 | + , ClassClass | |
| 196 | + , Else | |
| 197 | + , Exposing | |
| 198 | + , UnionFalseFalse | |
| 199 | + , FloatClass | |
| 200 | + , If | |
| 201 | + , Import | |
| 202 | + , In | |
| 203 | + , Infix | |
| 204 | + , IntClass | |
| 205 | + , Let | |
| 206 | + , Module | |
| 207 | + , NoneClass | |
| 208 | + , NullClass | |
| 209 | + , Of | |
| 210 | + , Port | |
| 211 | + , ProtocolClass | |
| 212 | + , SelfClass | |
| 213 | + , StringClass | |
| 214 | + , Then | |
| 215 | + , UnionTrueTrue | |
| 216 | + , Type | |
| 217 | + , Where | |
| 218 | + , Quicktype | |
| 219 | + , Raise | |
| 220 | + , Range | |
| 221 | + , Readonly | |
| 222 | + , Ref | |
| 223 | + , Register | |
| 224 | + , ReinterpretCast | |
| 225 | + , Repeat | |
| 226 | + , Require | |
| 227 | + , Required | |
| 228 | + , Requires | |
| 229 | + , Restrict | |
| 230 | + , Retain | |
| 231 | + , Rethrows | |
| 232 | + , Return | |
| 233 | + , Right | |
| 234 | + , Sbyte | |
| 235 | + , Sealed | |
| 236 | + , Sel | |
| 237 | + , Select | |
| 238 | + , Self | |
| 239 | + , Serialize | |
| 240 | + , Set | |
| 241 | + , Short | |
| 242 | + , Signed | |
| 243 | + , Sizeof | |
| 244 | + , Stackalloc | |
| 245 | + , Static | |
| 246 | + , StaticAssert | |
| 247 | + , StaticCast | |
| 248 | + , Strictfp | |
| 249 | + , Struct | |
| 250 | + , Subscript | |
| 251 | + , Super | |
| 252 | + , Switch | |
| 253 | + , Symbol | |
| 254 | + , Synchronized | |
| 255 | + , System | |
| 256 | + , Template | |
| 257 | + , This | |
| 258 | + , ThreadLocal | |
| 259 | + , Throw | |
| 260 | + , Throws | |
| 261 | + , ToJSON | |
| 262 | + , TopLevel | |
| 263 | + , Transient | |
| 264 | + , TrueClass | |
| 265 | + , Try | |
| 266 | + , Typealias | |
| 267 | + , Typedef | |
| 268 | + , Typeid | |
| 269 | + , Typename | |
| 270 | + , Typeof | |
| 271 | + , Uint | |
| 272 | + , Ulong | |
| 273 | + , Unchecked | |
| 274 | + , Undefined | |
| 275 | + , Union | |
| 276 | + , Unowned | |
| 277 | + , Unsafe | |
| 278 | + , Unsigned | |
| 279 | + , Ushort | |
| 280 | + , Using | |
| 281 | + , Var | |
| 282 | + , Virtual | |
| 283 | + , Void | |
| 284 | + , Volatile | |
| 285 | + , WcharT | |
| 286 | + , Weak | |
| 287 | + , While | |
| 288 | + , WillSet | |
| 289 | + , With | |
| 290 | + , Xor | |
| 291 | + , XorEq | |
| 292 | + , Yes | |
| 293 | + , Yield | |
| 294 | + , UnionAbstract(..) | |
| 295 | + , UnionAlignas(..) | |
| 296 | + , UnionAlignof(..) | |
| 297 | + , UnionAnd(..) | |
| 298 | + , UnionAndEq(..) | |
| 299 | + , UnionAny(..) | |
| 300 | + , UnionArray(..) | |
| 301 | + , UnionASM(..) | |
| 302 | + , UnionAssert(..) | |
| 303 | + , UnionAssociatedtype(..) | |
| 304 | + , UnionAssociativity(..) | |
| 305 | + , UnionAsync(..) | |
| 306 | + , UnionAtomic(..) | |
| 307 | + , UnionAtomicCancel(..) | |
| 308 | + , UnionAtomicCommit(..) | |
| 309 | + , UnionAtomicNoexcept(..) | |
| 310 | + , UnionAuto(..) | |
| 311 | + , UnionAwait(..) | |
| 312 | + , UnionBase(..) | |
| 313 | + , UnionBitand(..) | |
| 314 | + , UnionBitor(..) | |
| 315 | + , UnionBoolean(..) | |
| 316 | + , UnionBreak(..) | |
| 317 | + , UnionBycopy(..) | |
| 318 | + , UnionByref(..) | |
| 319 | + , UnionByte(..) | |
| 320 | + , UnionCatch(..) | |
| 321 | + , UnionChan(..) | |
| 322 | + , UnionChar(..) | |
| 323 | + , UnionChar16T(..) | |
| 324 | + , UnionChar32T(..) | |
| 325 | + , UnionChecked(..) | |
| 326 | + , UnionClass(..) | |
| 327 | + , UnionCoAwait(..) | |
| 328 | + , UnionCoReturn(..) | |
| 329 | + , UnionCoYield(..) | |
| 330 | + , UnionCompl(..) | |
| 331 | + , UnionComplex(..) | |
| 332 | + , UnionConcept(..) | |
| 333 | + , UnionConsole(..) | |
| 334 | + , UnionConst(..) | |
| 335 | + , UnionConstCast(..) | |
| 336 | + , UnionConstexpr(..) | |
| 337 | + , UnionConstructor(..) | |
| 338 | + , UnionContinue(..) | |
| 339 | + , UnionConvenience(..) | |
| 340 | + , UnionConvert(..) | |
| 341 | + , UnionConverter(..) | |
| 342 | + , UnionDate(..) | |
| 343 | + , UnionDateParseHandling(..) | |
| 344 | + , UnionDebugger(..) | |
| 345 | + , UnionDecimal(..) | |
| 346 | + , UnionDeclare(..) | |
| 347 | + , UnionDecltype(..) | |
| 348 | + , UnionDecodeString(..) | |
| 349 | + , UnionDef(..) | |
| 350 | + , UnionDefault(..) | |
| 351 | + , UnionDefer(..) | |
| 352 | + , UnionDeinit(..) | |
| 353 | + , UnionDel(..) | |
| 354 | + , UnionDelegate(..) | |
| 355 | + , UnionDelete(..) | |
| 356 | + , UnionDict(..) | |
| 357 | + , UnionDictionary(..) | |
| 358 | + , UnionDidSet(..) | |
| 359 | + , UnionDo(..) | |
| 360 | + , UnionDouble(..) | |
| 361 | + , UnionDynamic(..) | |
| 362 | + , UnionDynamicCast(..) | |
| 363 | + , UnionElif(..) | |
| 364 | + , UnionUnion(..) | |
| 365 | + , UnionEncodeQuickType(..) | |
| 366 | + , UnionEnum(..) | |
| 367 | + , UnionEvent(..) | |
| 368 | + , UnionExcept(..) | |
| 369 | + , UnionException(..) | |
| 370 | + , UnionExplicit(..) | |
| 371 | + , UnionExport(..) | |
| 372 | + , UnionExtends(..) | |
| 373 | + , UnionExtension(..) | |
| 374 | + , UnionExtern(..) | |
| 375 | + , UnionFallthrough(..) | |
| 376 | + , UnionFalse(..) | |
| 377 | + , UnionFileprivate(..) | |
| 378 | + , UnionFinal(..) | |
| 379 | + , UnionFinally(..) | |
| 380 | + , UnionFixed(..) | |
| 381 | + , UnionFor(..) | |
| 382 | + , UnionForeach(..) | |
| 383 | + , UnionFriend(..) | |
| 384 | + , UnionFrom(..) | |
| 385 | + , UnionFromJSON(..) | |
| 386 | + , UnionFunc(..) | |
| 387 | + , UnionFunction(..) | |
| 388 | + , UnionGet(..) | |
| 389 | + , UnionGlobal(..) | |
| 390 | + , UnionGo(..) | |
| 391 | + , UnionGoto(..) | |
| 392 | + , UnionGuard(..) | |
| 393 | + , UnionHasOwnProperty(..) | |
| 394 | + , UnionID(..) | |
| 395 | + , UnionImaginery(..) | |
| 396 | + , UnionIMP(..) | |
| 397 | + , UnionImplements(..) | |
| 398 | + , UnionImplicit(..) | |
| 399 | + , UnionIndirect(..) | |
| 400 | + , UnionInit(..) | |
| 401 | + , UnionInline(..) | |
| 402 | + , UnionInout(..) | |
| 403 | + , UnionInstanceof(..) | |
| 404 | + , UnionInterface(..) | |
| 405 | + , UnionInternal(..) | |
| 406 | + , UnionIs(..) | |
| 407 | + , UnionIterable(..) | |
| 408 | + , UnionJdec(..) | |
| 409 | + , UnionJenc(..) | |
| 410 | + , UnionJpipe(..) | |
| 411 | + , UnionJSON(..) | |
| 412 | + , UnionJSONConverter(..) | |
| 413 | + , UnionJSONSerializer(..) | |
| 414 | + , UnionJSONToken(..) | |
| 415 | + , UnionJSONWriter(..) | |
| 416 | + , UnionLambda(..) | |
| 417 | + , UnionLazy(..) | |
| 418 | + , UnionLeft(..) | |
| 419 | + , UnionList(..) | |
| 420 | + , UnionLock(..) | |
| 421 | + , UnionLong(..) | |
| 422 | + , UnionMap(..) | |
| 423 | + , UnionMetadataPropertyHandling(..) | |
| 424 | + , UnionMutable(..) | |
| 425 | + , UnionMutating(..) | |
| 426 | + , UnionNamespace(..) | |
| 427 | + , UnionNative(..) | |
| 428 | + , UnionNew(..) | |
| 429 | + , UnionNewtonsoft(..) | |
| 430 | + , UnionNil(..) | |
| 431 | + , UnionNO(..) | |
| 432 | + , UnionNoexcept(..) | |
| 433 | + , UnionNonatomic(..) | |
| 434 | + , UnionNone(..) | |
| 435 | + , UnionNonlocal(..) | |
| 436 | + , UnionNonmutating(..) | |
| 437 | + , UnionNot(..) | |
| 438 | + , UnionNotEq(..) | |
| 439 | + , UnionNSString(..) | |
| 440 | + , UnionNULL(..) | |
| 441 | + , UnionNullptr(..) | |
| 442 | + , UnionNumber(..) | |
| 443 | + , UnionObject(..) | |
| 444 | + , UnionOneway(..) | |
| 445 | + , UnionOpen(..) | |
| 446 | + , UnionOperator(..) | |
| 447 | + , UnionOptional(..) | |
| 448 | + , UnionOr(..) | |
| 449 | + , UnionOrEq(..) | |
| 450 | + , UnionOut(..) | |
| 451 | + , UnionOverride(..) | |
| 452 | + , UnionPackage(..) | |
| 453 | + , UnionParams(..) | |
| 454 | + , UnionPass(..) | |
| 455 | + , UnionPostfix(..) | |
| 456 | + , UnionPrecedence(..) | |
| 457 | + , UnionPrefix(..) | |
| 458 | + , UnionPrint(..) | |
| 459 | + , UnionPrintf(..) | |
| 460 | + , UnionPrivate(..) | |
| 461 | + , UnionProtected(..) | |
| 462 | + , UnionProtocol(..) | |
| 463 | + , UnionPublic(..) | |
| 464 | + , UnionBoolUnion(..) | |
| 465 | + , UnionTypeUnion(..) | |
| 466 | + , UnionAnyUnion(..) | |
| 467 | + , UnionAs(..) | |
| 468 | + , UnionBOOL(..) | |
| 469 | + , UnionBool(..) | |
| 470 | + , UnionCase(..) | |
| 471 | + , UnionClassUnion(..) | |
| 472 | + , UnionElse(..) | |
| 473 | + , UnionExposing(..) | |
| 474 | + , UnionFalseUnion(..) | |
| 475 | + , UnionFloat(..) | |
| 476 | + , UnionIf(..) | |
| 477 | + , UnionImport(..) | |
| 478 | + , UnionIn(..) | |
| 479 | + , UnionInfix(..) | |
| 480 | + , UnionInt(..) | |
| 481 | + , UnionLet(..) | |
| 482 | + , UnionModule(..) | |
| 483 | + , UnionNoneUnion(..) | |
| 484 | + , UnionNull(..) | |
| 485 | + , UnionOf(..) | |
| 486 | + , UnionPort(..) | |
| 487 | + , UnionProtocolUnion(..) | |
| 488 | + , UnionSelfUnion(..) | |
| 489 | + , UnionString(..) | |
| 490 | + , UnionThen(..) | |
| 491 | + , UnionTrueUnion(..) | |
| 492 | + , UnionType(..) | |
| 493 | + , UnionWhere(..) | |
| 494 | + , UnionQuicktype(..) | |
| 495 | + , UnionRaise(..) | |
| 496 | + , UnionRange(..) | |
| 497 | + , UnionReadonly(..) | |
| 498 | + , UnionRef(..) | |
| 499 | + , UnionRegister(..) | |
| 500 | + , UnionReinterpretCast(..) | |
| 501 | + , UnionRepeat(..) | |
| 502 | + , UnionRequire(..) | |
| 503 | + , UnionRequired(..) | |
| 504 | + , UnionRequires(..) | |
| 505 | + , UnionRestrict(..) | |
| 506 | + , UnionRetain(..) | |
| 507 | + , UnionRethrows(..) | |
| 508 | + , UnionReturn(..) | |
| 509 | + , UnionRight(..) | |
| 510 | + , UnionSbyte(..) | |
| 511 | + , UnionSealed(..) | |
| 512 | + , UnionSEL(..) | |
| 513 | + , UnionSelect(..) | |
| 514 | + , UnionSelf(..) | |
| 515 | + , UnionSerialize(..) | |
| 516 | + , UnionSet(..) | |
| 517 | + , UnionShort(..) | |
| 518 | + , UnionSigned(..) | |
| 519 | + , UnionSizeof(..) | |
| 520 | + , UnionStackalloc(..) | |
| 521 | + , UnionStatic(..) | |
| 522 | + , UnionStaticAssert(..) | |
| 523 | + , UnionStaticCast(..) | |
| 524 | + , UnionStrictfp(..) | |
| 525 | + , UnionStruct(..) | |
| 526 | + , UnionSubscript(..) | |
| 527 | + , UnionSuper(..) | |
| 528 | + , UnionSwitch(..) | |
| 529 | + , UnionSymbol(..) | |
| 530 | + , UnionSynchronized(..) | |
| 531 | + , UnionSystem(..) | |
| 532 | + , UnionTemplate(..) | |
| 533 | + , UnionThis(..) | |
| 534 | + , UnionThreadLocal(..) | |
| 535 | + , UnionThrow(..) | |
| 536 | + , UnionThrows(..) | |
| 537 | + , UnionToJSON(..) | |
| 538 | + , UnionTopLevel(..) | |
| 539 | + , UnionTransient(..) | |
| 540 | + , UnionTrue(..) | |
| 541 | + , UnionTry(..) | |
| 542 | + , UnionTypealias(..) | |
| 543 | + , UnionTypedef(..) | |
| 544 | + , UnionTypeid(..) | |
| 545 | + , UnionTypename(..) | |
| 546 | + , UnionTypeof(..) | |
| 547 | + , UnionUint(..) | |
| 548 | + , UnionUlong(..) | |
| 549 | + , UnionUnchecked(..) | |
| 550 | + , UnionUndefined(..) | |
| 551 | + , UnionUnionUnion(..) | |
| 552 | + , UnionUnowned(..) | |
| 553 | + , UnionUnsafe(..) | |
| 554 | + , UnionUnsigned(..) | |
| 555 | + , UnionUshort(..) | |
| 556 | + , UnionUsing(..) | |
| 557 | + , UnionVar(..) | |
| 558 | + , UnionVirtual(..) | |
| 559 | + , UnionVoid(..) | |
| 560 | + , UnionVolatile(..) | |
| 561 | + , UnionWcharT(..) | |
| 562 | + , UnionWeak(..) | |
| 563 | + , UnionWhile(..) | |
| 564 | + , UnionWillSet(..) | |
| 565 | + , UnionWith(..) | |
| 566 | + , UnionXor(..) | |
| 567 | + , UnionXorEq(..) | |
| 568 | + , UnionYES(..) | |
| 569 | + , UnionYield(..) | |
| 570 | + ) | |
| 571 | + | |
| 572 | +import Json.Decode as Jdec | |
| 573 | +import Json.Decode.Pipeline as Jpipe | |
| 574 | +import Json.Encode as Jenc | |
| 575 | +import Dict exposing (Dict) | |
| 576 | + | |
| 577 | +type alias QuickType = | |
| 578 | + { empty : Maybe UnionUnion | |
| 579 | + , quickTypeBool : Maybe UnionBool | |
| 580 | + , complex : Maybe UnionComplex | |
| 581 | + , imaginery : Maybe UnionImaginery | |
| 582 | + , abstract : Maybe UnionAbstract | |
| 583 | + , alignas : Maybe UnionAlignas | |
| 584 | + , alignof : Maybe UnionAlignof | |
| 585 | + , and : Maybe UnionAnd | |
| 586 | + , andEq : Maybe UnionAndEq | |
| 587 | + , quickTypeAny : Maybe UnionAnyUnion | |
| 588 | + , any : Maybe UnionAny | |
| 589 | + , array : Maybe UnionArray | |
| 590 | + , quickTypeAs : Maybe UnionAs | |
| 591 | + , asm : Maybe UnionASM | |
| 592 | + , assert : Maybe UnionAssert | |
| 593 | + , associatedtype : Maybe UnionAssociatedtype | |
| 594 | + , associativity : Maybe UnionAssociativity | |
| 595 | + , async : Maybe UnionAsync | |
| 596 | + , atomic : Maybe UnionAtomic | |
| 597 | + , atomicCancel : Maybe UnionAtomicCancel | |
| 598 | + , atomicCommit : Maybe UnionAtomicCommit | |
| 599 | + , atomicNoexcept : Maybe UnionAtomicNoexcept | |
| 600 | + , auto : Maybe UnionAuto | |
| 601 | + , await : Maybe UnionAwait | |
| 602 | + , base : Maybe UnionBase | |
| 603 | + , bitand : Maybe UnionBitand | |
| 604 | + , bitor : Maybe UnionBitor | |
| 605 | + , quickTypeBOOL : Maybe UnionBOOL | |
| 606 | + , purpleBool : Maybe UnionBoolUnion | |
| 607 | + , boolean : Maybe UnionBoolean | |
| 608 | + , break : Maybe UnionBreak | |
| 609 | + , bycopy : Maybe UnionBycopy | |
| 610 | + , byref : Maybe UnionByref | |
| 611 | + , byte : Maybe UnionByte | |
| 612 | + , quickTypeCase : Maybe UnionCase | |
| 613 | + , catch : Maybe UnionCatch | |
| 614 | + , chan : Maybe UnionChan | |
| 615 | + , char : Maybe UnionChar | |
| 616 | + , char16T : Maybe UnionChar16T | |
| 617 | + , char32T : Maybe UnionChar32T | |
| 618 | + , checked : Maybe UnionChecked | |
| 619 | + , quickTypeClass : Maybe UnionClassUnion | |
| 620 | + , class : Maybe UnionClass | |
| 621 | + , coAwait : Maybe UnionCoAwait | |
| 622 | + , coReturn : Maybe UnionCoReturn | |
| 623 | + , coYield : Maybe UnionCoYield | |
| 624 | + , compl : Maybe UnionCompl | |
| 625 | + , concept : Maybe UnionConcept | |
| 626 | + , console : Maybe UnionConsole | |
| 627 | + , const : Maybe UnionConst | |
| 628 | + , constCast : Maybe UnionConstCast | |
| 629 | + , constexpr : Maybe UnionConstexpr | |
| 630 | + , constructor : Maybe UnionConstructor | |
| 631 | + , continue : Maybe UnionContinue | |
| 632 | + , convenience : Maybe UnionConvenience | |
| 633 | + , convert : Maybe UnionConvert | |
| 634 | + , converter : Maybe UnionConverter | |
| 635 | + , date : Maybe UnionDate | |
| 636 | + , dateParseHandling : Maybe UnionDateParseHandling | |
| 637 | + , debugger : Maybe UnionDebugger | |
| 638 | + , decimal : Maybe UnionDecimal | |
| 639 | + , declare : Maybe UnionDeclare | |
| 640 | + , decltype : Maybe UnionDecltype | |
| 641 | + , decodeString : Maybe UnionDecodeString | |
| 642 | + , def : Maybe UnionDef | |
| 643 | + , default : Maybe UnionDefault | |
| 644 | + , defer : Maybe UnionDefer | |
| 645 | + , deinit : Maybe UnionDeinit | |
| 646 | + , del : Maybe UnionDel | |
| 647 | + , delegate : Maybe UnionDelegate | |
| 648 | + , delete : Maybe UnionDelete | |
| 649 | + , dict : Maybe UnionDict | |
| 650 | + , dictionary : Maybe UnionDictionary | |
| 651 | + , didSet : Maybe UnionDidSet | |
| 652 | + , do : Maybe UnionDo | |
| 653 | + , double : Maybe UnionDouble | |
| 654 | + , dummy : Maybe Float | |
| 655 | + , dynamic : Maybe UnionDynamic | |
| 656 | + , dynamicCast : Maybe UnionDynamicCast | |
| 657 | + , elif : Maybe UnionElif | |
| 658 | + , quickTypeElse : Maybe UnionElse | |
| 659 | + , encodeQuickType : Maybe UnionEncodeQuickType | |
| 660 | + , enum : Maybe UnionEnum | |
| 661 | + , event : Maybe UnionEvent | |
| 662 | + , except : Maybe UnionExcept | |
| 663 | + , exception : Maybe UnionException | |
| 664 | + , explicit : Maybe UnionExplicit | |
| 665 | + , export : Maybe UnionExport | |
| 666 | + , quickTypeExposing : Maybe UnionExposing | |
| 667 | + , extends : Maybe UnionExtends | |
| 668 | + , extension : Maybe UnionExtension | |
| 669 | + , extern : Maybe UnionExtern | |
| 670 | + , fallthrough : Maybe UnionFallthrough | |
| 671 | + , quickTypeFalse : Maybe UnionFalseUnion | |
| 672 | + , false : Maybe UnionFalse | |
| 673 | + , fileprivate : Maybe UnionFileprivate | |
| 674 | + , final : Maybe UnionFinal | |
| 675 | + , finally : Maybe UnionFinally | |
| 676 | + , fixed : Maybe UnionFixed | |
| 677 | + , quickTypeFloat : Maybe UnionFloat | |
| 678 | + , for : Maybe UnionFor | |
| 679 | + , foreach : Maybe UnionForeach | |
| 680 | + , friend : Maybe UnionFriend | |
| 681 | + , from : Maybe UnionFrom | |
| 682 | + , fromJSON : Maybe UnionFromJSON | |
| 683 | + , func : Maybe UnionFunc | |
| 684 | + , function : Maybe UnionFunction | |
| 685 | + , get : Maybe UnionGet | |
| 686 | + , global : Maybe UnionGlobal | |
| 687 | + , go : Maybe UnionGo | |
| 688 | + , goto : Maybe UnionGoto | |
| 689 | + , guard : Maybe UnionGuard | |
| 690 | + , hasOwnProperty : Maybe UnionHasOwnProperty | |
| 691 | + , id : Maybe UnionID | |
| 692 | + , quickTypeIf : Maybe UnionIf | |
| 693 | + , imp : Maybe UnionIMP | |
| 694 | + , implements : Maybe UnionImplements | |
| 695 | + , implicit : Maybe UnionImplicit | |
| 696 | + , quickTypeImport : Maybe UnionImport | |
| 697 | + , quickTypeIn : Maybe UnionIn | |
| 698 | + , indirect : Maybe UnionIndirect | |
| 699 | + , quickTypeInfix : Maybe UnionInfix | |
| 700 | + , init : Maybe UnionInit | |
| 701 | + , inline : Maybe UnionInline | |
| 702 | + , inout : Maybe UnionInout | |
| 703 | + , instanceof : Maybe UnionInstanceof | |
| 704 | + , quickTypeInt : Maybe UnionInt | |
| 705 | + , interface : Maybe UnionInterface | |
| 706 | + , internal : Maybe UnionInternal | |
| 707 | + , is : Maybe UnionIs | |
| 708 | + , iterable : Maybe UnionIterable | |
| 709 | + , jdec : Maybe UnionJdec | |
| 710 | + , jenc : Maybe UnionJenc | |
| 711 | + , jpipe : Maybe UnionJpipe | |
| 712 | + , json : Maybe UnionJSON | |
| 713 | + , jsonConverter : Maybe UnionJSONConverter | |
| 714 | + , jsonSerializer : Maybe UnionJSONSerializer | |
| 715 | + , jsonToken : Maybe UnionJSONToken | |
| 716 | + , jsonWriter : Maybe UnionJSONWriter | |
| 717 | + , lambda : Maybe UnionLambda | |
| 718 | + , lazy : Maybe UnionLazy | |
| 719 | + , left : Maybe UnionLeft | |
| 720 | + , quickTypeLet : Maybe UnionLet | |
| 721 | + , list : Maybe UnionList | |
| 722 | + , lock : Maybe UnionLock | |
| 723 | + , long : Maybe UnionLong | |
| 724 | + , map : Maybe UnionMap | |
| 725 | + , metadataPropertyHandling : Maybe UnionMetadataPropertyHandling | |
| 726 | + , quickTypeModule : Maybe UnionModule | |
| 727 | + , mutable : Maybe UnionMutable | |
| 728 | + , mutating : Maybe UnionMutating | |
| 729 | + , namespace : Maybe UnionNamespace | |
| 730 | + , native : Maybe UnionNative | |
| 731 | + , new : Maybe UnionNew | |
| 732 | + , newtonsoft : Maybe UnionNewtonsoft | |
| 733 | + , nil : Maybe UnionNil | |
| 734 | + , no : Maybe UnionNO | |
| 735 | + , noexcept : Maybe UnionNoexcept | |
| 736 | + , nonatomic : Maybe UnionNonatomic | |
| 737 | + , quickTypeNone : Maybe UnionNoneUnion | |
| 738 | + , none : Maybe UnionNone | |
| 739 | + , nonlocal : Maybe UnionNonlocal | |
| 740 | + , nonmutating : Maybe UnionNonmutating | |
| 741 | + , not : Maybe UnionNot | |
| 742 | + , notEq : Maybe UnionNotEq | |
| 743 | + , nsString : Maybe UnionNSString | |
| 744 | + , null : Maybe UnionNULL | |
| 745 | + , quickTypeNull : Maybe UnionNull | |
| 746 | + , nullptr : Maybe UnionNullptr | |
| 747 | + , number : Maybe UnionNumber | |
| 748 | + , object : Maybe UnionObject | |
| 749 | + , quickTypeOf : Maybe UnionOf | |
| 750 | + , oneway : Maybe UnionOneway | |
| 751 | + , open : Maybe UnionOpen | |
| 752 | + , operator : Maybe UnionOperator | |
| 753 | + , optional : Maybe UnionOptional | |
| 754 | + , or : Maybe UnionOr | |
| 755 | + , orEq : Maybe UnionOrEq | |
| 756 | + , out : Maybe UnionOut | |
| 757 | + , override : Maybe UnionOverride | |
| 758 | + , package : Maybe UnionPackage | |
| 759 | + , params : Maybe UnionParams | |
| 760 | + , pass : Maybe UnionPass | |
| 761 | + , quickTypePort : Maybe UnionPort | |
| 762 | + , postfix : Maybe UnionPostfix | |
| 763 | + , precedence : Maybe UnionPrecedence | |
| 764 | + , prefix : Maybe UnionPrefix | |
| 765 | + , print : Maybe UnionPrint | |
| 766 | + , printf : Maybe UnionPrintf | |
| 767 | + , private : Maybe UnionPrivate | |
| 768 | + , protected : Maybe UnionProtected | |
| 769 | + , protocol : Maybe UnionProtocol | |
| 770 | + , quickTypeProtocol : Maybe UnionProtocolUnion | |
| 771 | + , public : Maybe UnionPublic | |
| 772 | + , quicktype : Maybe UnionQuicktype | |
| 773 | + , raise : Maybe UnionRaise | |
| 774 | + , range : Maybe UnionRange | |
| 775 | + , readonly : Maybe UnionReadonly | |
| 776 | + , ref : Maybe UnionRef | |
| 777 | + , register : Maybe UnionRegister | |
| 778 | + , reinterpretCast : Maybe UnionReinterpretCast | |
| 779 | + , repeat : Maybe UnionRepeat | |
| 780 | + , require : Maybe UnionRequire | |
| 781 | + , required : Maybe UnionRequired | |
| 782 | + , requires : Maybe UnionRequires | |
| 783 | + , restrict : Maybe UnionRestrict | |
| 784 | + , retain : Maybe UnionRetain | |
| 785 | + , rethrows : Maybe UnionRethrows | |
| 786 | + , return : Maybe UnionReturn | |
| 787 | + , right : Maybe UnionRight | |
| 788 | + , sbyte : Maybe UnionSbyte | |
| 789 | + , sealed : Maybe UnionSealed | |
| 790 | + , sel : Maybe UnionSEL | |
| 791 | + , select : Maybe UnionSelect | |
| 792 | + , self : Maybe UnionSelf | |
| 793 | + , quickTypeSelf : Maybe UnionSelfUnion | |
| 794 | + , serialize : Maybe UnionSerialize | |
| 795 | + , set : Maybe UnionSet | |
| 796 | + , short : Maybe UnionShort | |
| 797 | + , signed : Maybe UnionSigned | |
| 798 | + , sizeof : Maybe UnionSizeof | |
| 799 | + , stackalloc : Maybe UnionStackalloc | |
| 800 | + , static : Maybe UnionStatic | |
| 801 | + , staticAssert : Maybe UnionStaticAssert | |
| 802 | + , staticCast : Maybe UnionStaticCast | |
| 803 | + , strictfp : Maybe UnionStrictfp | |
| 804 | + , quickTypeString : Maybe UnionString | |
| 805 | + , struct : Maybe UnionStruct | |
| 806 | + , subscript : Maybe UnionSubscript | |
| 807 | + , super : Maybe UnionSuper | |
| 808 | + , switch : Maybe UnionSwitch | |
| 809 | + , symbol : Maybe UnionSymbol | |
| 810 | + , synchronized : Maybe UnionSynchronized | |
| 811 | + , system : Maybe UnionSystem | |
| 812 | + , template : Maybe UnionTemplate | |
| 813 | + , quickTypeThen : Maybe UnionThen | |
| 814 | + , this : Maybe UnionThis | |
| 815 | + , threadLocal : Maybe UnionThreadLocal | |
| 816 | + , throw : Maybe UnionThrow | |
| 817 | + , throws : Maybe UnionThrows | |
| 818 | + , toJSON : Maybe UnionToJSON | |
| 819 | + , topLevel : Maybe UnionTopLevel | |
| 820 | + , transient : Maybe UnionTransient | |
| 821 | + , true : Maybe UnionTrue | |
| 822 | + , quickTypeTrue : Maybe UnionTrueUnion | |
| 823 | + , try : Maybe UnionTry | |
| 824 | + , quickTypeType : Maybe UnionType | |
| 825 | + , purpleType : Maybe UnionTypeUnion | |
| 826 | + , typealias : Maybe UnionTypealias | |
| 827 | + , typedef : Maybe UnionTypedef | |
| 828 | + , typeid : Maybe UnionTypeid | |
| 829 | + , typename : Maybe UnionTypename | |
| 830 | + , typeof : Maybe UnionTypeof | |
| 831 | + , uint : Maybe UnionUint | |
| 832 | + , ulong : Maybe UnionUlong | |
| 833 | + , unchecked : Maybe UnionUnchecked | |
| 834 | + , undefined : Maybe UnionUndefined | |
| 835 | + , union : Maybe UnionUnionUnion | |
| 836 | + , unowned : Maybe UnionUnowned | |
| 837 | + , unsafe : Maybe UnionUnsafe | |
| 838 | + , unsigned : Maybe UnionUnsigned | |
| 839 | + , ushort : Maybe UnionUshort | |
| 840 | + , using : Maybe UnionUsing | |
| 841 | + , var : Maybe UnionVar | |
| 842 | + , virtual : Maybe UnionVirtual | |
| 843 | + , void : Maybe UnionVoid | |
| 844 | + , volatile : Maybe UnionVolatile | |
| 845 | + , wcharT : Maybe UnionWcharT | |
| 846 | + , weak : Maybe UnionWeak | |
| 847 | + , quickTypeWhere : Maybe UnionWhere | |
| 848 | + , while : Maybe UnionWhile | |
| 849 | + , willSet : Maybe UnionWillSet | |
| 850 | + , with : Maybe UnionWith | |
| 851 | + , xor : Maybe UnionXor | |
| 852 | + , xorEq : Maybe UnionXorEq | |
| 853 | + , yes : Maybe UnionYES | |
| 854 | + , yield : Maybe UnionYield | |
| 855 | + } | |
| 856 | + | |
| 857 | +type UnionAbstract | |
| 858 | + = AbstractInUnionAbstract Abstract | |
| 859 | + | DoubleInUnionAbstract Float | |
| 860 | + | |
| 861 | +type alias Abstract = | |
| 862 | + { | |
| 863 | + } | |
| 864 | + | |
| 865 | +type UnionAlignas | |
| 866 | + = AlignasInUnionAlignas Alignas | |
| 867 | + | DoubleInUnionAlignas Float | |
| 868 | + | |
| 869 | +type alias Alignas = | |
| 870 | + { | |
| 871 | + } | |
| 872 | + | |
| 873 | +type UnionAlignof | |
| 874 | + = AlignofInUnionAlignof Alignof | |
| 875 | + | DoubleInUnionAlignof Float | |
| 876 | + | |
| 877 | +type alias Alignof = | |
| 878 | + { | |
| 879 | + } | |
| 880 | + | |
| 881 | +type UnionAnd | |
| 882 | + = AndInUnionAnd And | |
| 883 | + | DoubleInUnionAnd Float | |
| 884 | + | |
| 885 | +type alias And = | |
| 886 | + { | |
| 887 | + } | |
| 888 | + | |
| 889 | +type UnionAndEq | |
| 890 | + = AndEqInUnionAndEq AndEq | |
| 891 | + | DoubleInUnionAndEq Float | |
| 892 | + | |
| 893 | +type alias AndEq = | |
| 894 | + { | |
| 895 | + } | |
| 896 | + | |
| 897 | +type UnionAny | |
| 898 | + = AnyInUnionAny Any | |
| 899 | + | DoubleInUnionAny Float | |
| 900 | + | |
| 901 | +type alias Any = | |
| 902 | + { | |
| 903 | + } | |
| 904 | + | |
| 905 | +type UnionArray | |
| 906 | + = ArrayClassInUnionArray ArrayClass | |
| 907 | + | DoubleInUnionArray Float | |
| 908 | + | |
| 909 | +type alias ArrayClass = | |
| 910 | + { | |
| 911 | + } | |
| 912 | + | |
| 913 | +type UnionASM | |
| 914 | + = ASMInUnionASM ASM | |
| 915 | + | DoubleInUnionASM Float | |
| 916 | + | |
| 917 | +type alias ASM = | |
| 918 | + { | |
| 919 | + } | |
| 920 | + | |
| 921 | +type UnionAssert | |
| 922 | + = AssertInUnionAssert Assert | |
| 923 | + | DoubleInUnionAssert Float | |
| 924 | + | |
| 925 | +type alias Assert = | |
| 926 | + { | |
| 927 | + } | |
| 928 | + | |
| 929 | +type UnionAssociatedtype | |
| 930 | + = AssociatedtypeInUnionAssociatedtype Associatedtype | |
| 931 | + | DoubleInUnionAssociatedtype Float | |
| 932 | + | |
| 933 | +type alias Associatedtype = | |
| 934 | + { | |
| 935 | + } | |
| 936 | + | |
| 937 | +type UnionAssociativity | |
| 938 | + = AssociativityInUnionAssociativity Associativity | |
| 939 | + | DoubleInUnionAssociativity Float | |
| 940 | + | |
| 941 | +type alias Associativity = | |
| 942 | + { | |
| 943 | + } | |
| 944 | + | |
| 945 | +type UnionAsync | |
| 946 | + = AsyncInUnionAsync Async | |
| 947 | + | DoubleInUnionAsync Float | |
| 948 | + | |
| 949 | +type alias Async = | |
| 950 | + { | |
| 951 | + } | |
| 952 | + | |
| 953 | +type UnionAtomic | |
| 954 | + = AtomicInUnionAtomic Atomic | |
| 955 | + | DoubleInUnionAtomic Float | |
| 956 | + | |
| 957 | +type alias Atomic = | |
| 958 | + { | |
| 959 | + } | |
| 960 | + | |
| 961 | +type UnionAtomicCancel | |
| 962 | + = AtomicCancelInUnionAtomicCancel AtomicCancel | |
| 963 | + | DoubleInUnionAtomicCancel Float | |
| 964 | + | |
| 965 | +type alias AtomicCancel = | |
| 966 | + { | |
| 967 | + } | |
| 968 | + | |
| 969 | +type UnionAtomicCommit | |
| 970 | + = AtomicCommitInUnionAtomicCommit AtomicCommit | |
| 971 | + | DoubleInUnionAtomicCommit Float | |
| 972 | + | |
| 973 | +type alias AtomicCommit = | |
| 974 | + { | |
| 975 | + } | |
| 976 | + | |
| 977 | +type UnionAtomicNoexcept | |
| 978 | + = AtomicNoexceptInUnionAtomicNoexcept AtomicNoexcept | |
| 979 | + | DoubleInUnionAtomicNoexcept Float | |
| 980 | + | |
| 981 | +type alias AtomicNoexcept = | |
| 982 | + { | |
| 983 | + } | |
| 984 | + | |
| 985 | +type UnionAuto | |
| 986 | + = AutoInUnionAuto Auto | |
| 987 | + | DoubleInUnionAuto Float | |
| 988 | + | |
| 989 | +type alias Auto = | |
| 990 | + { | |
| 991 | + } | |
| 992 | + | |
| 993 | +type UnionAwait | |
| 994 | + = AwaitInUnionAwait Await | |
| 995 | + | DoubleInUnionAwait Float | |
| 996 | + | |
| 997 | +type alias Await = | |
| 998 | + { | |
| 999 | + } | |
| 1000 | + | |
| 1001 | +type UnionBase | |
| 1002 | + = BaseInUnionBase Base | |
| 1003 | + | DoubleInUnionBase Float | |
| 1004 | + | |
| 1005 | +type alias Base = | |
| 1006 | + { | |
| 1007 | + } | |
| 1008 | + | |
| 1009 | +type UnionBitand | |
| 1010 | + = BitandInUnionBitand Bitand | |
| 1011 | + | DoubleInUnionBitand Float | |
| 1012 | + | |
| 1013 | +type alias Bitand = | |
| 1014 | + { | |
| 1015 | + } | |
| 1016 | + | |
| 1017 | +type UnionBitor | |
| 1018 | + = BitorInUnionBitor Bitor | |
| 1019 | + | DoubleInUnionBitor Float | |
| 1020 | + | |
| 1021 | +type alias Bitor = | |
| 1022 | + { | |
| 1023 | + } | |
| 1024 | + | |
| 1025 | +type UnionBoolean | |
| 1026 | + = BooleanInUnionBoolean Boolean | |
| 1027 | + | DoubleInUnionBoolean Float | |
| 1028 | + | |
| 1029 | +type alias Boolean = | |
| 1030 | + { | |
| 1031 | + } | |
| 1032 | + | |
| 1033 | +type UnionBreak | |
| 1034 | + = BreakInUnionBreak Break | |
| 1035 | + | DoubleInUnionBreak Float | |
| 1036 | + | |
| 1037 | +type alias Break = | |
| 1038 | + { | |
| 1039 | + } | |
| 1040 | + | |
| 1041 | +type UnionBycopy | |
| 1042 | + = BycopyInUnionBycopy Bycopy | |
| 1043 | + | DoubleInUnionBycopy Float | |
| 1044 | + | |
| 1045 | +type alias Bycopy = | |
| 1046 | + { | |
| 1047 | + } | |
| 1048 | + | |
| 1049 | +type UnionByref | |
| 1050 | + = ByrefInUnionByref Byref | |
| 1051 | + | DoubleInUnionByref Float | |
| 1052 | + | |
| 1053 | +type alias Byref = | |
| 1054 | + { | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | +type UnionByte | |
| 1058 | + = ByteInUnionByte Byte | |
| 1059 | + | DoubleInUnionByte Float | |
| 1060 | + | |
| 1061 | +type alias Byte = | |
| 1062 | + { | |
| 1063 | + } | |
| 1064 | + | |
| 1065 | +type UnionCatch | |
| 1066 | + = CatchInUnionCatch Catch | |
| 1067 | + | DoubleInUnionCatch Float | |
| 1068 | + | |
| 1069 | +type alias Catch = | |
| 1070 | + { | |
| 1071 | + } | |
| 1072 | + | |
| 1073 | +type UnionChan | |
| 1074 | + = ChanInUnionChan Chan | |
| 1075 | + | DoubleInUnionChan Float | |
| 1076 | + | |
| 1077 | +type alias Chan = | |
| 1078 | + { | |
| 1079 | + } | |
| 1080 | + | |
| 1081 | +type UnionChar | |
| 1082 | + = CharInUnionChar Char | |
| 1083 | + | DoubleInUnionChar Float | |
| 1084 | + | |
| 1085 | +type alias Char = | |
| 1086 | + { | |
| 1087 | + } | |
| 1088 | + | |
| 1089 | +type UnionChar16T | |
| 1090 | + = Char16TInUnionChar16T Char16T | |
| 1091 | + | DoubleInUnionChar16T Float | |
| 1092 | + | |
| 1093 | +type alias Char16T = | |
| 1094 | + { | |
| 1095 | + } | |
| 1096 | + | |
| 1097 | +type UnionChar32T | |
| 1098 | + = Char32TInUnionChar32T Char32T | |
| 1099 | + | DoubleInUnionChar32T Float | |
| 1100 | + | |
| 1101 | +type alias Char32T = | |
| 1102 | + { | |
| 1103 | + } | |
| 1104 | + | |
| 1105 | +type UnionChecked | |
| 1106 | + = CheckedInUnionChecked Checked | |
| 1107 | + | DoubleInUnionChecked Float | |
| 1108 | + | |
| 1109 | +type alias Checked = | |
| 1110 | + { | |
| 1111 | + } | |
| 1112 | + | |
| 1113 | +type UnionClass | |
| 1114 | + = ClassInUnionClass Class | |
| 1115 | + | DoubleInUnionClass Float | |
| 1116 | + | |
| 1117 | +type alias Class = | |
| 1118 | + { | |
| 1119 | + } | |
| 1120 | + | |
| 1121 | +type UnionCoAwait | |
| 1122 | + = CoAwaitInUnionCoAwait CoAwait | |
| 1123 | + | DoubleInUnionCoAwait Float | |
| 1124 | + | |
| 1125 | +type alias CoAwait = | |
| 1126 | + { | |
| 1127 | + } | |
| 1128 | + | |
| 1129 | +type UnionCoReturn | |
| 1130 | + = CoReturnInUnionCoReturn CoReturn | |
| 1131 | + | DoubleInUnionCoReturn Float | |
| 1132 | + | |
| 1133 | +type alias CoReturn = | |
| 1134 | + { | |
| 1135 | + } | |
| 1136 | + | |
| 1137 | +type UnionCoYield | |
| 1138 | + = CoYieldInUnionCoYield CoYield | |
| 1139 | + | DoubleInUnionCoYield Float | |
| 1140 | + | |
| 1141 | +type alias CoYield = | |
| 1142 | + { | |
| 1143 | + } | |
| 1144 | + | |
| 1145 | +type UnionCompl | |
| 1146 | + = ComplInUnionCompl Compl | |
| 1147 | + | DoubleInUnionCompl Float | |
| 1148 | + | |
| 1149 | +type alias Compl = | |
| 1150 | + { | |
| 1151 | + } | |
| 1152 | + | |
| 1153 | +type UnionComplex | |
| 1154 | + = ComplexInUnionComplex Complex | |
| 1155 | + | DoubleInUnionComplex Float | |
| 1156 | + | |
| 1157 | +type alias Complex = | |
| 1158 | + { | |
| 1159 | + } | |
| 1160 | + | |
| 1161 | +type UnionConcept | |
| 1162 | + = ConceptInUnionConcept Concept | |
| 1163 | + | DoubleInUnionConcept Float | |
| 1164 | + | |
| 1165 | +type alias Concept = | |
| 1166 | + { | |
| 1167 | + } | |
| 1168 | + | |
| 1169 | +type UnionConsole | |
| 1170 | + = ConsoleInUnionConsole Console | |
| 1171 | + | DoubleInUnionConsole Float | |
| 1172 | + | |
| 1173 | +type alias Console = | |
| 1174 | + { | |
| 1175 | + } | |
| 1176 | + | |
| 1177 | +type UnionConst | |
| 1178 | + = ConstInUnionConst Const | |
| 1179 | + | DoubleInUnionConst Float | |
| 1180 | + | |
| 1181 | +type alias Const = | |
| 1182 | + { | |
| 1183 | + } | |
| 1184 | + | |
| 1185 | +type UnionConstCast | |
| 1186 | + = ConstCastInUnionConstCast ConstCast | |
| 1187 | + | DoubleInUnionConstCast Float | |
| 1188 | + | |
| 1189 | +type alias ConstCast = | |
| 1190 | + { | |
| 1191 | + } | |
| 1192 | + | |
| 1193 | +type UnionConstexpr | |
| 1194 | + = ConstexprInUnionConstexpr Constexpr | |
| 1195 | + | DoubleInUnionConstexpr Float | |
| 1196 | + | |
| 1197 | +type alias Constexpr = | |
| 1198 | + { | |
| 1199 | + } | |
| 1200 | + | |
| 1201 | +type UnionConstructor | |
| 1202 | + = ConstructorInUnionConstructor Constructor | |
| 1203 | + | DoubleInUnionConstructor Float | |
| 1204 | + | |
| 1205 | +type alias Constructor = | |
| 1206 | + { | |
| 1207 | + } | |
| 1208 | + | |
| 1209 | +type UnionContinue | |
| 1210 | + = ContinueInUnionContinue Continue | |
| 1211 | + | DoubleInUnionContinue Float | |
| 1212 | + | |
| 1213 | +type alias Continue = | |
| 1214 | + { | |
| 1215 | + } | |
| 1216 | + | |
| 1217 | +type UnionConvenience | |
| 1218 | + = ConvenienceInUnionConvenience Convenience | |
| 1219 | + | DoubleInUnionConvenience Float | |
| 1220 | + | |
| 1221 | +type alias Convenience = | |
| 1222 | + { | |
| 1223 | + } | |
| 1224 | + | |
| 1225 | +type UnionConvert | |
| 1226 | + = ConvertInUnionConvert Convert | |
| 1227 | + | DoubleInUnionConvert Float | |
| 1228 | + | |
| 1229 | +type alias Convert = | |
| 1230 | + { | |
| 1231 | + } | |
| 1232 | + | |
| 1233 | +type UnionConverter | |
| 1234 | + = ConverterInUnionConverter Converter | |
| 1235 | + | DoubleInUnionConverter Float | |
| 1236 | + | |
| 1237 | +type alias Converter = | |
| 1238 | + { | |
| 1239 | + } | |
| 1240 | + | |
| 1241 | +type UnionDate | |
| 1242 | + = DateInUnionDate Date | |
| 1243 | + | DoubleInUnionDate Float | |
| 1244 | + | |
| 1245 | +type alias Date = | |
| 1246 | + { | |
| 1247 | + } | |
| 1248 | + | |
| 1249 | +type UnionDateParseHandling | |
| 1250 | + = DateParseHandlingInUnionDateParseHandling DateParseHandling | |
| 1251 | + | DoubleInUnionDateParseHandling Float | |
| 1252 | + | |
| 1253 | +type alias DateParseHandling = | |
| 1254 | + { | |
| 1255 | + } | |
| 1256 | + | |
| 1257 | +type UnionDebugger | |
| 1258 | + = DebuggerInUnionDebugger Debugger | |
| 1259 | + | DoubleInUnionDebugger Float | |
| 1260 | + | |
| 1261 | +type alias Debugger = | |
| 1262 | + { | |
| 1263 | + } | |
| 1264 | + | |
| 1265 | +type UnionDecimal | |
| 1266 | + = DecimalInUnionDecimal Decimal | |
| 1267 | + | DoubleInUnionDecimal Float | |
| 1268 | + | |
| 1269 | +type alias Decimal = | |
| 1270 | + { | |
| 1271 | + } | |
| 1272 | + | |
| 1273 | +type UnionDeclare | |
| 1274 | + = DeclareInUnionDeclare Declare | |
| 1275 | + | DoubleInUnionDeclare Float | |
| 1276 | + | |
| 1277 | +type alias Declare = | |
| 1278 | + { | |
| 1279 | + } | |
| 1280 | + | |
| 1281 | +type UnionDecltype | |
| 1282 | + = DecltypeInUnionDecltype Decltype | |
| 1283 | + | DoubleInUnionDecltype Float | |
| 1284 | + | |
| 1285 | +type alias Decltype = | |
| 1286 | + { | |
| 1287 | + } | |
| 1288 | + | |
| 1289 | +type UnionDecodeString | |
| 1290 | + = DecodeStringInUnionDecodeString DecodeString | |
| 1291 | + | DoubleInUnionDecodeString Float | |
| 1292 | + | |
| 1293 | +type alias DecodeString = | |
| 1294 | + { | |
| 1295 | + } | |
| 1296 | + | |
| 1297 | +type UnionDef | |
| 1298 | + = DefInUnionDef Def | |
| 1299 | + | DoubleInUnionDef Float | |
| 1300 | + | |
| 1301 | +type alias Def = | |
| 1302 | + { | |
| 1303 | + } | |
| 1304 | + | |
| 1305 | +type UnionDefault | |
| 1306 | + = DefaultInUnionDefault Default | |
| 1307 | + | DoubleInUnionDefault Float | |
| 1308 | + | |
| 1309 | +type alias Default = | |
| 1310 | + { | |
| 1311 | + } | |
| 1312 | + | |
| 1313 | +type UnionDefer | |
| 1314 | + = DeferInUnionDefer Defer | |
| 1315 | + | DoubleInUnionDefer Float | |
| 1316 | + | |
| 1317 | +type alias Defer = | |
| 1318 | + { | |
| 1319 | + } | |
| 1320 | + | |
| 1321 | +type UnionDeinit | |
| 1322 | + = DeinitInUnionDeinit Deinit | |
| 1323 | + | DoubleInUnionDeinit Float | |
| 1324 | + | |
| 1325 | +type alias Deinit = | |
| 1326 | + { | |
| 1327 | + } | |
| 1328 | + | |
| 1329 | +type UnionDel | |
| 1330 | + = DelInUnionDel Del | |
| 1331 | + | DoubleInUnionDel Float | |
| 1332 | + | |
| 1333 | +type alias Del = | |
| 1334 | + { | |
| 1335 | + } | |
| 1336 | + | |
| 1337 | +type UnionDelegate | |
| 1338 | + = DelegateInUnionDelegate Delegate | |
| 1339 | + | DoubleInUnionDelegate Float | |
| 1340 | + | |
| 1341 | +type alias Delegate = | |
| 1342 | + { | |
| 1343 | + } | |
| 1344 | + | |
| 1345 | +type UnionDelete | |
| 1346 | + = DeleteInUnionDelete Delete | |
| 1347 | + | DoubleInUnionDelete Float | |
| 1348 | + | |
| 1349 | +type alias Delete = | |
| 1350 | + { | |
| 1351 | + } | |
| 1352 | + | |
| 1353 | +type UnionDict | |
| 1354 | + = DictClassInUnionDict DictClass | |
| 1355 | + | DoubleInUnionDict Float | |
| 1356 | + | |
| 1357 | +type alias DictClass = | |
| 1358 | + { | |
| 1359 | + } | |
| 1360 | + | |
| 1361 | +type UnionDictionary | |
| 1362 | + = DictionaryInUnionDictionary Dictionary | |
| 1363 | + | DoubleInUnionDictionary Float | |
| 1364 | + | |
| 1365 | +type alias Dictionary = | |
| 1366 | + { | |
| 1367 | + } | |
| 1368 | + | |
| 1369 | +type UnionDidSet | |
| 1370 | + = DidSetInUnionDidSet DidSet | |
| 1371 | + | DoubleInUnionDidSet Float | |
| 1372 | + | |
| 1373 | +type alias DidSet = | |
| 1374 | + { | |
| 1375 | + } | |
| 1376 | + | |
| 1377 | +type UnionDo | |
| 1378 | + = DoInUnionDo Do | |
| 1379 | + | DoubleInUnionDo Float | |
| 1380 | + | |
| 1381 | +type alias Do = | |
| 1382 | + { | |
| 1383 | + } | |
| 1384 | + | |
| 1385 | +type UnionDouble | |
| 1386 | + = DoubleInUnionDouble Float | |
| 1387 | + | PurpleDoubleInUnionDouble Double | |
| 1388 | + | |
| 1389 | +type alias Double = | |
| 1390 | + { | |
| 1391 | + } | |
| 1392 | + | |
| 1393 | +type UnionDynamic | |
| 1394 | + = DoubleInUnionDynamic Float | |
| 1395 | + | DynamicInUnionDynamic Dynamic | |
| 1396 | + | |
| 1397 | +type alias Dynamic = | |
| 1398 | + { | |
| 1399 | + } | |
| 1400 | + | |
| 1401 | +type UnionDynamicCast | |
| 1402 | + = DoubleInUnionDynamicCast Float | |
| 1403 | + | DynamicCastInUnionDynamicCast DynamicCast | |
| 1404 | + | |
| 1405 | +type alias DynamicCast = | |
| 1406 | + { | |
| 1407 | + } | |
| 1408 | + | |
| 1409 | +type UnionElif | |
| 1410 | + = DoubleInUnionElif Float | |
| 1411 | + | ElifInUnionElif Elif | |
| 1412 | + | |
| 1413 | +type alias Elif = | |
| 1414 | + { | |
| 1415 | + } | |
| 1416 | + | |
| 1417 | +type UnionUnion | |
| 1418 | + = DoubleInUnionUnion Float | |
| 1419 | + | EmptyInUnionUnion Empty | |
| 1420 | + | |
| 1421 | +type alias Empty = | |
| 1422 | + { | |
| 1423 | + } | |
| 1424 | + | |
| 1425 | +type UnionEncodeQuickType | |
| 1426 | + = DoubleInUnionEncodeQuickType Float | |
| 1427 | + | EncodeQuickTypeInUnionEncodeQuickType EncodeQuickType | |
| 1428 | + | |
| 1429 | +type alias EncodeQuickType = | |
| 1430 | + { | |
| 1431 | + } | |
| 1432 | + | |
| 1433 | +type UnionEnum | |
| 1434 | + = DoubleInUnionEnum Float | |
| 1435 | + | EnumInUnionEnum Enum | |
| 1436 | + | |
| 1437 | +type alias Enum = | |
| 1438 | + { | |
| 1439 | + } | |
| 1440 | + | |
| 1441 | +type UnionEvent | |
| 1442 | + = DoubleInUnionEvent Float | |
| 1443 | + | EventInUnionEvent Event | |
| 1444 | + | |
| 1445 | +type alias Event = | |
| 1446 | + { | |
| 1447 | + } | |
| 1448 | + | |
| 1449 | +type UnionExcept | |
| 1450 | + = DoubleInUnionExcept Float | |
| 1451 | + | ExceptInUnionExcept Except | |
| 1452 | + | |
| 1453 | +type alias Except = | |
| 1454 | + { | |
| 1455 | + } | |
| 1456 | + | |
| 1457 | +type UnionException | |
| 1458 | + = DoubleInUnionException Float | |
| 1459 | + | ExceptionInUnionException Exception | |
| 1460 | + | |
| 1461 | +type alias Exception = | |
| 1462 | + { | |
| 1463 | + } | |
| 1464 | + | |
| 1465 | +type UnionExplicit | |
| 1466 | + = DoubleInUnionExplicit Float | |
| 1467 | + | ExplicitInUnionExplicit Explicit | |
| 1468 | + | |
| 1469 | +type alias Explicit = | |
| 1470 | + { | |
| 1471 | + } | |
| 1472 | + | |
| 1473 | +type UnionExport | |
| 1474 | + = DoubleInUnionExport Float | |
| 1475 | + | ExportInUnionExport Export | |
| 1476 | + | |
| 1477 | +type alias Export = | |
| 1478 | + { | |
| 1479 | + } | |
| 1480 | + | |
| 1481 | +type UnionExtends | |
| 1482 | + = DoubleInUnionExtends Float | |
| 1483 | + | ExtendsInUnionExtends Extends | |
| 1484 | + | |
| 1485 | +type alias Extends = | |
| 1486 | + { | |
| 1487 | + } | |
| 1488 | + | |
| 1489 | +type UnionExtension | |
| 1490 | + = DoubleInUnionExtension Float | |
| 1491 | + | ExtensionInUnionExtension Extension | |
| 1492 | + | |
| 1493 | +type alias Extension = | |
| 1494 | + { | |
| 1495 | + } | |
| 1496 | + | |
| 1497 | +type UnionExtern | |
| 1498 | + = DoubleInUnionExtern Float | |
| 1499 | + | ExternInUnionExtern Extern | |
| 1500 | + | |
| 1501 | +type alias Extern = | |
| 1502 | + { | |
| 1503 | + } | |
| 1504 | + | |
| 1505 | +type UnionFallthrough | |
| 1506 | + = DoubleInUnionFallthrough Float | |
| 1507 | + | FallthroughInUnionFallthrough Fallthrough | |
| 1508 | + | |
| 1509 | +type alias Fallthrough = | |
| 1510 | + { | |
| 1511 | + } | |
| 1512 | + | |
| 1513 | +type UnionFalse | |
| 1514 | + = DoubleInUnionFalse Float | |
| 1515 | + | FalseClassInUnionFalse FalseClass | |
| 1516 | + | |
| 1517 | +type alias FalseClass = | |
| 1518 | + { | |
| 1519 | + } | |
| 1520 | + | |
| 1521 | +type UnionFileprivate | |
| 1522 | + = DoubleInUnionFileprivate Float | |
| 1523 | + | FileprivateInUnionFileprivate Fileprivate | |
| 1524 | + | |
| 1525 | +type alias Fileprivate = | |
| 1526 | + { | |
| 1527 | + } | |
| 1528 | + | |
| 1529 | +type UnionFinal | |
| 1530 | + = DoubleInUnionFinal Float | |
| 1531 | + | FinalInUnionFinal Final | |
| 1532 | + | |
| 1533 | +type alias Final = | |
| 1534 | + { | |
| 1535 | + } | |
| 1536 | + | |
| 1537 | +type UnionFinally | |
| 1538 | + = DoubleInUnionFinally Float | |
| 1539 | + | FinallyInUnionFinally Finally | |
| 1540 | + | |
| 1541 | +type alias Finally = | |
| 1542 | + { | |
| 1543 | + } | |
| 1544 | + | |
| 1545 | +type UnionFixed | |
| 1546 | + = DoubleInUnionFixed Float | |
| 1547 | + | FixedInUnionFixed Fixed | |
| 1548 | + | |
| 1549 | +type alias Fixed = | |
| 1550 | + { | |
| 1551 | + } | |
| 1552 | + | |
| 1553 | +type UnionFor | |
| 1554 | + = DoubleInUnionFor Float | |
| 1555 | + | ForInUnionFor For | |
| 1556 | + | |
| 1557 | +type alias For = | |
| 1558 | + { | |
| 1559 | + } | |
| 1560 | + | |
| 1561 | +type UnionForeach | |
| 1562 | + = DoubleInUnionForeach Float | |
| 1563 | + | ForeachInUnionForeach Foreach | |
| 1564 | + | |
| 1565 | +type alias Foreach = | |
| 1566 | + { | |
| 1567 | + } | |
| 1568 | + | |
| 1569 | +type UnionFriend | |
| 1570 | + = DoubleInUnionFriend Float | |
| 1571 | + | FriendInUnionFriend Friend | |
| 1572 | + | |
| 1573 | +type alias Friend = | |
| 1574 | + { | |
| 1575 | + } | |
| 1576 | + | |
| 1577 | +type UnionFrom | |
| 1578 | + = DoubleInUnionFrom Float | |
| 1579 | + | FromInUnionFrom From | |
| 1580 | + | |
| 1581 | +type alias From = | |
| 1582 | + { | |
| 1583 | + } | |
| 1584 | + | |
| 1585 | +type UnionFromJSON | |
| 1586 | + = DoubleInUnionFromJSON Float | |
| 1587 | + | FromJSONInUnionFromJSON FromJSON | |
| 1588 | + | |
| 1589 | +type alias FromJSON = | |
| 1590 | + { | |
| 1591 | + } | |
| 1592 | + | |
| 1593 | +type UnionFunc | |
| 1594 | + = DoubleInUnionFunc Float | |
| 1595 | + | FuncInUnionFunc Func | |
| 1596 | + | |
| 1597 | +type alias Func = | |
| 1598 | + { | |
| 1599 | + } | |
| 1600 | + | |
| 1601 | +type UnionFunction | |
| 1602 | + = DoubleInUnionFunction Float | |
| 1603 | + | FunctionInUnionFunction Function | |
| 1604 | + | |
| 1605 | +type alias Function = | |
| 1606 | + { | |
| 1607 | + } | |
| 1608 | + | |
| 1609 | +type UnionGet | |
| 1610 | + = DoubleInUnionGet Float | |
| 1611 | + | GetInUnionGet Get | |
| 1612 | + | |
| 1613 | +type alias Get = | |
| 1614 | + { | |
| 1615 | + } | |
| 1616 | + | |
| 1617 | +type UnionGlobal | |
| 1618 | + = DoubleInUnionGlobal Float | |
| 1619 | + | GlobalInUnionGlobal Global | |
| 1620 | + | |
| 1621 | +type alias Global = | |
| 1622 | + { | |
| 1623 | + } | |
| 1624 | + | |
| 1625 | +type UnionGo | |
| 1626 | + = DoubleInUnionGo Float | |
| 1627 | + | GoInUnionGo Go | |
| 1628 | + | |
| 1629 | +type alias Go = | |
| 1630 | + { | |
| 1631 | + } | |
| 1632 | + | |
| 1633 | +type UnionGoto | |
| 1634 | + = DoubleInUnionGoto Float | |
| 1635 | + | GotoInUnionGoto Goto | |
| 1636 | + | |
| 1637 | +type alias Goto = | |
| 1638 | + { | |
| 1639 | + } | |
| 1640 | + | |
| 1641 | +type UnionGuard | |
| 1642 | + = DoubleInUnionGuard Float | |
| 1643 | + | GuardInUnionGuard Guard | |
| 1644 | + | |
| 1645 | +type alias Guard = | |
| 1646 | + { | |
| 1647 | + } | |
| 1648 | + | |
| 1649 | +type UnionHasOwnProperty | |
| 1650 | + = DoubleInUnionHasOwnProperty Float | |
| 1651 | + | HasOwnPropertyInUnionHasOwnProperty HasOwnProperty | |
| 1652 | + | |
| 1653 | +type alias HasOwnProperty = | |
| 1654 | + { | |
| 1655 | + } | |
| 1656 | + | |
| 1657 | +type UnionID | |
| 1658 | + = DoubleInUnionID Float | |
| 1659 | + | IDInUnionID ID | |
| 1660 | + | |
| 1661 | +type alias ID = | |
| 1662 | + { | |
| 1663 | + } | |
| 1664 | + | |
| 1665 | +type UnionImaginery | |
| 1666 | + = DoubleInUnionImaginery Float | |
| 1667 | + | ImagineryInUnionImaginery Imaginery | |
| 1668 | + | |
| 1669 | +type alias Imaginery = | |
| 1670 | + { | |
| 1671 | + } | |
| 1672 | + | |
| 1673 | +type UnionIMP | |
| 1674 | + = DoubleInUnionIMP Float | |
| 1675 | + | ImpInUnionIMP Imp | |
| 1676 | + | |
| 1677 | +type alias Imp = | |
| 1678 | + { | |
| 1679 | + } | |
| 1680 | + | |
| 1681 | +type UnionImplements | |
| 1682 | + = DoubleInUnionImplements Float | |
| 1683 | + | ImplementsInUnionImplements Implements | |
| 1684 | + | |
| 1685 | +type alias Implements = | |
| 1686 | + { | |
| 1687 | + } | |
| 1688 | + | |
| 1689 | +type UnionImplicit | |
| 1690 | + = DoubleInUnionImplicit Float | |
| 1691 | + | ImplicitInUnionImplicit Implicit | |
| 1692 | + | |
| 1693 | +type alias Implicit = | |
| 1694 | + { | |
| 1695 | + } | |
| 1696 | + | |
| 1697 | +type UnionIndirect | |
| 1698 | + = DoubleInUnionIndirect Float | |
| 1699 | + | IndirectInUnionIndirect Indirect | |
| 1700 | + | |
| 1701 | +type alias Indirect = | |
| 1702 | + { | |
| 1703 | + } | |
| 1704 | + | |
| 1705 | +type UnionInit | |
| 1706 | + = DoubleInUnionInit Float | |
| 1707 | + | InitInUnionInit Init | |
| 1708 | + | |
| 1709 | +type alias Init = | |
| 1710 | + { | |
| 1711 | + } | |
| 1712 | + | |
| 1713 | +type UnionInline | |
| 1714 | + = DoubleInUnionInline Float | |
| 1715 | + | InlineInUnionInline Inline | |
| 1716 | + | |
| 1717 | +type alias Inline = | |
| 1718 | + { | |
| 1719 | + } | |
| 1720 | + | |
| 1721 | +type UnionInout | |
| 1722 | + = DoubleInUnionInout Float | |
| 1723 | + | InoutInUnionInout Inout | |
| 1724 | + | |
| 1725 | +type alias Inout = | |
| 1726 | + { | |
| 1727 | + } | |
| 1728 | + | |
| 1729 | +type UnionInstanceof | |
| 1730 | + = DoubleInUnionInstanceof Float | |
| 1731 | + | InstanceofInUnionInstanceof Instanceof | |
| 1732 | + | |
| 1733 | +type alias Instanceof = | |
| 1734 | + { | |
| 1735 | + } | |
| 1736 | + | |
| 1737 | +type UnionInterface | |
| 1738 | + = DoubleInUnionInterface Float | |
| 1739 | + | InterfaceInUnionInterface Interface | |
| 1740 | + | |
| 1741 | +type alias Interface = | |
| 1742 | + { | |
| 1743 | + } | |
| 1744 | + | |
| 1745 | +type UnionInternal | |
| 1746 | + = DoubleInUnionInternal Float | |
| 1747 | + | InternalInUnionInternal Internal | |
| 1748 | + | |
| 1749 | +type alias Internal = | |
| 1750 | + { | |
| 1751 | + } | |
| 1752 | + | |
| 1753 | +type UnionIs | |
| 1754 | + = DoubleInUnionIs Float | |
| 1755 | + | IsInUnionIs Is | |
| 1756 | + | |
| 1757 | +type alias Is = | |
| 1758 | + { | |
| 1759 | + } | |
| 1760 | + | |
| 1761 | +type UnionIterable | |
| 1762 | + = DoubleInUnionIterable Float | |
| 1763 | + | IterableInUnionIterable Iterable | |
| 1764 | + | |
| 1765 | +type alias Iterable = | |
| 1766 | + { | |
| 1767 | + } | |
| 1768 | + | |
| 1769 | +type UnionJdec | |
| 1770 | + = DoubleInUnionJdec Float | |
| 1771 | + | JdecClassInUnionJdec JdecClass | |
| 1772 | + | |
| 1773 | +type alias JdecClass = | |
| 1774 | + { | |
| 1775 | + } | |
| 1776 | + | |
| 1777 | +type UnionJenc | |
| 1778 | + = DoubleInUnionJenc Float | |
| 1779 | + | JencClassInUnionJenc JencClass | |
| 1780 | + | |
| 1781 | +type alias JencClass = | |
| 1782 | + { | |
| 1783 | + } | |
| 1784 | + | |
| 1785 | +type UnionJpipe | |
| 1786 | + = DoubleInUnionJpipe Float | |
| 1787 | + | JpipeClassInUnionJpipe JpipeClass | |
| 1788 | + | |
| 1789 | +type alias JpipeClass = | |
| 1790 | + { | |
| 1791 | + } | |
| 1792 | + | |
| 1793 | +type UnionJSON | |
| 1794 | + = DoubleInUnionJSON Float | |
| 1795 | + | JSONInUnionJSON JSON | |
| 1796 | + | |
| 1797 | +type alias JSON = | |
| 1798 | + { | |
| 1799 | + } | |
| 1800 | + | |
| 1801 | +type UnionJSONConverter | |
| 1802 | + = DoubleInUnionJSONConverter Float | |
| 1803 | + | JSONConverterInUnionJSONConverter JSONConverter | |
| 1804 | + | |
| 1805 | +type alias JSONConverter = | |
| 1806 | + { | |
| 1807 | + } | |
| 1808 | + | |
| 1809 | +type UnionJSONSerializer | |
| 1810 | + = DoubleInUnionJSONSerializer Float | |
| 1811 | + | JSONSerializerInUnionJSONSerializer JSONSerializer | |
| 1812 | + | |
| 1813 | +type alias JSONSerializer = | |
| 1814 | + { | |
| 1815 | + } | |
| 1816 | + | |
| 1817 | +type UnionJSONToken | |
| 1818 | + = DoubleInUnionJSONToken Float | |
| 1819 | + | JSONTokenInUnionJSONToken JSONToken | |
| 1820 | + | |
| 1821 | +type alias JSONToken = | |
| 1822 | + { | |
| 1823 | + } | |
| 1824 | + | |
| 1825 | +type UnionJSONWriter | |
| 1826 | + = DoubleInUnionJSONWriter Float | |
| 1827 | + | JSONWriterInUnionJSONWriter JSONWriter | |
| 1828 | + | |
| 1829 | +type alias JSONWriter = | |
| 1830 | + { | |
| 1831 | + } | |
| 1832 | + | |
| 1833 | +type UnionLambda | |
| 1834 | + = DoubleInUnionLambda Float | |
| 1835 | + | LambdaInUnionLambda Lambda | |
| 1836 | + | |
| 1837 | +type alias Lambda = | |
| 1838 | + { | |
| 1839 | + } | |
| 1840 | + | |
| 1841 | +type UnionLazy | |
| 1842 | + = DoubleInUnionLazy Float | |
| 1843 | + | LazyInUnionLazy Lazy | |
| 1844 | + | |
| 1845 | +type alias Lazy = | |
| 1846 | + { | |
| 1847 | + } | |
| 1848 | + | |
| 1849 | +type UnionLeft | |
| 1850 | + = DoubleInUnionLeft Float | |
| 1851 | + | LeftInUnionLeft Left | |
| 1852 | + | |
| 1853 | +type alias Left = | |
| 1854 | + { | |
| 1855 | + } | |
| 1856 | + | |
| 1857 | +type UnionList | |
| 1858 | + = DoubleInUnionList Float | |
| 1859 | + | ListClassInUnionList ListClass | |
| 1860 | + | |
| 1861 | +type alias ListClass = | |
| 1862 | + { | |
| 1863 | + } | |
| 1864 | + | |
| 1865 | +type UnionLock | |
| 1866 | + = DoubleInUnionLock Float | |
| 1867 | + | LockInUnionLock Lock | |
| 1868 | + | |
| 1869 | +type alias Lock = | |
| 1870 | + { | |
| 1871 | + } | |
| 1872 | + | |
| 1873 | +type UnionLong | |
| 1874 | + = DoubleInUnionLong Float | |
| 1875 | + | LongInUnionLong Long | |
| 1876 | + | |
| 1877 | +type alias Long = | |
| 1878 | + { | |
| 1879 | + } | |
| 1880 | + | |
| 1881 | +type UnionMap | |
| 1882 | + = DoubleInUnionMap Float | |
| 1883 | + | MapInUnionMap Map | |
| 1884 | + | |
| 1885 | +type alias Map = | |
| 1886 | + { | |
| 1887 | + } | |
| 1888 | + | |
| 1889 | +type UnionMetadataPropertyHandling | |
| 1890 | + = DoubleInUnionMetadataPropertyHandling Float | |
| 1891 | + | MetadataPropertyHandlingInUnionMetadataPropertyHandling MetadataPropertyHandling | |
| 1892 | + | |
| 1893 | +type alias MetadataPropertyHandling = | |
| 1894 | + { | |
| 1895 | + } | |
| 1896 | + | |
| 1897 | +type UnionMutable | |
| 1898 | + = DoubleInUnionMutable Float | |
| 1899 | + | MutableInUnionMutable Mutable | |
| 1900 | + | |
| 1901 | +type alias Mutable = | |
| 1902 | + { | |
| 1903 | + } | |
| 1904 | + | |
| 1905 | +type UnionMutating | |
| 1906 | + = DoubleInUnionMutating Float | |
| 1907 | + | MutatingInUnionMutating Mutating | |
| 1908 | + | |
| 1909 | +type alias Mutating = | |
| 1910 | + { | |
| 1911 | + } | |
| 1912 | + | |
| 1913 | +type UnionNamespace | |
| 1914 | + = DoubleInUnionNamespace Float | |
| 1915 | + | NamespaceInUnionNamespace Namespace | |
| 1916 | + | |
| 1917 | +type alias Namespace = | |
| 1918 | + { | |
| 1919 | + } | |
| 1920 | + | |
| 1921 | +type UnionNative | |
| 1922 | + = DoubleInUnionNative Float | |
| 1923 | + | NativeInUnionNative Native | |
| 1924 | + | |
| 1925 | +type alias Native = | |
| 1926 | + { | |
| 1927 | + } | |
| 1928 | + | |
| 1929 | +type UnionNew | |
| 1930 | + = DoubleInUnionNew Float | |
| 1931 | + | NewInUnionNew New | |
| 1932 | + | |
| 1933 | +type alias New = | |
| 1934 | + { | |
| 1935 | + } | |
| 1936 | + | |
| 1937 | +type UnionNewtonsoft | |
| 1938 | + = DoubleInUnionNewtonsoft Float | |
| 1939 | + | NewtonsoftInUnionNewtonsoft Newtonsoft | |
| 1940 | + | |
| 1941 | +type alias Newtonsoft = | |
| 1942 | + { | |
| 1943 | + } | |
| 1944 | + | |
| 1945 | +type UnionNil | |
| 1946 | + = DoubleInUnionNil Float | |
| 1947 | + | NilInUnionNil Nil | |
| 1948 | + | |
| 1949 | +type alias Nil = | |
| 1950 | + { | |
| 1951 | + } | |
| 1952 | + | |
| 1953 | +type UnionNO | |
| 1954 | + = DoubleInUnionNO Float | |
| 1955 | + | NoInUnionNO No | |
| 1956 | + | |
| 1957 | +type alias No = | |
| 1958 | + { | |
| 1959 | + } | |
| 1960 | + | |
| 1961 | +type UnionNoexcept | |
| 1962 | + = DoubleInUnionNoexcept Float | |
| 1963 | + | NoexceptInUnionNoexcept Noexcept | |
| 1964 | + | |
| 1965 | +type alias Noexcept = | |
| 1966 | + { | |
| 1967 | + } | |
| 1968 | + | |
| 1969 | +type UnionNonatomic | |
| 1970 | + = DoubleInUnionNonatomic Float | |
| 1971 | + | NonatomicInUnionNonatomic Nonatomic | |
| 1972 | + | |
| 1973 | +type alias Nonatomic = | |
| 1974 | + { | |
| 1975 | + } | |
| 1976 | + | |
| 1977 | +type UnionNone | |
| 1978 | + = DoubleInUnionNone Float | |
| 1979 | + | NoneInUnionNone None | |
| 1980 | + | |
| 1981 | +type alias None = | |
| 1982 | + { | |
| 1983 | + } | |
| 1984 | + | |
| 1985 | +type UnionNonlocal | |
| 1986 | + = DoubleInUnionNonlocal Float | |
| 1987 | + | NonlocalInUnionNonlocal Nonlocal | |
| 1988 | + | |
| 1989 | +type alias Nonlocal = | |
| 1990 | + { | |
| 1991 | + } | |
| 1992 | + | |
| 1993 | +type UnionNonmutating | |
| 1994 | + = DoubleInUnionNonmutating Float | |
| 1995 | + | NonmutatingInUnionNonmutating Nonmutating | |
| 1996 | + | |
| 1997 | +type alias Nonmutating = | |
| 1998 | + { | |
| 1999 | + } | |
| 2000 | + | |
| 2001 | +type UnionNot | |
| 2002 | + = DoubleInUnionNot Float | |
| 2003 | + | NotInUnionNot Not | |
| 2004 | + | |
| 2005 | +type alias Not = | |
| 2006 | + { | |
| 2007 | + } | |
| 2008 | + | |
| 2009 | +type UnionNotEq | |
| 2010 | + = DoubleInUnionNotEq Float | |
| 2011 | + | NotEqInUnionNotEq NotEq | |
| 2012 | + | |
| 2013 | +type alias NotEq = | |
| 2014 | + { | |
| 2015 | + } | |
| 2016 | + | |
| 2017 | +type UnionNSString | |
| 2018 | + = DoubleInUnionNSString Float | |
| 2019 | + | NSStringInUnionNSString NSString | |
| 2020 | + | |
| 2021 | +type alias NSString = | |
| 2022 | + { | |
| 2023 | + } | |
| 2024 | + | |
| 2025 | +type UnionNULL | |
| 2026 | + = DoubleInUnionNULL Float | |
| 2027 | + | NullInUnionNULL Null | |
| 2028 | + | |
| 2029 | +type alias Null = | |
| 2030 | + { | |
| 2031 | + } | |
| 2032 | + | |
| 2033 | +type UnionNullptr | |
| 2034 | + = DoubleInUnionNullptr Float | |
| 2035 | + | NullptrInUnionNullptr Nullptr | |
| 2036 | + | |
| 2037 | +type alias Nullptr = | |
| 2038 | + { | |
| 2039 | + } | |
| 2040 | + | |
| 2041 | +type UnionNumber | |
| 2042 | + = DoubleInUnionNumber Float | |
| 2043 | + | NumberInUnionNumber Number | |
| 2044 | + | |
| 2045 | +type alias Number = | |
| 2046 | + { | |
| 2047 | + } | |
| 2048 | + | |
| 2049 | +type UnionObject | |
| 2050 | + = DoubleInUnionObject Float | |
| 2051 | + | ObjectInUnionObject Object | |
| 2052 | + | |
| 2053 | +type alias Object = | |
| 2054 | + { | |
| 2055 | + } | |
| 2056 | + | |
| 2057 | +type UnionOneway | |
| 2058 | + = DoubleInUnionOneway Float | |
| 2059 | + | OnewayInUnionOneway Oneway | |
| 2060 | + | |
| 2061 | +type alias Oneway = | |
| 2062 | + { | |
| 2063 | + } | |
| 2064 | + | |
| 2065 | +type UnionOpen | |
| 2066 | + = DoubleInUnionOpen Float | |
| 2067 | + | OpenInUnionOpen Open | |
| 2068 | + | |
| 2069 | +type alias Open = | |
| 2070 | + { | |
| 2071 | + } | |
| 2072 | + | |
| 2073 | +type UnionOperator | |
| 2074 | + = DoubleInUnionOperator Float | |
| 2075 | + | OperatorInUnionOperator Operator | |
| 2076 | + | |
| 2077 | +type alias Operator = | |
| 2078 | + { | |
| 2079 | + } | |
| 2080 | + | |
| 2081 | +type UnionOptional | |
| 2082 | + = DoubleInUnionOptional Float | |
| 2083 | + | OptionalInUnionOptional Optional | |
| 2084 | + | |
| 2085 | +type alias Optional = | |
| 2086 | + { | |
| 2087 | + } | |
| 2088 | + | |
| 2089 | +type UnionOr | |
| 2090 | + = DoubleInUnionOr Float | |
| 2091 | + | OrInUnionOr Or | |
| 2092 | + | |
| 2093 | +type alias Or = | |
| 2094 | + { | |
| 2095 | + } | |
| 2096 | + | |
| 2097 | +type UnionOrEq | |
| 2098 | + = DoubleInUnionOrEq Float | |
| 2099 | + | OrEqInUnionOrEq OrEq | |
| 2100 | + | |
| 2101 | +type alias OrEq = | |
| 2102 | + { | |
| 2103 | + } | |
| 2104 | + | |
| 2105 | +type UnionOut | |
| 2106 | + = DoubleInUnionOut Float | |
| 2107 | + | OutInUnionOut Out | |
| 2108 | + | |
| 2109 | +type alias Out = | |
| 2110 | + { | |
| 2111 | + } | |
| 2112 | + | |
| 2113 | +type UnionOverride | |
| 2114 | + = DoubleInUnionOverride Float | |
| 2115 | + | OverrideInUnionOverride Override | |
| 2116 | + | |
| 2117 | +type alias Override = | |
| 2118 | + { | |
| 2119 | + } | |
| 2120 | + | |
| 2121 | +type UnionPackage | |
| 2122 | + = DoubleInUnionPackage Float | |
| 2123 | + | PackageInUnionPackage Package | |
| 2124 | + | |
| 2125 | +type alias Package = | |
| 2126 | + { | |
| 2127 | + } | |
| 2128 | + | |
| 2129 | +type UnionParams | |
| 2130 | + = DoubleInUnionParams Float | |
| 2131 | + | ParamsInUnionParams Params | |
| 2132 | + | |
| 2133 | +type alias Params = | |
| 2134 | + { | |
| 2135 | + } | |
| 2136 | + | |
| 2137 | +type UnionPass | |
| 2138 | + = DoubleInUnionPass Float | |
| 2139 | + | PassInUnionPass Pass | |
| 2140 | + | |
| 2141 | +type alias Pass = | |
| 2142 | + { | |
| 2143 | + } | |
| 2144 | + | |
| 2145 | +type UnionPostfix | |
| 2146 | + = DoubleInUnionPostfix Float | |
| 2147 | + | PostfixInUnionPostfix Postfix | |
| 2148 | + | |
| 2149 | +type alias Postfix = | |
| 2150 | + { | |
| 2151 | + } | |
| 2152 | + | |
| 2153 | +type UnionPrecedence | |
| 2154 | + = DoubleInUnionPrecedence Float | |
| 2155 | + | PrecedenceInUnionPrecedence Precedence | |
| 2156 | + | |
| 2157 | +type alias Precedence = | |
| 2158 | + { | |
| 2159 | + } | |
| 2160 | + | |
| 2161 | +type UnionPrefix | |
| 2162 | + = DoubleInUnionPrefix Float | |
| 2163 | + | PrefixInUnionPrefix Prefix | |
| 2164 | + | |
| 2165 | +type alias Prefix = | |
| 2166 | + { | |
| 2167 | + } | |
| 2168 | + | |
| 2169 | +type UnionPrint | |
| 2170 | + = DoubleInUnionPrint Float | |
| 2171 | + | PrintInUnionPrint Print | |
| 2172 | + | |
| 2173 | +type alias Print = | |
| 2174 | + { | |
| 2175 | + } | |
| 2176 | + | |
| 2177 | +type UnionPrintf | |
| 2178 | + = DoubleInUnionPrintf Float | |
| 2179 | + | PrintfInUnionPrintf Printf | |
| 2180 | + | |
| 2181 | +type alias Printf = | |
| 2182 | + { | |
| 2183 | + } | |
| 2184 | + | |
| 2185 | +type UnionPrivate | |
| 2186 | + = DoubleInUnionPrivate Float | |
| 2187 | + | PrivateInUnionPrivate Private | |
| 2188 | + | |
| 2189 | +type alias Private = | |
| 2190 | + { | |
| 2191 | + } | |
| 2192 | + | |
| 2193 | +type UnionProtected | |
| 2194 | + = DoubleInUnionProtected Float | |
| 2195 | + | ProtectedInUnionProtected Protected | |
| 2196 | + | |
| 2197 | +type alias Protected = | |
| 2198 | + { | |
| 2199 | + } | |
| 2200 | + | |
| 2201 | +type UnionProtocol | |
| 2202 | + = DoubleInUnionProtocol Float | |
| 2203 | + | ProtocolInUnionProtocol Protocol | |
| 2204 | + | |
| 2205 | +type alias Protocol = | |
| 2206 | + { | |
| 2207 | + } | |
| 2208 | + | |
| 2209 | +type UnionPublic | |
| 2210 | + = DoubleInUnionPublic Float | |
| 2211 | + | PublicInUnionPublic Public | |
| 2212 | + | |
| 2213 | +type alias Public = | |
| 2214 | + { | |
| 2215 | + } | |
| 2216 | + | |
| 2217 | +type UnionBoolUnion | |
| 2218 | + = DoubleInUnionBoolUnion Float | |
| 2219 | + | UnionBoolBoolInUnionBoolUnion UnionBoolBool | |
| 2220 | + | |
| 2221 | +type alias UnionBoolBool = | |
| 2222 | + { | |
| 2223 | + } | |
| 2224 | + | |
| 2225 | +type UnionTypeUnion | |
| 2226 | + = DoubleInUnionTypeUnion Float | |
| 2227 | + | TypeClassInUnionTypeUnion TypeClass | |
| 2228 | + | |
| 2229 | +type alias TypeClass = | |
| 2230 | + { | |
| 2231 | + } | |
| 2232 | + | |
| 2233 | +type UnionAnyUnion | |
| 2234 | + = AnyClassInUnionAnyUnion AnyClass | |
| 2235 | + | DoubleInUnionAnyUnion Float | |
| 2236 | + | |
| 2237 | +type alias AnyClass = | |
| 2238 | + { | |
| 2239 | + } | |
| 2240 | + | |
| 2241 | +type UnionAs | |
| 2242 | + = AsInUnionAs As | |
| 2243 | + | DoubleInUnionAs Float | |
| 2244 | + | |
| 2245 | +type alias As = | |
| 2246 | + { | |
| 2247 | + } | |
| 2248 | + | |
| 2249 | +type UnionBOOL | |
| 2250 | + = BoolInUnionBOOL Bool | |
| 2251 | + | DoubleInUnionBOOL Float | |
| 2252 | + | |
| 2253 | +type alias Bool = | |
| 2254 | + { | |
| 2255 | + } | |
| 2256 | + | |
| 2257 | +type UnionBool | |
| 2258 | + = BoolClassInUnionBool BoolClass | |
| 2259 | + | DoubleInUnionBool Float | |
| 2260 | + | |
| 2261 | +type alias BoolClass = | |
| 2262 | + { | |
| 2263 | + } | |
| 2264 | + | |
| 2265 | +type UnionCase | |
| 2266 | + = CaseInUnionCase Case | |
| 2267 | + | DoubleInUnionCase Float | |
| 2268 | + | |
| 2269 | +type alias Case = | |
| 2270 | + { | |
| 2271 | + } | |
| 2272 | + | |
| 2273 | +type UnionClassUnion | |
| 2274 | + = ClassClassInUnionClassUnion ClassClass | |
| 2275 | + | DoubleInUnionClassUnion Float | |
| 2276 | + | |
| 2277 | +type alias ClassClass = | |
| 2278 | + { | |
| 2279 | + } | |
| 2280 | + | |
| 2281 | +type UnionElse | |
| 2282 | + = DoubleInUnionElse Float | |
| 2283 | + | ElseInUnionElse Else | |
| 2284 | + | |
| 2285 | +type alias Else = | |
| 2286 | + { | |
| 2287 | + } | |
| 2288 | + | |
| 2289 | +type UnionExposing | |
| 2290 | + = DoubleInUnionExposing Float | |
| 2291 | + | ExposingInUnionExposing Exposing | |
| 2292 | + | |
| 2293 | +type alias Exposing = | |
| 2294 | + { | |
| 2295 | + } | |
| 2296 | + | |
| 2297 | +type UnionFalseUnion | |
| 2298 | + = DoubleInUnionFalseUnion Float | |
| 2299 | + | UnionFalseFalseInUnionFalseUnion UnionFalseFalse | |
| 2300 | + | |
| 2301 | +type alias UnionFalseFalse = | |
| 2302 | + { | |
| 2303 | + } | |
| 2304 | + | |
| 2305 | +type UnionFloat | |
| 2306 | + = DoubleInUnionFloat Float | |
| 2307 | + | FloatClassInUnionFloat FloatClass | |
| 2308 | + | |
| 2309 | +type alias FloatClass = | |
| 2310 | + { | |
| 2311 | + } | |
| 2312 | + | |
| 2313 | +type UnionIf | |
| 2314 | + = DoubleInUnionIf Float | |
| 2315 | + | IfInUnionIf If | |
| 2316 | + | |
| 2317 | +type alias If = | |
| 2318 | + { | |
| 2319 | + } | |
| 2320 | + | |
| 2321 | +type UnionImport | |
| 2322 | + = DoubleInUnionImport Float | |
| 2323 | + | ImportInUnionImport Import | |
| 2324 | + | |
| 2325 | +type alias Import = | |
| 2326 | + { | |
| 2327 | + } | |
| 2328 | + | |
| 2329 | +type UnionIn | |
| 2330 | + = DoubleInUnionIn Float | |
| 2331 | + | InInUnionIn In | |
| 2332 | + | |
| 2333 | +type alias In = | |
| 2334 | + { | |
| 2335 | + } | |
| 2336 | + | |
| 2337 | +type UnionInfix | |
| 2338 | + = DoubleInUnionInfix Float | |
| 2339 | + | InfixInUnionInfix Infix | |
| 2340 | + | |
| 2341 | +type alias Infix = | |
| 2342 | + { | |
| 2343 | + } | |
| 2344 | + | |
| 2345 | +type UnionInt | |
| 2346 | + = DoubleInUnionInt Float | |
| 2347 | + | IntClassInUnionInt IntClass | |
| 2348 | + | |
| 2349 | +type alias IntClass = | |
| 2350 | + { | |
| 2351 | + } | |
| 2352 | + | |
| 2353 | +type UnionLet | |
| 2354 | + = DoubleInUnionLet Float | |
| 2355 | + | LetInUnionLet Let | |
| 2356 | + | |
| 2357 | +type alias Let = | |
| 2358 | + { | |
| 2359 | + } | |
| 2360 | + | |
| 2361 | +type UnionModule | |
| 2362 | + = DoubleInUnionModule Float | |
| 2363 | + | ModuleInUnionModule Module | |
| 2364 | + | |
| 2365 | +type alias Module = | |
| 2366 | + { | |
| 2367 | + } | |
| 2368 | + | |
| 2369 | +type UnionNoneUnion | |
| 2370 | + = DoubleInUnionNoneUnion Float | |
| 2371 | + | NoneClassInUnionNoneUnion NoneClass | |
| 2372 | + | |
| 2373 | +type alias NoneClass = | |
| 2374 | + { | |
| 2375 | + } | |
| 2376 | + | |
| 2377 | +type UnionNull | |
| 2378 | + = DoubleInUnionNull Float | |
| 2379 | + | NullClassInUnionNull NullClass | |
| 2380 | + | |
| 2381 | +type alias NullClass = | |
| 2382 | + { | |
| 2383 | + } | |
| 2384 | + | |
| 2385 | +type UnionOf | |
| 2386 | + = DoubleInUnionOf Float | |
| 2387 | + | OfInUnionOf Of | |
| 2388 | + | |
| 2389 | +type alias Of = | |
| 2390 | + { | |
| 2391 | + } | |
| 2392 | + | |
| 2393 | +type UnionPort | |
| 2394 | + = DoubleInUnionPort Float | |
| 2395 | + | PortInUnionPort Port | |
| 2396 | + | |
| 2397 | +type alias Port = | |
| 2398 | + { | |
| 2399 | + } | |
| 2400 | + | |
| 2401 | +type UnionProtocolUnion | |
| 2402 | + = DoubleInUnionProtocolUnion Float | |
| 2403 | + | ProtocolClassInUnionProtocolUnion ProtocolClass | |
| 2404 | + | |
| 2405 | +type alias ProtocolClass = | |
| 2406 | + { | |
| 2407 | + } | |
| 2408 | + | |
| 2409 | +type UnionSelfUnion | |
| 2410 | + = DoubleInUnionSelfUnion Float | |
| 2411 | + | SelfClassInUnionSelfUnion SelfClass | |
| 2412 | + | |
| 2413 | +type alias SelfClass = | |
| 2414 | + { | |
| 2415 | + } | |
| 2416 | + | |
| 2417 | +type UnionString | |
| 2418 | + = DoubleInUnionString Float | |
| 2419 | + | StringClassInUnionString StringClass | |
| 2420 | + | |
| 2421 | +type alias StringClass = | |
| 2422 | + { | |
| 2423 | + } | |
| 2424 | + | |
| 2425 | +type UnionThen | |
| 2426 | + = DoubleInUnionThen Float | |
| 2427 | + | ThenInUnionThen Then | |
| 2428 | + | |
| 2429 | +type alias Then = | |
| 2430 | + { | |
| 2431 | + } | |
| 2432 | + | |
| 2433 | +type UnionTrueUnion | |
| 2434 | + = DoubleInUnionTrueUnion Float | |
| 2435 | + | UnionTrueTrueInUnionTrueUnion UnionTrueTrue | |
| 2436 | + | |
| 2437 | +type alias UnionTrueTrue = | |
| 2438 | + { | |
| 2439 | + } | |
| 2440 | + | |
| 2441 | +type UnionType | |
| 2442 | + = DoubleInUnionType Float | |
| 2443 | + | TypeInUnionType Type | |
| 2444 | + | |
| 2445 | +type alias Type = | |
| 2446 | + { | |
| 2447 | + } | |
| 2448 | + | |
| 2449 | +type UnionWhere | |
| 2450 | + = DoubleInUnionWhere Float | |
| 2451 | + | WhereInUnionWhere Where | |
| 2452 | + | |
| 2453 | +type alias Where = | |
| 2454 | + { | |
| 2455 | + } | |
| 2456 | + | |
| 2457 | +type UnionQuicktype | |
| 2458 | + = DoubleInUnionQuicktype Float | |
| 2459 | + | QuicktypeInUnionQuicktype Quicktype | |
| 2460 | + | |
| 2461 | +type alias Quicktype = | |
| 2462 | + { | |
| 2463 | + } | |
| 2464 | + | |
| 2465 | +type UnionRaise | |
| 2466 | + = DoubleInUnionRaise Float | |
| 2467 | + | RaiseInUnionRaise Raise | |
| 2468 | + | |
| 2469 | +type alias Raise = | |
| 2470 | + { | |
| 2471 | + } | |
| 2472 | + | |
| 2473 | +type UnionRange | |
| 2474 | + = DoubleInUnionRange Float | |
| 2475 | + | RangeInUnionRange Range | |
| 2476 | + | |
| 2477 | +type alias Range = | |
| 2478 | + { | |
| 2479 | + } | |
| 2480 | + | |
| 2481 | +type UnionReadonly | |
| 2482 | + = DoubleInUnionReadonly Float | |
| 2483 | + | ReadonlyInUnionReadonly Readonly | |
| 2484 | + | |
| 2485 | +type alias Readonly = | |
| 2486 | + { | |
| 2487 | + } | |
| 2488 | + | |
| 2489 | +type UnionRef | |
| 2490 | + = DoubleInUnionRef Float | |
| 2491 | + | RefInUnionRef Ref | |
| 2492 | + | |
| 2493 | +type alias Ref = | |
| 2494 | + { | |
| 2495 | + } | |
| 2496 | + | |
| 2497 | +type UnionRegister | |
| 2498 | + = DoubleInUnionRegister Float | |
| 2499 | + | RegisterInUnionRegister Register | |
| 2500 | + | |
| 2501 | +type alias Register = | |
| 2502 | + { | |
| 2503 | + } | |
| 2504 | + | |
| 2505 | +type UnionReinterpretCast | |
| 2506 | + = DoubleInUnionReinterpretCast Float | |
| 2507 | + | ReinterpretCastInUnionReinterpretCast ReinterpretCast | |
| 2508 | + | |
| 2509 | +type alias ReinterpretCast = | |
| 2510 | + { | |
| 2511 | + } | |
| 2512 | + | |
| 2513 | +type UnionRepeat | |
| 2514 | + = DoubleInUnionRepeat Float | |
| 2515 | + | RepeatInUnionRepeat Repeat | |
| 2516 | + | |
| 2517 | +type alias Repeat = | |
| 2518 | + { | |
| 2519 | + } | |
| 2520 | + | |
| 2521 | +type UnionRequire | |
| 2522 | + = DoubleInUnionRequire Float | |
| 2523 | + | RequireInUnionRequire Require | |
| 2524 | + | |
| 2525 | +type alias Require = | |
| 2526 | + { | |
| 2527 | + } | |
| 2528 | + | |
| 2529 | +type UnionRequired | |
| 2530 | + = DoubleInUnionRequired Float | |
| 2531 | + | RequiredInUnionRequired Required | |
| 2532 | + | |
| 2533 | +type alias Required = | |
| 2534 | + { | |
| 2535 | + } | |
| 2536 | + | |
| 2537 | +type UnionRequires | |
| 2538 | + = DoubleInUnionRequires Float | |
| 2539 | + | RequiresInUnionRequires Requires | |
| 2540 | + | |
| 2541 | +type alias Requires = | |
| 2542 | + { | |
| 2543 | + } | |
| 2544 | + | |
| 2545 | +type UnionRestrict | |
| 2546 | + = DoubleInUnionRestrict Float | |
| 2547 | + | RestrictInUnionRestrict Restrict | |
| 2548 | + | |
| 2549 | +type alias Restrict = | |
| 2550 | + { | |
| 2551 | + } | |
| 2552 | + | |
| 2553 | +type UnionRetain | |
| 2554 | + = DoubleInUnionRetain Float | |
| 2555 | + | RetainInUnionRetain Retain | |
| 2556 | + | |
| 2557 | +type alias Retain = | |
| 2558 | + { | |
| 2559 | + } | |
| 2560 | + | |
| 2561 | +type UnionRethrows | |
| 2562 | + = DoubleInUnionRethrows Float | |
| 2563 | + | RethrowsInUnionRethrows Rethrows | |
| 2564 | + | |
| 2565 | +type alias Rethrows = | |
| 2566 | + { | |
| 2567 | + } | |
| 2568 | + | |
| 2569 | +type UnionReturn | |
| 2570 | + = DoubleInUnionReturn Float | |
| 2571 | + | ReturnInUnionReturn Return | |
| 2572 | + | |
| 2573 | +type alias Return = | |
| 2574 | + { | |
| 2575 | + } | |
| 2576 | + | |
| 2577 | +type UnionRight | |
| 2578 | + = DoubleInUnionRight Float | |
| 2579 | + | RightInUnionRight Right | |
| 2580 | + | |
| 2581 | +type alias Right = | |
| 2582 | + { | |
| 2583 | + } | |
| 2584 | + | |
| 2585 | +type UnionSbyte | |
| 2586 | + = DoubleInUnionSbyte Float | |
| 2587 | + | SbyteInUnionSbyte Sbyte | |
| 2588 | + | |
| 2589 | +type alias Sbyte = | |
| 2590 | + { | |
| 2591 | + } | |
| 2592 | + | |
| 2593 | +type UnionSealed | |
| 2594 | + = DoubleInUnionSealed Float | |
| 2595 | + | SealedInUnionSealed Sealed | |
| 2596 | + | |
| 2597 | +type alias Sealed = | |
| 2598 | + { | |
| 2599 | + } | |
| 2600 | + | |
| 2601 | +type UnionSEL | |
| 2602 | + = DoubleInUnionSEL Float | |
| 2603 | + | SelInUnionSEL Sel | |
| 2604 | + | |
| 2605 | +type alias Sel = | |
| 2606 | + { | |
| 2607 | + } | |
| 2608 | + | |
| 2609 | +type UnionSelect | |
| 2610 | + = DoubleInUnionSelect Float | |
| 2611 | + | SelectInUnionSelect Select | |
| 2612 | + | |
| 2613 | +type alias Select = | |
| 2614 | + { | |
| 2615 | + } | |
| 2616 | + | |
| 2617 | +type UnionSelf | |
| 2618 | + = DoubleInUnionSelf Float | |
| 2619 | + | SelfInUnionSelf Self | |
| 2620 | + | |
| 2621 | +type alias Self = | |
| 2622 | + { | |
| 2623 | + } | |
| 2624 | + | |
| 2625 | +type UnionSerialize | |
| 2626 | + = DoubleInUnionSerialize Float | |
| 2627 | + | SerializeInUnionSerialize Serialize | |
| 2628 | + | |
| 2629 | +type alias Serialize = | |
| 2630 | + { | |
| 2631 | + } | |
| 2632 | + | |
| 2633 | +type UnionSet | |
| 2634 | + = DoubleInUnionSet Float | |
| 2635 | + | SetInUnionSet Set | |
| 2636 | + | |
| 2637 | +type alias Set = | |
| 2638 | + { | |
| 2639 | + } | |
| 2640 | + | |
| 2641 | +type UnionShort | |
| 2642 | + = DoubleInUnionShort Float | |
| 2643 | + | ShortInUnionShort Short | |
| 2644 | + | |
| 2645 | +type alias Short = | |
| 2646 | + { | |
| 2647 | + } | |
| 2648 | + | |
| 2649 | +type UnionSigned | |
| 2650 | + = DoubleInUnionSigned Float | |
| 2651 | + | SignedInUnionSigned Signed | |
| 2652 | + | |
| 2653 | +type alias Signed = | |
| 2654 | + { | |
| 2655 | + } | |
| 2656 | + | |
| 2657 | +type UnionSizeof | |
| 2658 | + = DoubleInUnionSizeof Float | |
| 2659 | + | SizeofInUnionSizeof Sizeof | |
| 2660 | + | |
| 2661 | +type alias Sizeof = | |
| 2662 | + { | |
| 2663 | + } | |
| 2664 | + | |
| 2665 | +type UnionStackalloc | |
| 2666 | + = DoubleInUnionStackalloc Float | |
| 2667 | + | StackallocInUnionStackalloc Stackalloc | |
| 2668 | + | |
| 2669 | +type alias Stackalloc = | |
| 2670 | + { | |
| 2671 | + } | |
| 2672 | + | |
| 2673 | +type UnionStatic | |
| 2674 | + = DoubleInUnionStatic Float | |
| 2675 | + | StaticInUnionStatic Static | |
| 2676 | + | |
| 2677 | +type alias Static = | |
| 2678 | + { | |
| 2679 | + } | |
| 2680 | + | |
| 2681 | +type UnionStaticAssert | |
| 2682 | + = DoubleInUnionStaticAssert Float | |
| 2683 | + | StaticAssertInUnionStaticAssert StaticAssert | |
| 2684 | + | |
| 2685 | +type alias StaticAssert = | |
| 2686 | + { | |
| 2687 | + } | |
| 2688 | + | |
| 2689 | +type UnionStaticCast | |
| 2690 | + = DoubleInUnionStaticCast Float | |
| 2691 | + | StaticCastInUnionStaticCast StaticCast | |
| 2692 | + | |
| 2693 | +type alias StaticCast = | |
| 2694 | + { | |
| 2695 | + } | |
| 2696 | + | |
| 2697 | +type UnionStrictfp | |
| 2698 | + = DoubleInUnionStrictfp Float | |
| 2699 | + | StrictfpInUnionStrictfp Strictfp | |
| 2700 | + | |
| 2701 | +type alias Strictfp = | |
| 2702 | + { | |
| 2703 | + } | |
| 2704 | + | |
| 2705 | +type UnionStruct | |
| 2706 | + = DoubleInUnionStruct Float | |
| 2707 | + | StructInUnionStruct Struct | |
| 2708 | + | |
| 2709 | +type alias Struct = | |
| 2710 | + { | |
| 2711 | + } | |
| 2712 | + | |
| 2713 | +type UnionSubscript | |
| 2714 | + = DoubleInUnionSubscript Float | |
| 2715 | + | SubscriptInUnionSubscript Subscript | |
| 2716 | + | |
| 2717 | +type alias Subscript = | |
| 2718 | + { | |
| 2719 | + } | |
| 2720 | + | |
| 2721 | +type UnionSuper | |
| 2722 | + = DoubleInUnionSuper Float | |
| 2723 | + | SuperInUnionSuper Super | |
| 2724 | + | |
| 2725 | +type alias Super = | |
| 2726 | + { | |
| 2727 | + } | |
| 2728 | + | |
| 2729 | +type UnionSwitch | |
| 2730 | + = DoubleInUnionSwitch Float | |
| 2731 | + | SwitchInUnionSwitch Switch | |
| 2732 | + | |
| 2733 | +type alias Switch = | |
| 2734 | + { | |
| 2735 | + } | |
| 2736 | + | |
| 2737 | +type UnionSymbol | |
| 2738 | + = DoubleInUnionSymbol Float | |
| 2739 | + | SymbolInUnionSymbol Symbol | |
| 2740 | + | |
| 2741 | +type alias Symbol = | |
| 2742 | + { | |
| 2743 | + } | |
| 2744 | + | |
| 2745 | +type UnionSynchronized | |
| 2746 | + = DoubleInUnionSynchronized Float | |
| 2747 | + | SynchronizedInUnionSynchronized Synchronized | |
| 2748 | + | |
| 2749 | +type alias Synchronized = | |
| 2750 | + { | |
| 2751 | + } | |
| 2752 | + | |
| 2753 | +type UnionSystem | |
| 2754 | + = DoubleInUnionSystem Float | |
| 2755 | + | SystemInUnionSystem System | |
| 2756 | + | |
| 2757 | +type alias System = | |
| 2758 | + { | |
| 2759 | + } | |
| 2760 | + | |
| 2761 | +type UnionTemplate | |
| 2762 | + = DoubleInUnionTemplate Float | |
| 2763 | + | TemplateInUnionTemplate Template | |
| 2764 | + | |
| 2765 | +type alias Template = | |
| 2766 | + { | |
| 2767 | + } | |
| 2768 | + | |
| 2769 | +type UnionThis | |
| 2770 | + = DoubleInUnionThis Float | |
| 2771 | + | ThisInUnionThis This | |
| 2772 | + | |
| 2773 | +type alias This = | |
| 2774 | + { | |
| 2775 | + } | |
| 2776 | + | |
| 2777 | +type UnionThreadLocal | |
| 2778 | + = DoubleInUnionThreadLocal Float | |
| 2779 | + | ThreadLocalInUnionThreadLocal ThreadLocal | |
| 2780 | + | |
| 2781 | +type alias ThreadLocal = | |
| 2782 | + { | |
| 2783 | + } | |
| 2784 | + | |
| 2785 | +type UnionThrow | |
| 2786 | + = DoubleInUnionThrow Float | |
| 2787 | + | ThrowInUnionThrow Throw | |
| 2788 | + | |
| 2789 | +type alias Throw = | |
| 2790 | + { | |
| 2791 | + } | |
| 2792 | + | |
| 2793 | +type UnionThrows | |
| 2794 | + = DoubleInUnionThrows Float | |
| 2795 | + | ThrowsInUnionThrows Throws | |
| 2796 | + | |
| 2797 | +type alias Throws = | |
| 2798 | + { | |
| 2799 | + } | |
| 2800 | + | |
| 2801 | +type UnionToJSON | |
| 2802 | + = DoubleInUnionToJSON Float | |
| 2803 | + | ToJSONInUnionToJSON ToJSON | |
| 2804 | + | |
| 2805 | +type alias ToJSON = | |
| 2806 | + { | |
| 2807 | + } | |
| 2808 | + | |
| 2809 | +type UnionTopLevel | |
| 2810 | + = DoubleInUnionTopLevel Float | |
| 2811 | + | TopLevelInUnionTopLevel TopLevel | |
| 2812 | + | |
| 2813 | +type alias TopLevel = | |
| 2814 | + { | |
| 2815 | + } | |
| 2816 | + | |
| 2817 | +type UnionTransient | |
| 2818 | + = DoubleInUnionTransient Float | |
| 2819 | + | TransientInUnionTransient Transient | |
| 2820 | + | |
| 2821 | +type alias Transient = | |
| 2822 | + { | |
| 2823 | + } | |
| 2824 | + | |
| 2825 | +type UnionTrue | |
| 2826 | + = DoubleInUnionTrue Float | |
| 2827 | + | TrueClassInUnionTrue TrueClass | |
| 2828 | + | |
| 2829 | +type alias TrueClass = | |
| 2830 | + { | |
| 2831 | + } | |
| 2832 | + | |
| 2833 | +type UnionTry | |
| 2834 | + = DoubleInUnionTry Float | |
| 2835 | + | TryInUnionTry Try | |
| 2836 | + | |
| 2837 | +type alias Try = | |
| 2838 | + { | |
| 2839 | + } | |
| 2840 | + | |
| 2841 | +type UnionTypealias | |
| 2842 | + = DoubleInUnionTypealias Float | |
| 2843 | + | TypealiasInUnionTypealias Typealias | |
| 2844 | + | |
| 2845 | +type alias Typealias = | |
| 2846 | + { | |
| 2847 | + } | |
| 2848 | + | |
| 2849 | +type UnionTypedef | |
| 2850 | + = DoubleInUnionTypedef Float | |
| 2851 | + | TypedefInUnionTypedef Typedef | |
| 2852 | + | |
| 2853 | +type alias Typedef = | |
| 2854 | + { | |
| 2855 | + } | |
| 2856 | + | |
| 2857 | +type UnionTypeid | |
| 2858 | + = DoubleInUnionTypeid Float | |
| 2859 | + | TypeidInUnionTypeid Typeid | |
| 2860 | + | |
| 2861 | +type alias Typeid = | |
| 2862 | + { | |
| 2863 | + } | |
| 2864 | + | |
| 2865 | +type UnionTypename | |
| 2866 | + = DoubleInUnionTypename Float | |
| 2867 | + | TypenameInUnionTypename Typename | |
| 2868 | + | |
| 2869 | +type alias Typename = | |
| 2870 | + { | |
| 2871 | + } | |
| 2872 | + | |
| 2873 | +type UnionTypeof | |
| 2874 | + = DoubleInUnionTypeof Float | |
| 2875 | + | TypeofInUnionTypeof Typeof | |
| 2876 | + | |
| 2877 | +type alias Typeof = | |
| 2878 | + { | |
| 2879 | + } | |
| 2880 | + | |
| 2881 | +type UnionUint | |
| 2882 | + = DoubleInUnionUint Float | |
| 2883 | + | UintInUnionUint Uint | |
| 2884 | + | |
| 2885 | +type alias Uint = | |
| 2886 | + { | |
| 2887 | + } | |
| 2888 | + | |
| 2889 | +type UnionUlong | |
| 2890 | + = DoubleInUnionUlong Float | |
| 2891 | + | UlongInUnionUlong Ulong | |
| 2892 | + | |
| 2893 | +type alias Ulong = | |
| 2894 | + { | |
| 2895 | + } | |
| 2896 | + | |
| 2897 | +type UnionUnchecked | |
| 2898 | + = DoubleInUnionUnchecked Float | |
| 2899 | + | UncheckedInUnionUnchecked Unchecked | |
| 2900 | + | |
| 2901 | +type alias Unchecked = | |
| 2902 | + { | |
| 2903 | + } | |
| 2904 | + | |
| 2905 | +type UnionUndefined | |
| 2906 | + = DoubleInUnionUndefined Float | |
| 2907 | + | UndefinedInUnionUndefined Undefined | |
| 2908 | + | |
| 2909 | +type alias Undefined = | |
| 2910 | + { | |
| 2911 | + } | |
| 2912 | + | |
| 2913 | +type UnionUnionUnion | |
| 2914 | + = DoubleInUnionUnionUnion Float | |
| 2915 | + | UnionInUnionUnionUnion Union | |
| 2916 | + | |
| 2917 | +type alias Union = | |
| 2918 | + { | |
| 2919 | + } | |
| 2920 | + | |
| 2921 | +type UnionUnowned | |
| 2922 | + = DoubleInUnionUnowned Float | |
| 2923 | + | UnownedInUnionUnowned Unowned | |
| 2924 | + | |
| 2925 | +type alias Unowned = | |
| 2926 | + { | |
| 2927 | + } | |
| 2928 | + | |
| 2929 | +type UnionUnsafe | |
| 2930 | + = DoubleInUnionUnsafe Float | |
| 2931 | + | UnsafeInUnionUnsafe Unsafe | |
| 2932 | + | |
| 2933 | +type alias Unsafe = | |
| 2934 | + { | |
| 2935 | + } | |
| 2936 | + | |
| 2937 | +type UnionUnsigned | |
| 2938 | + = DoubleInUnionUnsigned Float | |
| 2939 | + | UnsignedInUnionUnsigned Unsigned | |
| 2940 | + | |
| 2941 | +type alias Unsigned = | |
| 2942 | + { | |
| 2943 | + } | |
| 2944 | + | |
| 2945 | +type UnionUshort | |
| 2946 | + = DoubleInUnionUshort Float | |
| 2947 | + | UshortInUnionUshort Ushort | |
| 2948 | + | |
| 2949 | +type alias Ushort = | |
| 2950 | + { | |
| 2951 | + } | |
| 2952 | + | |
| 2953 | +type UnionUsing | |
| 2954 | + = DoubleInUnionUsing Float | |
| 2955 | + | UsingInUnionUsing Using | |
| 2956 | + | |
| 2957 | +type alias Using = | |
| 2958 | + { | |
| 2959 | + } | |
| 2960 | + | |
| 2961 | +type UnionVar | |
| 2962 | + = DoubleInUnionVar Float | |
| 2963 | + | VarInUnionVar Var | |
| 2964 | + | |
| 2965 | +type alias Var = | |
| 2966 | + { | |
| 2967 | + } | |
| 2968 | + | |
| 2969 | +type UnionVirtual | |
| 2970 | + = DoubleInUnionVirtual Float | |
| 2971 | + | VirtualInUnionVirtual Virtual | |
| 2972 | + | |
| 2973 | +type alias Virtual = | |
| 2974 | + { | |
| 2975 | + } | |
| 2976 | + | |
| 2977 | +type UnionVoid | |
| 2978 | + = DoubleInUnionVoid Float | |
| 2979 | + | VoidInUnionVoid Void | |
| 2980 | + | |
| 2981 | +type alias Void = | |
| 2982 | + { | |
| 2983 | + } | |
| 2984 | + | |
| 2985 | +type UnionVolatile | |
| 2986 | + = DoubleInUnionVolatile Float | |
| 2987 | + | VolatileInUnionVolatile Volatile | |
| 2988 | + | |
| 2989 | +type alias Volatile = | |
| 2990 | + { | |
| 2991 | + } | |
| 2992 | + | |
| 2993 | +type UnionWcharT | |
| 2994 | + = DoubleInUnionWcharT Float | |
| 2995 | + | WcharTInUnionWcharT WcharT | |
| 2996 | + | |
| 2997 | +type alias WcharT = | |
| 2998 | + { | |
| 2999 | + } | |
| 3000 | + | |
| 3001 | +type UnionWeak | |
| 3002 | + = DoubleInUnionWeak Float | |
| 3003 | + | WeakInUnionWeak Weak | |
| 3004 | + | |
| 3005 | +type alias Weak = | |
| 3006 | + { | |
| 3007 | + } | |
| 3008 | + | |
| 3009 | +type UnionWhile | |
| 3010 | + = DoubleInUnionWhile Float | |
| 3011 | + | WhileInUnionWhile While | |
| 3012 | + | |
| 3013 | +type alias While = | |
| 3014 | + { | |
| 3015 | + } | |
| 3016 | + | |
| 3017 | +type UnionWillSet | |
| 3018 | + = DoubleInUnionWillSet Float | |
| 3019 | + | WillSetInUnionWillSet WillSet | |
| 3020 | + | |
| 3021 | +type alias WillSet = | |
| 3022 | + { | |
| 3023 | + } | |
| 3024 | + | |
| 3025 | +type UnionWith | |
| 3026 | + = DoubleInUnionWith Float | |
| 3027 | + | WithInUnionWith With | |
| 3028 | + | |
| 3029 | +type alias With = | |
| 3030 | + { | |
| 3031 | + } | |
| 3032 | + | |
| 3033 | +type UnionXor | |
| 3034 | + = DoubleInUnionXor Float | |
| 3035 | + | XorInUnionXor Xor | |
| 3036 | + | |
| 3037 | +type alias Xor = | |
| 3038 | + { | |
| 3039 | + } | |
| 3040 | + | |
| 3041 | +type UnionXorEq | |
| 3042 | + = DoubleInUnionXorEq Float | |
| 3043 | + | XorEqInUnionXorEq XorEq | |
| 3044 | + | |
| 3045 | +type alias XorEq = | |
| 3046 | + { | |
| 3047 | + } | |
| 3048 | + | |
| 3049 | +type UnionYES | |
| 3050 | + = DoubleInUnionYES Float | |
| 3051 | + | YesInUnionYES Yes | |
| 3052 | + | |
| 3053 | +type alias Yes = | |
| 3054 | + { | |
| 3055 | + } | |
| 3056 | + | |
| 3057 | +type UnionYield | |
| 3058 | + = DoubleInUnionYield Float | |
| 3059 | + | YieldInUnionYield Yield | |
| 3060 | + | |
| 3061 | +type alias Yield = | |
| 3062 | + { | |
| 3063 | + } | |
| 3064 | + | |
| 3065 | +-- decoders and encoders | |
| 3066 | +optionalField key decoder fallback = | |
| 3067 | + Jdec.dict Jdec.value | |
| 3068 | + |> Jdec.andThen (\m -> | |
| 3069 | + case Dict.get key m of | |
| 3070 | + Nothing -> Jdec.succeed fallback | |
| 3071 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 3072 | + | |
| 3073 | +quickTypeToString : QuickType -> String | |
| 3074 | +quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | |
| 3075 | + | |
| 3076 | +quickType : Jdec.Decoder QuickType | |
| 3077 | +quickType = | |
| 3078 | + Jdec.succeed QuickType | |
| 3079 | + |> Jpipe.custom (optionalField "_" (Jdec.nullable unionUnion) Nothing) | |
| 3080 | + |> Jpipe.custom (optionalField "_Bool" (Jdec.nullable unionBool) Nothing) | |
| 3081 | + |> Jpipe.custom (optionalField "_Complex" (Jdec.nullable unionComplex) Nothing) | |
| 3082 | + |> Jpipe.custom (optionalField "_Imaginery" (Jdec.nullable unionImaginery) Nothing) | |
| 3083 | + |> Jpipe.custom (optionalField "abstract" (Jdec.nullable unionAbstract) Nothing) | |
| 3084 | + |> Jpipe.custom (optionalField "alignas" (Jdec.nullable unionAlignas) Nothing) | |
| 3085 | + |> Jpipe.custom (optionalField "alignof" (Jdec.nullable unionAlignof) Nothing) | |
| 3086 | + |> Jpipe.custom (optionalField "and" (Jdec.nullable unionAnd) Nothing) | |
| 3087 | + |> Jpipe.custom (optionalField "and_eq" (Jdec.nullable unionAndEq) Nothing) | |
| 3088 | + |> Jpipe.custom (optionalField "any" (Jdec.nullable unionAnyUnion) Nothing) | |
| 3089 | + |> Jpipe.custom (optionalField "Any" (Jdec.nullable unionAny) Nothing) | |
| 3090 | + |> Jpipe.custom (optionalField "array" (Jdec.nullable unionArray) Nothing) | |
| 3091 | + |> Jpipe.custom (optionalField "as" (Jdec.nullable unionAs) Nothing) | |
| 3092 | + |> Jpipe.custom (optionalField "asm" (Jdec.nullable unionASM) Nothing) | |
| 3093 | + |> Jpipe.custom (optionalField "assert" (Jdec.nullable unionAssert) Nothing) | |
| 3094 | + |> Jpipe.custom (optionalField "associatedtype" (Jdec.nullable unionAssociatedtype) Nothing) | |
| 3095 | + |> Jpipe.custom (optionalField "associativity" (Jdec.nullable unionAssociativity) Nothing) | |
| 3096 | + |> Jpipe.custom (optionalField "async" (Jdec.nullable unionAsync) Nothing) | |
| 3097 | + |> Jpipe.custom (optionalField "atomic" (Jdec.nullable unionAtomic) Nothing) | |
| 3098 | + |> Jpipe.custom (optionalField "atomic_cancel" (Jdec.nullable unionAtomicCancel) Nothing) | |
| 3099 | + |> Jpipe.custom (optionalField "atomic_commit" (Jdec.nullable unionAtomicCommit) Nothing) | |
| 3100 | + |> Jpipe.custom (optionalField "atomic_noexcept" (Jdec.nullable unionAtomicNoexcept) Nothing) | |
| 3101 | + |> Jpipe.custom (optionalField "auto" (Jdec.nullable unionAuto) Nothing) | |
| 3102 | + |> Jpipe.custom (optionalField "await" (Jdec.nullable unionAwait) Nothing) | |
| 3103 | + |> Jpipe.custom (optionalField "base" (Jdec.nullable unionBase) Nothing) | |
| 3104 | + |> Jpipe.custom (optionalField "bitand" (Jdec.nullable unionBitand) Nothing) | |
| 3105 | + |> Jpipe.custom (optionalField "bitor" (Jdec.nullable unionBitor) Nothing) | |
| 3106 | + |> Jpipe.custom (optionalField "BOOL" (Jdec.nullable unionBOOL) Nothing) | |
| 3107 | + |> Jpipe.custom (optionalField "bool" (Jdec.nullable unionBoolUnion) Nothing) | |
| 3108 | + |> Jpipe.custom (optionalField "boolean" (Jdec.nullable unionBoolean) Nothing) | |
| 3109 | + |> Jpipe.custom (optionalField "break" (Jdec.nullable unionBreak) Nothing) | |
| 3110 | + |> Jpipe.custom (optionalField "bycopy" (Jdec.nullable unionBycopy) Nothing) | |
| 3111 | + |> Jpipe.custom (optionalField "byref" (Jdec.nullable unionByref) Nothing) | |
| 3112 | + |> Jpipe.custom (optionalField "byte" (Jdec.nullable unionByte) Nothing) | |
| 3113 | + |> Jpipe.custom (optionalField "case" (Jdec.nullable unionCase) Nothing) | |
| 3114 | + |> Jpipe.custom (optionalField "catch" (Jdec.nullable unionCatch) Nothing) | |
| 3115 | + |> Jpipe.custom (optionalField "chan" (Jdec.nullable unionChan) Nothing) | |
| 3116 | + |> Jpipe.custom (optionalField "char" (Jdec.nullable unionChar) Nothing) | |
| 3117 | + |> Jpipe.custom (optionalField "char16_t" (Jdec.nullable unionChar16T) Nothing) | |
| 3118 | + |> Jpipe.custom (optionalField "char32_t" (Jdec.nullable unionChar32T) Nothing) | |
| 3119 | + |> Jpipe.custom (optionalField "checked" (Jdec.nullable unionChecked) Nothing) | |
| 3120 | + |> Jpipe.custom (optionalField "class" (Jdec.nullable unionClassUnion) Nothing) | |
| 3121 | + |> Jpipe.custom (optionalField "Class" (Jdec.nullable unionClass) Nothing) | |
| 3122 | + |> Jpipe.custom (optionalField "co_await" (Jdec.nullable unionCoAwait) Nothing) | |
| 3123 | + |> Jpipe.custom (optionalField "co_return" (Jdec.nullable unionCoReturn) Nothing) | |
| 3124 | + |> Jpipe.custom (optionalField "co_yield" (Jdec.nullable unionCoYield) Nothing) | |
| 3125 | + |> Jpipe.custom (optionalField "compl" (Jdec.nullable unionCompl) Nothing) | |
| 3126 | + |> Jpipe.custom (optionalField "concept" (Jdec.nullable unionConcept) Nothing) | |
| 3127 | + |> Jpipe.custom (optionalField "console" (Jdec.nullable unionConsole) Nothing) | |
| 3128 | + |> Jpipe.custom (optionalField "const" (Jdec.nullable unionConst) Nothing) | |
| 3129 | + |> Jpipe.custom (optionalField "const_cast" (Jdec.nullable unionConstCast) Nothing) | |
| 3130 | + |> Jpipe.custom (optionalField "constexpr" (Jdec.nullable unionConstexpr) Nothing) | |
| 3131 | + |> Jpipe.custom (optionalField "constructor" (Jdec.nullable unionConstructor) Nothing) | |
| 3132 | + |> Jpipe.custom (optionalField "continue" (Jdec.nullable unionContinue) Nothing) | |
| 3133 | + |> Jpipe.custom (optionalField "convenience" (Jdec.nullable unionConvenience) Nothing) | |
| 3134 | + |> Jpipe.custom (optionalField "convert" (Jdec.nullable unionConvert) Nothing) | |
| 3135 | + |> Jpipe.custom (optionalField "converter" (Jdec.nullable unionConverter) Nothing) | |
| 3136 | + |> Jpipe.custom (optionalField "date" (Jdec.nullable unionDate) Nothing) | |
| 3137 | + |> Jpipe.custom (optionalField "date_parse_handling" (Jdec.nullable unionDateParseHandling) Nothing) | |
| 3138 | + |> Jpipe.custom (optionalField "debugger" (Jdec.nullable unionDebugger) Nothing) | |
| 3139 | + |> Jpipe.custom (optionalField "decimal" (Jdec.nullable unionDecimal) Nothing) | |
| 3140 | + |> Jpipe.custom (optionalField "declare" (Jdec.nullable unionDeclare) Nothing) | |
| 3141 | + |> Jpipe.custom (optionalField "decltype" (Jdec.nullable unionDecltype) Nothing) | |
| 3142 | + |> Jpipe.custom (optionalField "decode_string" (Jdec.nullable unionDecodeString) Nothing) | |
| 3143 | + |> Jpipe.custom (optionalField "def" (Jdec.nullable unionDef) Nothing) | |
| 3144 | + |> Jpipe.custom (optionalField "default" (Jdec.nullable unionDefault) Nothing) | |
| 3145 | + |> Jpipe.custom (optionalField "defer" (Jdec.nullable unionDefer) Nothing) | |
| 3146 | + |> Jpipe.custom (optionalField "deinit" (Jdec.nullable unionDeinit) Nothing) | |
| 3147 | + |> Jpipe.custom (optionalField "del" (Jdec.nullable unionDel) Nothing) | |
| 3148 | + |> Jpipe.custom (optionalField "delegate" (Jdec.nullable unionDelegate) Nothing) | |
| 3149 | + |> Jpipe.custom (optionalField "delete" (Jdec.nullable unionDelete) Nothing) | |
| 3150 | + |> Jpipe.custom (optionalField "dict" (Jdec.nullable unionDict) Nothing) | |
| 3151 | + |> Jpipe.custom (optionalField "dictionary" (Jdec.nullable unionDictionary) Nothing) | |
| 3152 | + |> Jpipe.custom (optionalField "didSet" (Jdec.nullable unionDidSet) Nothing) | |
| 3153 | + |> Jpipe.custom (optionalField "do" (Jdec.nullable unionDo) Nothing) | |
| 3154 | + |> Jpipe.custom (optionalField "double" (Jdec.nullable unionDouble) Nothing) | |
| 3155 | + |> Jpipe.custom (optionalField "dummy" (Jdec.nullable Jdec.float) Nothing) | |
| 3156 | + |> Jpipe.custom (optionalField "dynamic" (Jdec.nullable unionDynamic) Nothing) | |
| 3157 | + |> Jpipe.custom (optionalField "dynamic_cast" (Jdec.nullable unionDynamicCast) Nothing) | |
| 3158 | + |> Jpipe.custom (optionalField "elif" (Jdec.nullable unionElif) Nothing) | |
| 3159 | + |> Jpipe.custom (optionalField "else" (Jdec.nullable unionElse) Nothing) | |
| 3160 | + |> Jpipe.custom (optionalField "encode_quick_type" (Jdec.nullable unionEncodeQuickType) Nothing) | |
| 3161 | + |> Jpipe.custom (optionalField "enum" (Jdec.nullable unionEnum) Nothing) | |
| 3162 | + |> Jpipe.custom (optionalField "event" (Jdec.nullable unionEvent) Nothing) | |
| 3163 | + |> Jpipe.custom (optionalField "except" (Jdec.nullable unionExcept) Nothing) | |
| 3164 | + |> Jpipe.custom (optionalField "exception" (Jdec.nullable unionException) Nothing) | |
| 3165 | + |> Jpipe.custom (optionalField "explicit" (Jdec.nullable unionExplicit) Nothing) | |
| 3166 | + |> Jpipe.custom (optionalField "export" (Jdec.nullable unionExport) Nothing) | |
| 3167 | + |> Jpipe.custom (optionalField "exposing" (Jdec.nullable unionExposing) Nothing) | |
| 3168 | + |> Jpipe.custom (optionalField "extends" (Jdec.nullable unionExtends) Nothing) | |
| 3169 | + |> Jpipe.custom (optionalField "extension" (Jdec.nullable unionExtension) Nothing) | |
| 3170 | + |> Jpipe.custom (optionalField "extern" (Jdec.nullable unionExtern) Nothing) | |
| 3171 | + |> Jpipe.custom (optionalField "fallthrough" (Jdec.nullable unionFallthrough) Nothing) | |
| 3172 | + |> Jpipe.custom (optionalField "false" (Jdec.nullable unionFalseUnion) Nothing) | |
| 3173 | + |> Jpipe.custom (optionalField "False" (Jdec.nullable unionFalse) Nothing) | |
| 3174 | + |> Jpipe.custom (optionalField "fileprivate" (Jdec.nullable unionFileprivate) Nothing) | |
| 3175 | + |> Jpipe.custom (optionalField "final" (Jdec.nullable unionFinal) Nothing) | |
| 3176 | + |> Jpipe.custom (optionalField "finally" (Jdec.nullable unionFinally) Nothing) | |
| 3177 | + |> Jpipe.custom (optionalField "fixed" (Jdec.nullable unionFixed) Nothing) | |
| 3178 | + |> Jpipe.custom (optionalField "float" (Jdec.nullable unionFloat) Nothing) | |
| 3179 | + |> Jpipe.custom (optionalField "for" (Jdec.nullable unionFor) Nothing) | |
| 3180 | + |> Jpipe.custom (optionalField "foreach" (Jdec.nullable unionForeach) Nothing) | |
| 3181 | + |> Jpipe.custom (optionalField "friend" (Jdec.nullable unionFriend) Nothing) | |
| 3182 | + |> Jpipe.custom (optionalField "from" (Jdec.nullable unionFrom) Nothing) | |
| 3183 | + |> Jpipe.custom (optionalField "from_json" (Jdec.nullable unionFromJSON) Nothing) | |
| 3184 | + |> Jpipe.custom (optionalField "func" (Jdec.nullable unionFunc) Nothing) | |
| 3185 | + |> Jpipe.custom (optionalField "function" (Jdec.nullable unionFunction) Nothing) | |
| 3186 | + |> Jpipe.custom (optionalField "get" (Jdec.nullable unionGet) Nothing) | |
| 3187 | + |> Jpipe.custom (optionalField "global" (Jdec.nullable unionGlobal) Nothing) | |
| 3188 | + |> Jpipe.custom (optionalField "go" (Jdec.nullable unionGo) Nothing) | |
| 3189 | + |> Jpipe.custom (optionalField "goto" (Jdec.nullable unionGoto) Nothing) | |
| 3190 | + |> Jpipe.custom (optionalField "guard" (Jdec.nullable unionGuard) Nothing) | |
| 3191 | + |> Jpipe.custom (optionalField "hasOwnProperty" (Jdec.nullable unionHasOwnProperty) Nothing) | |
| 3192 | + |> Jpipe.custom (optionalField "id" (Jdec.nullable unionID) Nothing) | |
| 3193 | + |> Jpipe.custom (optionalField "if" (Jdec.nullable unionIf) Nothing) | |
| 3194 | + |> Jpipe.custom (optionalField "IMP" (Jdec.nullable unionIMP) Nothing) | |
| 3195 | + |> Jpipe.custom (optionalField "implements" (Jdec.nullable unionImplements) Nothing) | |
| 3196 | + |> Jpipe.custom (optionalField "implicit" (Jdec.nullable unionImplicit) Nothing) | |
| 3197 | + |> Jpipe.custom (optionalField "import" (Jdec.nullable unionImport) Nothing) | |
| 3198 | + |> Jpipe.custom (optionalField "in" (Jdec.nullable unionIn) Nothing) | |
| 3199 | + |> Jpipe.custom (optionalField "indirect" (Jdec.nullable unionIndirect) Nothing) | |
| 3200 | + |> Jpipe.custom (optionalField "infix" (Jdec.nullable unionInfix) Nothing) | |
| 3201 | + |> Jpipe.custom (optionalField "init" (Jdec.nullable unionInit) Nothing) | |
| 3202 | + |> Jpipe.custom (optionalField "inline" (Jdec.nullable unionInline) Nothing) | |
| 3203 | + |> Jpipe.custom (optionalField "inout" (Jdec.nullable unionInout) Nothing) | |
| 3204 | + |> Jpipe.custom (optionalField "instanceof" (Jdec.nullable unionInstanceof) Nothing) | |
| 3205 | + |> Jpipe.custom (optionalField "int" (Jdec.nullable unionInt) Nothing) | |
| 3206 | + |> Jpipe.custom (optionalField "interface" (Jdec.nullable unionInterface) Nothing) | |
| 3207 | + |> Jpipe.custom (optionalField "internal" (Jdec.nullable unionInternal) Nothing) | |
| 3208 | + |> Jpipe.custom (optionalField "is" (Jdec.nullable unionIs) Nothing) | |
| 3209 | + |> Jpipe.custom (optionalField "iterable" (Jdec.nullable unionIterable) Nothing) | |
| 3210 | + |> Jpipe.custom (optionalField "jdec" (Jdec.nullable unionJdec) Nothing) | |
| 3211 | + |> Jpipe.custom (optionalField "jenc" (Jdec.nullable unionJenc) Nothing) | |
| 3212 | + |> Jpipe.custom (optionalField "jpipe" (Jdec.nullable unionJpipe) Nothing) | |
| 3213 | + |> Jpipe.custom (optionalField "json" (Jdec.nullable unionJSON) Nothing) | |
| 3214 | + |> Jpipe.custom (optionalField "json_converter" (Jdec.nullable unionJSONConverter) Nothing) | |
| 3215 | + |> Jpipe.custom (optionalField "json_serializer" (Jdec.nullable unionJSONSerializer) Nothing) | |
| 3216 | + |> Jpipe.custom (optionalField "json_token" (Jdec.nullable unionJSONToken) Nothing) | |
| 3217 | + |> Jpipe.custom (optionalField "json_writer" (Jdec.nullable unionJSONWriter) Nothing) | |
| 3218 | + |> Jpipe.custom (optionalField "lambda" (Jdec.nullable unionLambda) Nothing) | |
| 3219 | + |> Jpipe.custom (optionalField "lazy" (Jdec.nullable unionLazy) Nothing) | |
| 3220 | + |> Jpipe.custom (optionalField "left" (Jdec.nullable unionLeft) Nothing) | |
| 3221 | + |> Jpipe.custom (optionalField "let" (Jdec.nullable unionLet) Nothing) | |
| 3222 | + |> Jpipe.custom (optionalField "list" (Jdec.nullable unionList) Nothing) | |
| 3223 | + |> Jpipe.custom (optionalField "lock" (Jdec.nullable unionLock) Nothing) | |
| 3224 | + |> Jpipe.custom (optionalField "long" (Jdec.nullable unionLong) Nothing) | |
| 3225 | + |> Jpipe.custom (optionalField "map" (Jdec.nullable unionMap) Nothing) | |
| 3226 | + |> Jpipe.custom (optionalField "metadata_property_handling" (Jdec.nullable unionMetadataPropertyHandling) Nothing) | |
| 3227 | + |> Jpipe.custom (optionalField "module" (Jdec.nullable unionModule) Nothing) | |
| 3228 | + |> Jpipe.custom (optionalField "mutable" (Jdec.nullable unionMutable) Nothing) | |
| 3229 | + |> Jpipe.custom (optionalField "mutating" (Jdec.nullable unionMutating) Nothing) | |
| 3230 | + |> Jpipe.custom (optionalField "namespace" (Jdec.nullable unionNamespace) Nothing) | |
| 3231 | + |> Jpipe.custom (optionalField "native" (Jdec.nullable unionNative) Nothing) | |
| 3232 | + |> Jpipe.custom (optionalField "new" (Jdec.nullable unionNew) Nothing) | |
| 3233 | + |> Jpipe.custom (optionalField "newtonsoft" (Jdec.nullable unionNewtonsoft) Nothing) | |
| 3234 | + |> Jpipe.custom (optionalField "nil" (Jdec.nullable unionNil) Nothing) | |
| 3235 | + |> Jpipe.custom (optionalField "NO" (Jdec.nullable unionNO) Nothing) | |
| 3236 | + |> Jpipe.custom (optionalField "noexcept" (Jdec.nullable unionNoexcept) Nothing) | |
| 3237 | + |> Jpipe.custom (optionalField "nonatomic" (Jdec.nullable unionNonatomic) Nothing) | |
| 3238 | + |> Jpipe.custom (optionalField "none" (Jdec.nullable unionNoneUnion) Nothing) | |
| 3239 | + |> Jpipe.custom (optionalField "None" (Jdec.nullable unionNone) Nothing) | |
| 3240 | + |> Jpipe.custom (optionalField "nonlocal" (Jdec.nullable unionNonlocal) Nothing) | |
| 3241 | + |> Jpipe.custom (optionalField "nonmutating" (Jdec.nullable unionNonmutating) Nothing) | |
| 3242 | + |> Jpipe.custom (optionalField "not" (Jdec.nullable unionNot) Nothing) | |
| 3243 | + |> Jpipe.custom (optionalField "not_eq" (Jdec.nullable unionNotEq) Nothing) | |
| 3244 | + |> Jpipe.custom (optionalField "NSString" (Jdec.nullable unionNSString) Nothing) | |
| 3245 | + |> Jpipe.custom (optionalField "NULL" (Jdec.nullable unionNULL) Nothing) | |
| 3246 | + |> Jpipe.custom (optionalField "null" (Jdec.nullable unionNull) Nothing) | |
| 3247 | + |> Jpipe.custom (optionalField "nullptr" (Jdec.nullable unionNullptr) Nothing) | |
| 3248 | + |> Jpipe.custom (optionalField "number" (Jdec.nullable unionNumber) Nothing) | |
| 3249 | + |> Jpipe.custom (optionalField "object" (Jdec.nullable unionObject) Nothing) | |
| 3250 | + |> Jpipe.custom (optionalField "of" (Jdec.nullable unionOf) Nothing) | |
| 3251 | + |> Jpipe.custom (optionalField "oneway" (Jdec.nullable unionOneway) Nothing) | |
| 3252 | + |> Jpipe.custom (optionalField "open" (Jdec.nullable unionOpen) Nothing) | |
| 3253 | + |> Jpipe.custom (optionalField "operator" (Jdec.nullable unionOperator) Nothing) | |
| 3254 | + |> Jpipe.custom (optionalField "optional" (Jdec.nullable unionOptional) Nothing) | |
| 3255 | + |> Jpipe.custom (optionalField "or" (Jdec.nullable unionOr) Nothing) | |
| 3256 | + |> Jpipe.custom (optionalField "or_eq" (Jdec.nullable unionOrEq) Nothing) | |
| 3257 | + |> Jpipe.custom (optionalField "out" (Jdec.nullable unionOut) Nothing) | |
| 3258 | + |> Jpipe.custom (optionalField "override" (Jdec.nullable unionOverride) Nothing) | |
| 3259 | + |> Jpipe.custom (optionalField "package" (Jdec.nullable unionPackage) Nothing) | |
| 3260 | + |> Jpipe.custom (optionalField "params" (Jdec.nullable unionParams) Nothing) | |
| 3261 | + |> Jpipe.custom (optionalField "pass" (Jdec.nullable unionPass) Nothing) | |
| 3262 | + |> Jpipe.custom (optionalField "port" (Jdec.nullable unionPort) Nothing) | |
| 3263 | + |> Jpipe.custom (optionalField "postfix" (Jdec.nullable unionPostfix) Nothing) | |
| 3264 | + |> Jpipe.custom (optionalField "precedence" (Jdec.nullable unionPrecedence) Nothing) | |
| 3265 | + |> Jpipe.custom (optionalField "prefix" (Jdec.nullable unionPrefix) Nothing) | |
| 3266 | + |> Jpipe.custom (optionalField "print" (Jdec.nullable unionPrint) Nothing) | |
| 3267 | + |> Jpipe.custom (optionalField "printf" (Jdec.nullable unionPrintf) Nothing) | |
| 3268 | + |> Jpipe.custom (optionalField "private" (Jdec.nullable unionPrivate) Nothing) | |
| 3269 | + |> Jpipe.custom (optionalField "protected" (Jdec.nullable unionProtected) Nothing) | |
| 3270 | + |> Jpipe.custom (optionalField "Protocol" (Jdec.nullable unionProtocol) Nothing) | |
| 3271 | + |> Jpipe.custom (optionalField "protocol" (Jdec.nullable unionProtocolUnion) Nothing) | |
| 3272 | + |> Jpipe.custom (optionalField "public" (Jdec.nullable unionPublic) Nothing) | |
| 3273 | + |> Jpipe.custom (optionalField "quicktype" (Jdec.nullable unionQuicktype) Nothing) | |
| 3274 | + |> Jpipe.custom (optionalField "raise" (Jdec.nullable unionRaise) Nothing) | |
| 3275 | + |> Jpipe.custom (optionalField "range" (Jdec.nullable unionRange) Nothing) | |
| 3276 | + |> Jpipe.custom (optionalField "readonly" (Jdec.nullable unionReadonly) Nothing) | |
| 3277 | + |> Jpipe.custom (optionalField "ref" (Jdec.nullable unionRef) Nothing) | |
| 3278 | + |> Jpipe.custom (optionalField "register" (Jdec.nullable unionRegister) Nothing) | |
| 3279 | + |> Jpipe.custom (optionalField "reinterpret_cast" (Jdec.nullable unionReinterpretCast) Nothing) | |
| 3280 | + |> Jpipe.custom (optionalField "repeat" (Jdec.nullable unionRepeat) Nothing) | |
| 3281 | + |> Jpipe.custom (optionalField "require" (Jdec.nullable unionRequire) Nothing) | |
| 3282 | + |> Jpipe.custom (optionalField "required" (Jdec.nullable unionRequired) Nothing) | |
| 3283 | + |> Jpipe.custom (optionalField "requires" (Jdec.nullable unionRequires) Nothing) | |
| 3284 | + |> Jpipe.custom (optionalField "restrict" (Jdec.nullable unionRestrict) Nothing) | |
| 3285 | + |> Jpipe.custom (optionalField "retain" (Jdec.nullable unionRetain) Nothing) | |
| 3286 | + |> Jpipe.custom (optionalField "rethrows" (Jdec.nullable unionRethrows) Nothing) | |
| 3287 | + |> Jpipe.custom (optionalField "return" (Jdec.nullable unionReturn) Nothing) | |
| 3288 | + |> Jpipe.custom (optionalField "right" (Jdec.nullable unionRight) Nothing) | |
| 3289 | + |> Jpipe.custom (optionalField "sbyte" (Jdec.nullable unionSbyte) Nothing) | |
| 3290 | + |> Jpipe.custom (optionalField "sealed" (Jdec.nullable unionSealed) Nothing) | |
| 3291 | + |> Jpipe.custom (optionalField "SEL" (Jdec.nullable unionSEL) Nothing) | |
| 3292 | + |> Jpipe.custom (optionalField "select" (Jdec.nullable unionSelect) Nothing) | |
| 3293 | + |> Jpipe.custom (optionalField "Self" (Jdec.nullable unionSelf) Nothing) | |
| 3294 | + |> Jpipe.custom (optionalField "self" (Jdec.nullable unionSelfUnion) Nothing) | |
| 3295 | + |> Jpipe.custom (optionalField "serialize" (Jdec.nullable unionSerialize) Nothing) | |
| 3296 | + |> Jpipe.custom (optionalField "set" (Jdec.nullable unionSet) Nothing) | |
| 3297 | + |> Jpipe.custom (optionalField "short" (Jdec.nullable unionShort) Nothing) | |
| 3298 | + |> Jpipe.custom (optionalField "signed" (Jdec.nullable unionSigned) Nothing) | |
| 3299 | + |> Jpipe.custom (optionalField "sizeof" (Jdec.nullable unionSizeof) Nothing) | |
| 3300 | + |> Jpipe.custom (optionalField "stackalloc" (Jdec.nullable unionStackalloc) Nothing) | |
| 3301 | + |> Jpipe.custom (optionalField "static" (Jdec.nullable unionStatic) Nothing) | |
| 3302 | + |> Jpipe.custom (optionalField "static_assert" (Jdec.nullable unionStaticAssert) Nothing) | |
| 3303 | + |> Jpipe.custom (optionalField "static_cast" (Jdec.nullable unionStaticCast) Nothing) | |
| 3304 | + |> Jpipe.custom (optionalField "strictfp" (Jdec.nullable unionStrictfp) Nothing) | |
| 3305 | + |> Jpipe.custom (optionalField "string" (Jdec.nullable unionString) Nothing) | |
| 3306 | + |> Jpipe.custom (optionalField "struct" (Jdec.nullable unionStruct) Nothing) | |
| 3307 | + |> Jpipe.custom (optionalField "subscript" (Jdec.nullable unionSubscript) Nothing) | |
| 3308 | + |> Jpipe.custom (optionalField "super" (Jdec.nullable unionSuper) Nothing) | |
| 3309 | + |> Jpipe.custom (optionalField "switch" (Jdec.nullable unionSwitch) Nothing) | |
| 3310 | + |> Jpipe.custom (optionalField "symbol" (Jdec.nullable unionSymbol) Nothing) | |
| 3311 | + |> Jpipe.custom (optionalField "synchronized" (Jdec.nullable unionSynchronized) Nothing) | |
| 3312 | + |> Jpipe.custom (optionalField "system" (Jdec.nullable unionSystem) Nothing) | |
| 3313 | + |> Jpipe.custom (optionalField "template" (Jdec.nullable unionTemplate) Nothing) | |
| 3314 | + |> Jpipe.custom (optionalField "then" (Jdec.nullable unionThen) Nothing) | |
| 3315 | + |> Jpipe.custom (optionalField "this" (Jdec.nullable unionThis) Nothing) | |
| 3316 | + |> Jpipe.custom (optionalField "thread_local" (Jdec.nullable unionThreadLocal) Nothing) | |
| 3317 | + |> Jpipe.custom (optionalField "throw" (Jdec.nullable unionThrow) Nothing) | |
| 3318 | + |> Jpipe.custom (optionalField "throws" (Jdec.nullable unionThrows) Nothing) | |
| 3319 | + |> Jpipe.custom (optionalField "to_json" (Jdec.nullable unionToJSON) Nothing) | |
| 3320 | + |> Jpipe.custom (optionalField "top_level" (Jdec.nullable unionTopLevel) Nothing) | |
| 3321 | + |> Jpipe.custom (optionalField "transient" (Jdec.nullable unionTransient) Nothing) | |
| 3322 | + |> Jpipe.custom (optionalField "True" (Jdec.nullable unionTrue) Nothing) | |
| 3323 | + |> Jpipe.custom (optionalField "true" (Jdec.nullable unionTrueUnion) Nothing) | |
| 3324 | + |> Jpipe.custom (optionalField "try" (Jdec.nullable unionTry) Nothing) | |
| 3325 | + |> Jpipe.custom (optionalField "Type" (Jdec.nullable unionType) Nothing) | |
| 3326 | + |> Jpipe.custom (optionalField "type" (Jdec.nullable unionTypeUnion) Nothing) | |
| 3327 | + |> Jpipe.custom (optionalField "typealias" (Jdec.nullable unionTypealias) Nothing) | |
| 3328 | + |> Jpipe.custom (optionalField "typedef" (Jdec.nullable unionTypedef) Nothing) | |
| 3329 | + |> Jpipe.custom (optionalField "typeid" (Jdec.nullable unionTypeid) Nothing) | |
| 3330 | + |> Jpipe.custom (optionalField "typename" (Jdec.nullable unionTypename) Nothing) | |
| 3331 | + |> Jpipe.custom (optionalField "typeof" (Jdec.nullable unionTypeof) Nothing) | |
| 3332 | + |> Jpipe.custom (optionalField "uint" (Jdec.nullable unionUint) Nothing) | |
| 3333 | + |> Jpipe.custom (optionalField "ulong" (Jdec.nullable unionUlong) Nothing) | |
| 3334 | + |> Jpipe.custom (optionalField "unchecked" (Jdec.nullable unionUnchecked) Nothing) | |
| 3335 | + |> Jpipe.custom (optionalField "undefined" (Jdec.nullable unionUndefined) Nothing) | |
| 3336 | + |> Jpipe.custom (optionalField "union" (Jdec.nullable unionUnionUnion) Nothing) | |
| 3337 | + |> Jpipe.custom (optionalField "unowned" (Jdec.nullable unionUnowned) Nothing) | |
| 3338 | + |> Jpipe.custom (optionalField "unsafe" (Jdec.nullable unionUnsafe) Nothing) | |
| 3339 | + |> Jpipe.custom (optionalField "unsigned" (Jdec.nullable unionUnsigned) Nothing) | |
| 3340 | + |> Jpipe.custom (optionalField "ushort" (Jdec.nullable unionUshort) Nothing) | |
| 3341 | + |> Jpipe.custom (optionalField "using" (Jdec.nullable unionUsing) Nothing) | |
| 3342 | + |> Jpipe.custom (optionalField "var" (Jdec.nullable unionVar) Nothing) | |
| 3343 | + |> Jpipe.custom (optionalField "virtual" (Jdec.nullable unionVirtual) Nothing) | |
| 3344 | + |> Jpipe.custom (optionalField "void" (Jdec.nullable unionVoid) Nothing) | |
| 3345 | + |> Jpipe.custom (optionalField "volatile" (Jdec.nullable unionVolatile) Nothing) | |
| 3346 | + |> Jpipe.custom (optionalField "wchar_t" (Jdec.nullable unionWcharT) Nothing) | |
| 3347 | + |> Jpipe.custom (optionalField "weak" (Jdec.nullable unionWeak) Nothing) | |
| 3348 | + |> Jpipe.custom (optionalField "where" (Jdec.nullable unionWhere) Nothing) | |
| 3349 | + |> Jpipe.custom (optionalField "while" (Jdec.nullable unionWhile) Nothing) | |
| 3350 | + |> Jpipe.custom (optionalField "willSet" (Jdec.nullable unionWillSet) Nothing) | |
| 3351 | + |> Jpipe.custom (optionalField "with" (Jdec.nullable unionWith) Nothing) | |
| 3352 | + |> Jpipe.custom (optionalField "xor" (Jdec.nullable unionXor) Nothing) | |
| 3353 | + |> Jpipe.custom (optionalField "xor_eq" (Jdec.nullable unionXorEq) Nothing) | |
| 3354 | + |> Jpipe.custom (optionalField "YES" (Jdec.nullable unionYES) Nothing) | |
| 3355 | + |> Jpipe.custom (optionalField "yield" (Jdec.nullable unionYield) Nothing) | |
| 3356 | + | |
| 3357 | +encodeQuickType : QuickType -> Jenc.Value | |
| 3358 | +encodeQuickType x = | |
| 3359 | + Jenc.object | |
| 3360 | + [ ("_", makeNullableEncoder encodeUnionUnion x.empty) | |
| 3361 | + , ("_Bool", makeNullableEncoder encodeUnionBool x.quickTypeBool) | |
| 3362 | + , ("_Complex", makeNullableEncoder encodeUnionComplex x.complex) | |
| 3363 | + , ("_Imaginery", makeNullableEncoder encodeUnionImaginery x.imaginery) | |
| 3364 | + , ("abstract", makeNullableEncoder encodeUnionAbstract x.abstract) | |
| 3365 | + , ("alignas", makeNullableEncoder encodeUnionAlignas x.alignas) | |
| 3366 | + , ("alignof", makeNullableEncoder encodeUnionAlignof x.alignof) | |
| 3367 | + , ("and", makeNullableEncoder encodeUnionAnd x.and) | |
| 3368 | + , ("and_eq", makeNullableEncoder encodeUnionAndEq x.andEq) | |
| 3369 | + , ("any", makeNullableEncoder encodeUnionAnyUnion x.quickTypeAny) | |
| 3370 | + , ("Any", makeNullableEncoder encodeUnionAny x.any) | |
| 3371 | + , ("array", makeNullableEncoder encodeUnionArray x.array) | |
| 3372 | + , ("as", makeNullableEncoder encodeUnionAs x.quickTypeAs) | |
| 3373 | + , ("asm", makeNullableEncoder encodeUnionASM x.asm) | |
| 3374 | + , ("assert", makeNullableEncoder encodeUnionAssert x.assert) | |
| 3375 | + , ("associatedtype", makeNullableEncoder encodeUnionAssociatedtype x.associatedtype) | |
| 3376 | + , ("associativity", makeNullableEncoder encodeUnionAssociativity x.associativity) | |
| 3377 | + , ("async", makeNullableEncoder encodeUnionAsync x.async) | |
| 3378 | + , ("atomic", makeNullableEncoder encodeUnionAtomic x.atomic) | |
| 3379 | + , ("atomic_cancel", makeNullableEncoder encodeUnionAtomicCancel x.atomicCancel) | |
| 3380 | + , ("atomic_commit", makeNullableEncoder encodeUnionAtomicCommit x.atomicCommit) | |
| 3381 | + , ("atomic_noexcept", makeNullableEncoder encodeUnionAtomicNoexcept x.atomicNoexcept) | |
| 3382 | + , ("auto", makeNullableEncoder encodeUnionAuto x.auto) | |
| 3383 | + , ("await", makeNullableEncoder encodeUnionAwait x.await) | |
| 3384 | + , ("base", makeNullableEncoder encodeUnionBase x.base) | |
| 3385 | + , ("bitand", makeNullableEncoder encodeUnionBitand x.bitand) | |
| 3386 | + , ("bitor", makeNullableEncoder encodeUnionBitor x.bitor) | |
| 3387 | + , ("BOOL", makeNullableEncoder encodeUnionBOOL x.quickTypeBOOL) | |
| 3388 | + , ("bool", makeNullableEncoder encodeUnionBoolUnion x.purpleBool) | |
| 3389 | + , ("boolean", makeNullableEncoder encodeUnionBoolean x.boolean) | |
| 3390 | + , ("break", makeNullableEncoder encodeUnionBreak x.break) | |
| 3391 | + , ("bycopy", makeNullableEncoder encodeUnionBycopy x.bycopy) | |
| 3392 | + , ("byref", makeNullableEncoder encodeUnionByref x.byref) | |
| 3393 | + , ("byte", makeNullableEncoder encodeUnionByte x.byte) | |
| 3394 | + , ("case", makeNullableEncoder encodeUnionCase x.quickTypeCase) | |
| 3395 | + , ("catch", makeNullableEncoder encodeUnionCatch x.catch) | |
| 3396 | + , ("chan", makeNullableEncoder encodeUnionChan x.chan) | |
| 3397 | + , ("char", makeNullableEncoder encodeUnionChar x.char) | |
| 3398 | + , ("char16_t", makeNullableEncoder encodeUnionChar16T x.char16T) | |
| 3399 | + , ("char32_t", makeNullableEncoder encodeUnionChar32T x.char32T) | |
| 3400 | + , ("checked", makeNullableEncoder encodeUnionChecked x.checked) | |
| 3401 | + , ("class", makeNullableEncoder encodeUnionClassUnion x.quickTypeClass) | |
| 3402 | + , ("Class", makeNullableEncoder encodeUnionClass x.class) | |
| 3403 | + , ("co_await", makeNullableEncoder encodeUnionCoAwait x.coAwait) | |
| 3404 | + , ("co_return", makeNullableEncoder encodeUnionCoReturn x.coReturn) | |
| 3405 | + , ("co_yield", makeNullableEncoder encodeUnionCoYield x.coYield) | |
| 3406 | + , ("compl", makeNullableEncoder encodeUnionCompl x.compl) | |
| 3407 | + , ("concept", makeNullableEncoder encodeUnionConcept x.concept) | |
| 3408 | + , ("console", makeNullableEncoder encodeUnionConsole x.console) | |
| 3409 | + , ("const", makeNullableEncoder encodeUnionConst x.const) | |
| 3410 | + , ("const_cast", makeNullableEncoder encodeUnionConstCast x.constCast) | |
| 3411 | + , ("constexpr", makeNullableEncoder encodeUnionConstexpr x.constexpr) | |
| 3412 | + , ("constructor", makeNullableEncoder encodeUnionConstructor x.constructor) | |
| 3413 | + , ("continue", makeNullableEncoder encodeUnionContinue x.continue) | |
| 3414 | + , ("convenience", makeNullableEncoder encodeUnionConvenience x.convenience) | |
| 3415 | + , ("convert", makeNullableEncoder encodeUnionConvert x.convert) | |
| 3416 | + , ("converter", makeNullableEncoder encodeUnionConverter x.converter) | |
| 3417 | + , ("date", makeNullableEncoder encodeUnionDate x.date) | |
| 3418 | + , ("date_parse_handling", makeNullableEncoder encodeUnionDateParseHandling x.dateParseHandling) | |
| 3419 | + , ("debugger", makeNullableEncoder encodeUnionDebugger x.debugger) | |
| 3420 | + , ("decimal", makeNullableEncoder encodeUnionDecimal x.decimal) | |
| 3421 | + , ("declare", makeNullableEncoder encodeUnionDeclare x.declare) | |
| 3422 | + , ("decltype", makeNullableEncoder encodeUnionDecltype x.decltype) | |
| 3423 | + , ("decode_string", makeNullableEncoder encodeUnionDecodeString x.decodeString) | |
| 3424 | + , ("def", makeNullableEncoder encodeUnionDef x.def) | |
| 3425 | + , ("default", makeNullableEncoder encodeUnionDefault x.default) | |
| 3426 | + , ("defer", makeNullableEncoder encodeUnionDefer x.defer) | |
| 3427 | + , ("deinit", makeNullableEncoder encodeUnionDeinit x.deinit) | |
| 3428 | + , ("del", makeNullableEncoder encodeUnionDel x.del) | |
| 3429 | + , ("delegate", makeNullableEncoder encodeUnionDelegate x.delegate) | |
| 3430 | + , ("delete", makeNullableEncoder encodeUnionDelete x.delete) | |
| 3431 | + , ("dict", makeNullableEncoder encodeUnionDict x.dict) | |
| 3432 | + , ("dictionary", makeNullableEncoder encodeUnionDictionary x.dictionary) | |
| 3433 | + , ("didSet", makeNullableEncoder encodeUnionDidSet x.didSet) | |
| 3434 | + , ("do", makeNullableEncoder encodeUnionDo x.do) | |
| 3435 | + , ("double", makeNullableEncoder encodeUnionDouble x.double) | |
| 3436 | + , ("dummy", makeNullableEncoder Jenc.float x.dummy) | |
| 3437 | + , ("dynamic", makeNullableEncoder encodeUnionDynamic x.dynamic) | |
| 3438 | + , ("dynamic_cast", makeNullableEncoder encodeUnionDynamicCast x.dynamicCast) | |
| 3439 | + , ("elif", makeNullableEncoder encodeUnionElif x.elif) | |
| 3440 | + , ("else", makeNullableEncoder encodeUnionElse x.quickTypeElse) | |
| 3441 | + , ("encode_quick_type", makeNullableEncoder encodeUnionEncodeQuickType x.encodeQuickType) | |
| 3442 | + , ("enum", makeNullableEncoder encodeUnionEnum x.enum) | |
| 3443 | + , ("event", makeNullableEncoder encodeUnionEvent x.event) | |
| 3444 | + , ("except", makeNullableEncoder encodeUnionExcept x.except) | |
| 3445 | + , ("exception", makeNullableEncoder encodeUnionException x.exception) | |
| 3446 | + , ("explicit", makeNullableEncoder encodeUnionExplicit x.explicit) | |
| 3447 | + , ("export", makeNullableEncoder encodeUnionExport x.export) | |
| 3448 | + , ("exposing", makeNullableEncoder encodeUnionExposing x.quickTypeExposing) | |
| 3449 | + , ("extends", makeNullableEncoder encodeUnionExtends x.extends) | |
| 3450 | + , ("extension", makeNullableEncoder encodeUnionExtension x.extension) | |
| 3451 | + , ("extern", makeNullableEncoder encodeUnionExtern x.extern) | |
| 3452 | + , ("fallthrough", makeNullableEncoder encodeUnionFallthrough x.fallthrough) | |
| 3453 | + , ("false", makeNullableEncoder encodeUnionFalseUnion x.quickTypeFalse) | |
| 3454 | + , ("False", makeNullableEncoder encodeUnionFalse x.false) | |
| 3455 | + , ("fileprivate", makeNullableEncoder encodeUnionFileprivate x.fileprivate) | |
| 3456 | + , ("final", makeNullableEncoder encodeUnionFinal x.final) | |
| 3457 | + , ("finally", makeNullableEncoder encodeUnionFinally x.finally) | |
| 3458 | + , ("fixed", makeNullableEncoder encodeUnionFixed x.fixed) | |
| 3459 | + , ("float", makeNullableEncoder encodeUnionFloat x.quickTypeFloat) | |
| 3460 | + , ("for", makeNullableEncoder encodeUnionFor x.for) | |
| 3461 | + , ("foreach", makeNullableEncoder encodeUnionForeach x.foreach) | |
| 3462 | + , ("friend", makeNullableEncoder encodeUnionFriend x.friend) | |
| 3463 | + , ("from", makeNullableEncoder encodeUnionFrom x.from) | |
| 3464 | + , ("from_json", makeNullableEncoder encodeUnionFromJSON x.fromJSON) | |
| 3465 | + , ("func", makeNullableEncoder encodeUnionFunc x.func) | |
| 3466 | + , ("function", makeNullableEncoder encodeUnionFunction x.function) | |
| 3467 | + , ("get", makeNullableEncoder encodeUnionGet x.get) | |
| 3468 | + , ("global", makeNullableEncoder encodeUnionGlobal x.global) | |
| 3469 | + , ("go", makeNullableEncoder encodeUnionGo x.go) | |
| 3470 | + , ("goto", makeNullableEncoder encodeUnionGoto x.goto) | |
| 3471 | + , ("guard", makeNullableEncoder encodeUnionGuard x.guard) | |
| 3472 | + , ("hasOwnProperty", makeNullableEncoder encodeUnionHasOwnProperty x.hasOwnProperty) | |
| 3473 | + , ("id", makeNullableEncoder encodeUnionID x.id) | |
| 3474 | + , ("if", makeNullableEncoder encodeUnionIf x.quickTypeIf) | |
| 3475 | + , ("IMP", makeNullableEncoder encodeUnionIMP x.imp) | |
| 3476 | + , ("implements", makeNullableEncoder encodeUnionImplements x.implements) | |
| 3477 | + , ("implicit", makeNullableEncoder encodeUnionImplicit x.implicit) | |
| 3478 | + , ("import", makeNullableEncoder encodeUnionImport x.quickTypeImport) | |
| 3479 | + , ("in", makeNullableEncoder encodeUnionIn x.quickTypeIn) | |
| 3480 | + , ("indirect", makeNullableEncoder encodeUnionIndirect x.indirect) | |
| 3481 | + , ("infix", makeNullableEncoder encodeUnionInfix x.quickTypeInfix) | |
| 3482 | + , ("init", makeNullableEncoder encodeUnionInit x.init) | |
| 3483 | + , ("inline", makeNullableEncoder encodeUnionInline x.inline) | |
| 3484 | + , ("inout", makeNullableEncoder encodeUnionInout x.inout) | |
| 3485 | + , ("instanceof", makeNullableEncoder encodeUnionInstanceof x.instanceof) | |
| 3486 | + , ("int", makeNullableEncoder encodeUnionInt x.quickTypeInt) | |
| 3487 | + , ("interface", makeNullableEncoder encodeUnionInterface x.interface) | |
| 3488 | + , ("internal", makeNullableEncoder encodeUnionInternal x.internal) | |
| 3489 | + , ("is", makeNullableEncoder encodeUnionIs x.is) | |
| 3490 | + , ("iterable", makeNullableEncoder encodeUnionIterable x.iterable) | |
| 3491 | + , ("jdec", makeNullableEncoder encodeUnionJdec x.jdec) | |
| 3492 | + , ("jenc", makeNullableEncoder encodeUnionJenc x.jenc) | |
| 3493 | + , ("jpipe", makeNullableEncoder encodeUnionJpipe x.jpipe) | |
| 3494 | + , ("json", makeNullableEncoder encodeUnionJSON x.json) | |
| 3495 | + , ("json_converter", makeNullableEncoder encodeUnionJSONConverter x.jsonConverter) | |
| 3496 | + , ("json_serializer", makeNullableEncoder encodeUnionJSONSerializer x.jsonSerializer) | |
| 3497 | + , ("json_token", makeNullableEncoder encodeUnionJSONToken x.jsonToken) | |
| 3498 | + , ("json_writer", makeNullableEncoder encodeUnionJSONWriter x.jsonWriter) | |
| 3499 | + , ("lambda", makeNullableEncoder encodeUnionLambda x.lambda) | |
| 3500 | + , ("lazy", makeNullableEncoder encodeUnionLazy x.lazy) | |
| 3501 | + , ("left", makeNullableEncoder encodeUnionLeft x.left) | |
| 3502 | + , ("let", makeNullableEncoder encodeUnionLet x.quickTypeLet) | |
| 3503 | + , ("list", makeNullableEncoder encodeUnionList x.list) | |
| 3504 | + , ("lock", makeNullableEncoder encodeUnionLock x.lock) | |
| 3505 | + , ("long", makeNullableEncoder encodeUnionLong x.long) | |
| 3506 | + , ("map", makeNullableEncoder encodeUnionMap x.map) | |
| 3507 | + , ("metadata_property_handling", makeNullableEncoder encodeUnionMetadataPropertyHandling x.metadataPropertyHandling) | |
| 3508 | + , ("module", makeNullableEncoder encodeUnionModule x.quickTypeModule) | |
| 3509 | + , ("mutable", makeNullableEncoder encodeUnionMutable x.mutable) | |
| 3510 | + , ("mutating", makeNullableEncoder encodeUnionMutating x.mutating) | |
| 3511 | + , ("namespace", makeNullableEncoder encodeUnionNamespace x.namespace) | |
| 3512 | + , ("native", makeNullableEncoder encodeUnionNative x.native) | |
| 3513 | + , ("new", makeNullableEncoder encodeUnionNew x.new) | |
| 3514 | + , ("newtonsoft", makeNullableEncoder encodeUnionNewtonsoft x.newtonsoft) | |
| 3515 | + , ("nil", makeNullableEncoder encodeUnionNil x.nil) | |
| 3516 | + , ("NO", makeNullableEncoder encodeUnionNO x.no) | |
| 3517 | + , ("noexcept", makeNullableEncoder encodeUnionNoexcept x.noexcept) | |
| 3518 | + , ("nonatomic", makeNullableEncoder encodeUnionNonatomic x.nonatomic) | |
| 3519 | + , ("none", makeNullableEncoder encodeUnionNoneUnion x.quickTypeNone) | |
| 3520 | + , ("None", makeNullableEncoder encodeUnionNone x.none) | |
| 3521 | + , ("nonlocal", makeNullableEncoder encodeUnionNonlocal x.nonlocal) | |
| 3522 | + , ("nonmutating", makeNullableEncoder encodeUnionNonmutating x.nonmutating) | |
| 3523 | + , ("not", makeNullableEncoder encodeUnionNot x.not) | |
| 3524 | + , ("not_eq", makeNullableEncoder encodeUnionNotEq x.notEq) | |
| 3525 | + , ("NSString", makeNullableEncoder encodeUnionNSString x.nsString) | |
| 3526 | + , ("NULL", makeNullableEncoder encodeUnionNULL x.null) | |
| 3527 | + , ("null", makeNullableEncoder encodeUnionNull x.quickTypeNull) | |
| 3528 | + , ("nullptr", makeNullableEncoder encodeUnionNullptr x.nullptr) | |
| 3529 | + , ("number", makeNullableEncoder encodeUnionNumber x.number) | |
| 3530 | + , ("object", makeNullableEncoder encodeUnionObject x.object) | |
| 3531 | + , ("of", makeNullableEncoder encodeUnionOf x.quickTypeOf) | |
| 3532 | + , ("oneway", makeNullableEncoder encodeUnionOneway x.oneway) | |
| 3533 | + , ("open", makeNullableEncoder encodeUnionOpen x.open) | |
| 3534 | + , ("operator", makeNullableEncoder encodeUnionOperator x.operator) | |
| 3535 | + , ("optional", makeNullableEncoder encodeUnionOptional x.optional) | |
| 3536 | + , ("or", makeNullableEncoder encodeUnionOr x.or) | |
| 3537 | + , ("or_eq", makeNullableEncoder encodeUnionOrEq x.orEq) | |
| 3538 | + , ("out", makeNullableEncoder encodeUnionOut x.out) | |
| 3539 | + , ("override", makeNullableEncoder encodeUnionOverride x.override) | |
| 3540 | + , ("package", makeNullableEncoder encodeUnionPackage x.package) | |
| 3541 | + , ("params", makeNullableEncoder encodeUnionParams x.params) | |
| 3542 | + , ("pass", makeNullableEncoder encodeUnionPass x.pass) | |
| 3543 | + , ("port", makeNullableEncoder encodeUnionPort x.quickTypePort) | |
| 3544 | + , ("postfix", makeNullableEncoder encodeUnionPostfix x.postfix) | |
| 3545 | + , ("precedence", makeNullableEncoder encodeUnionPrecedence x.precedence) | |
| 3546 | + , ("prefix", makeNullableEncoder encodeUnionPrefix x.prefix) | |
| 3547 | + , ("print", makeNullableEncoder encodeUnionPrint x.print) | |
| 3548 | + , ("printf", makeNullableEncoder encodeUnionPrintf x.printf) | |
| 3549 | + , ("private", makeNullableEncoder encodeUnionPrivate x.private) | |
| 3550 | + , ("protected", makeNullableEncoder encodeUnionProtected x.protected) | |
| 3551 | + , ("Protocol", makeNullableEncoder encodeUnionProtocol x.protocol) | |
| 3552 | + , ("protocol", makeNullableEncoder encodeUnionProtocolUnion x.quickTypeProtocol) | |
| 3553 | + , ("public", makeNullableEncoder encodeUnionPublic x.public) | |
| 3554 | + , ("quicktype", makeNullableEncoder encodeUnionQuicktype x.quicktype) | |
| 3555 | + , ("raise", makeNullableEncoder encodeUnionRaise x.raise) | |
| 3556 | + , ("range", makeNullableEncoder encodeUnionRange x.range) | |
| 3557 | + , ("readonly", makeNullableEncoder encodeUnionReadonly x.readonly) | |
| 3558 | + , ("ref", makeNullableEncoder encodeUnionRef x.ref) | |
| 3559 | + , ("register", makeNullableEncoder encodeUnionRegister x.register) | |
| 3560 | + , ("reinterpret_cast", makeNullableEncoder encodeUnionReinterpretCast x.reinterpretCast) | |
| 3561 | + , ("repeat", makeNullableEncoder encodeUnionRepeat x.repeat) | |
| 3562 | + , ("require", makeNullableEncoder encodeUnionRequire x.require) | |
| 3563 | + , ("required", makeNullableEncoder encodeUnionRequired x.required) | |
| 3564 | + , ("requires", makeNullableEncoder encodeUnionRequires x.requires) | |
| 3565 | + , ("restrict", makeNullableEncoder encodeUnionRestrict x.restrict) | |
| 3566 | + , ("retain", makeNullableEncoder encodeUnionRetain x.retain) | |
| 3567 | + , ("rethrows", makeNullableEncoder encodeUnionRethrows x.rethrows) | |
| 3568 | + , ("return", makeNullableEncoder encodeUnionReturn x.return) | |
| 3569 | + , ("right", makeNullableEncoder encodeUnionRight x.right) | |
| 3570 | + , ("sbyte", makeNullableEncoder encodeUnionSbyte x.sbyte) | |
| 3571 | + , ("sealed", makeNullableEncoder encodeUnionSealed x.sealed) | |
| 3572 | + , ("SEL", makeNullableEncoder encodeUnionSEL x.sel) | |
| 3573 | + , ("select", makeNullableEncoder encodeUnionSelect x.select) | |
| 3574 | + , ("Self", makeNullableEncoder encodeUnionSelf x.self) | |
| 3575 | + , ("self", makeNullableEncoder encodeUnionSelfUnion x.quickTypeSelf) | |
| 3576 | + , ("serialize", makeNullableEncoder encodeUnionSerialize x.serialize) | |
| 3577 | + , ("set", makeNullableEncoder encodeUnionSet x.set) | |
| 3578 | + , ("short", makeNullableEncoder encodeUnionShort x.short) | |
| 3579 | + , ("signed", makeNullableEncoder encodeUnionSigned x.signed) | |
| 3580 | + , ("sizeof", makeNullableEncoder encodeUnionSizeof x.sizeof) | |
| 3581 | + , ("stackalloc", makeNullableEncoder encodeUnionStackalloc x.stackalloc) | |
| 3582 | + , ("static", makeNullableEncoder encodeUnionStatic x.static) | |
| 3583 | + , ("static_assert", makeNullableEncoder encodeUnionStaticAssert x.staticAssert) | |
| 3584 | + , ("static_cast", makeNullableEncoder encodeUnionStaticCast x.staticCast) | |
| 3585 | + , ("strictfp", makeNullableEncoder encodeUnionStrictfp x.strictfp) | |
| 3586 | + , ("string", makeNullableEncoder encodeUnionString x.quickTypeString) | |
| 3587 | + , ("struct", makeNullableEncoder encodeUnionStruct x.struct) | |
| 3588 | + , ("subscript", makeNullableEncoder encodeUnionSubscript x.subscript) | |
| 3589 | + , ("super", makeNullableEncoder encodeUnionSuper x.super) | |
| 3590 | + , ("switch", makeNullableEncoder encodeUnionSwitch x.switch) | |
| 3591 | + , ("symbol", makeNullableEncoder encodeUnionSymbol x.symbol) | |
| 3592 | + , ("synchronized", makeNullableEncoder encodeUnionSynchronized x.synchronized) | |
| 3593 | + , ("system", makeNullableEncoder encodeUnionSystem x.system) | |
| 3594 | + , ("template", makeNullableEncoder encodeUnionTemplate x.template) | |
| 3595 | + , ("then", makeNullableEncoder encodeUnionThen x.quickTypeThen) | |
| 3596 | + , ("this", makeNullableEncoder encodeUnionThis x.this) | |
| 3597 | + , ("thread_local", makeNullableEncoder encodeUnionThreadLocal x.threadLocal) | |
| 3598 | + , ("throw", makeNullableEncoder encodeUnionThrow x.throw) | |
| 3599 | + , ("throws", makeNullableEncoder encodeUnionThrows x.throws) | |
| 3600 | + , ("to_json", makeNullableEncoder encodeUnionToJSON x.toJSON) | |
| 3601 | + , ("top_level", makeNullableEncoder encodeUnionTopLevel x.topLevel) | |
| 3602 | + , ("transient", makeNullableEncoder encodeUnionTransient x.transient) | |
| 3603 | + , ("True", makeNullableEncoder encodeUnionTrue x.true) | |
| 3604 | + , ("true", makeNullableEncoder encodeUnionTrueUnion x.quickTypeTrue) | |
| 3605 | + , ("try", makeNullableEncoder encodeUnionTry x.try) | |
| 3606 | + , ("Type", makeNullableEncoder encodeUnionType x.quickTypeType) | |
| 3607 | + , ("type", makeNullableEncoder encodeUnionTypeUnion x.purpleType) | |
| 3608 | + , ("typealias", makeNullableEncoder encodeUnionTypealias x.typealias) | |
| 3609 | + , ("typedef", makeNullableEncoder encodeUnionTypedef x.typedef) | |
| 3610 | + , ("typeid", makeNullableEncoder encodeUnionTypeid x.typeid) | |
| 3611 | + , ("typename", makeNullableEncoder encodeUnionTypename x.typename) | |
| 3612 | + , ("typeof", makeNullableEncoder encodeUnionTypeof x.typeof) | |
| 3613 | + , ("uint", makeNullableEncoder encodeUnionUint x.uint) | |
| 3614 | + , ("ulong", makeNullableEncoder encodeUnionUlong x.ulong) | |
| 3615 | + , ("unchecked", makeNullableEncoder encodeUnionUnchecked x.unchecked) | |
| 3616 | + , ("undefined", makeNullableEncoder encodeUnionUndefined x.undefined) | |
| 3617 | + , ("union", makeNullableEncoder encodeUnionUnionUnion x.union) | |
| 3618 | + , ("unowned", makeNullableEncoder encodeUnionUnowned x.unowned) | |
| 3619 | + , ("unsafe", makeNullableEncoder encodeUnionUnsafe x.unsafe) | |
| 3620 | + , ("unsigned", makeNullableEncoder encodeUnionUnsigned x.unsigned) | |
| 3621 | + , ("ushort", makeNullableEncoder encodeUnionUshort x.ushort) | |
| 3622 | + , ("using", makeNullableEncoder encodeUnionUsing x.using) | |
| 3623 | + , ("var", makeNullableEncoder encodeUnionVar x.var) | |
| 3624 | + , ("virtual", makeNullableEncoder encodeUnionVirtual x.virtual) | |
| 3625 | + , ("void", makeNullableEncoder encodeUnionVoid x.void) | |
| 3626 | + , ("volatile", makeNullableEncoder encodeUnionVolatile x.volatile) | |
| 3627 | + , ("wchar_t", makeNullableEncoder encodeUnionWcharT x.wcharT) | |
| 3628 | + , ("weak", makeNullableEncoder encodeUnionWeak x.weak) | |
| 3629 | + , ("where", makeNullableEncoder encodeUnionWhere x.quickTypeWhere) | |
| 3630 | + , ("while", makeNullableEncoder encodeUnionWhile x.while) | |
| 3631 | + , ("willSet", makeNullableEncoder encodeUnionWillSet x.willSet) | |
| 3632 | + , ("with", makeNullableEncoder encodeUnionWith x.with) | |
| 3633 | + , ("xor", makeNullableEncoder encodeUnionXor x.xor) | |
| 3634 | + , ("xor_eq", makeNullableEncoder encodeUnionXorEq x.xorEq) | |
| 3635 | + , ("YES", makeNullableEncoder encodeUnionYES x.yes) | |
| 3636 | + , ("yield", makeNullableEncoder encodeUnionYield x.yield) | |
| 3637 | + ] | |
| 3638 | + | |
| 3639 | +unionAbstract : Jdec.Decoder UnionAbstract | |
| 3640 | +unionAbstract = | |
| 3641 | + Jdec.oneOf | |
| 3642 | + [ Jdec.map DoubleInUnionAbstract Jdec.float | |
| 3643 | + , Jdec.map AbstractInUnionAbstract abstract | |
| 3644 | + ] | |
| 3645 | + | |
| 3646 | +encodeUnionAbstract : UnionAbstract -> Jenc.Value | |
| 3647 | +encodeUnionAbstract x = case x of | |
| 3648 | + DoubleInUnionAbstract y -> Jenc.float y | |
| 3649 | + AbstractInUnionAbstract y -> encodeAbstract y | |
| 3650 | + | |
| 3651 | +abstract : Jdec.Decoder Abstract | |
| 3652 | +abstract = | |
| 3653 | + Jdec.succeed Abstract | |
| 3654 | + | |
| 3655 | +encodeAbstract : Abstract -> Jenc.Value | |
| 3656 | +encodeAbstract x = | |
| 3657 | + Jenc.object | |
| 3658 | + [ | |
| 3659 | + ] | |
| 3660 | + | |
| 3661 | +unionAlignas : Jdec.Decoder UnionAlignas | |
| 3662 | +unionAlignas = | |
| 3663 | + Jdec.oneOf | |
| 3664 | + [ Jdec.map DoubleInUnionAlignas Jdec.float | |
| 3665 | + , Jdec.map AlignasInUnionAlignas alignas | |
| 3666 | + ] | |
| 3667 | + | |
| 3668 | +encodeUnionAlignas : UnionAlignas -> Jenc.Value | |
| 3669 | +encodeUnionAlignas x = case x of | |
| 3670 | + DoubleInUnionAlignas y -> Jenc.float y | |
| 3671 | + AlignasInUnionAlignas y -> encodeAlignas y | |
| 3672 | + | |
| 3673 | +alignas : Jdec.Decoder Alignas | |
| 3674 | +alignas = | |
| 3675 | + Jdec.succeed Alignas | |
| 3676 | + | |
| 3677 | +encodeAlignas : Alignas -> Jenc.Value | |
| 3678 | +encodeAlignas x = | |
| 3679 | + Jenc.object | |
| 3680 | + [ | |
| 3681 | + ] | |
| 3682 | + | |
| 3683 | +unionAlignof : Jdec.Decoder UnionAlignof | |
| 3684 | +unionAlignof = | |
| 3685 | + Jdec.oneOf | |
| 3686 | + [ Jdec.map DoubleInUnionAlignof Jdec.float | |
| 3687 | + , Jdec.map AlignofInUnionAlignof alignof | |
| 3688 | + ] | |
| 3689 | + | |
| 3690 | +encodeUnionAlignof : UnionAlignof -> Jenc.Value | |
| 3691 | +encodeUnionAlignof x = case x of | |
| 3692 | + DoubleInUnionAlignof y -> Jenc.float y | |
| 3693 | + AlignofInUnionAlignof y -> encodeAlignof y | |
| 3694 | + | |
| 3695 | +alignof : Jdec.Decoder Alignof | |
| 3696 | +alignof = | |
| 3697 | + Jdec.succeed Alignof | |
| 3698 | + | |
| 3699 | +encodeAlignof : Alignof -> Jenc.Value | |
| 3700 | +encodeAlignof x = | |
| 3701 | + Jenc.object | |
| 3702 | + [ | |
| 3703 | + ] | |
| 3704 | + | |
| 3705 | +unionAnd : Jdec.Decoder UnionAnd | |
| 3706 | +unionAnd = | |
| 3707 | + Jdec.oneOf | |
| 3708 | + [ Jdec.map DoubleInUnionAnd Jdec.float | |
| 3709 | + , Jdec.map AndInUnionAnd and | |
| 3710 | + ] | |
| 3711 | + | |
| 3712 | +encodeUnionAnd : UnionAnd -> Jenc.Value | |
| 3713 | +encodeUnionAnd x = case x of | |
| 3714 | + DoubleInUnionAnd y -> Jenc.float y | |
| 3715 | + AndInUnionAnd y -> encodeAnd y | |
| 3716 | + | |
| 3717 | +and : Jdec.Decoder And | |
| 3718 | +and = | |
| 3719 | + Jdec.succeed And | |
| 3720 | + | |
| 3721 | +encodeAnd : And -> Jenc.Value | |
| 3722 | +encodeAnd x = | |
| 3723 | + Jenc.object | |
| 3724 | + [ | |
| 3725 | + ] | |
| 3726 | + | |
| 3727 | +unionAndEq : Jdec.Decoder UnionAndEq | |
| 3728 | +unionAndEq = | |
| 3729 | + Jdec.oneOf | |
| 3730 | + [ Jdec.map DoubleInUnionAndEq Jdec.float | |
| 3731 | + , Jdec.map AndEqInUnionAndEq andEq | |
| 3732 | + ] | |
| 3733 | + | |
| 3734 | +encodeUnionAndEq : UnionAndEq -> Jenc.Value | |
| 3735 | +encodeUnionAndEq x = case x of | |
| 3736 | + DoubleInUnionAndEq y -> Jenc.float y | |
| 3737 | + AndEqInUnionAndEq y -> encodeAndEq y | |
| 3738 | + | |
| 3739 | +andEq : Jdec.Decoder AndEq | |
| 3740 | +andEq = | |
| 3741 | + Jdec.succeed AndEq | |
| 3742 | + | |
| 3743 | +encodeAndEq : AndEq -> Jenc.Value | |
| 3744 | +encodeAndEq x = | |
| 3745 | + Jenc.object | |
| 3746 | + [ | |
| 3747 | + ] | |
| 3748 | + | |
| 3749 | +unionAny : Jdec.Decoder UnionAny | |
| 3750 | +unionAny = | |
| 3751 | + Jdec.oneOf | |
| 3752 | + [ Jdec.map DoubleInUnionAny Jdec.float | |
| 3753 | + , Jdec.map AnyInUnionAny any | |
| 3754 | + ] | |
| 3755 | + | |
| 3756 | +encodeUnionAny : UnionAny -> Jenc.Value | |
| 3757 | +encodeUnionAny x = case x of | |
| 3758 | + DoubleInUnionAny y -> Jenc.float y | |
| 3759 | + AnyInUnionAny y -> encodeAny y | |
| 3760 | + | |
| 3761 | +any : Jdec.Decoder Any | |
| 3762 | +any = | |
| 3763 | + Jdec.succeed Any | |
| 3764 | + | |
| 3765 | +encodeAny : Any -> Jenc.Value | |
| 3766 | +encodeAny x = | |
| 3767 | + Jenc.object | |
| 3768 | + [ | |
| 3769 | + ] | |
| 3770 | + | |
| 3771 | +unionArray : Jdec.Decoder UnionArray | |
| 3772 | +unionArray = | |
| 3773 | + Jdec.oneOf | |
| 3774 | + [ Jdec.map DoubleInUnionArray Jdec.float | |
| 3775 | + , Jdec.map ArrayClassInUnionArray arrayClass | |
| 3776 | + ] | |
| 3777 | + | |
| 3778 | +encodeUnionArray : UnionArray -> Jenc.Value | |
| 3779 | +encodeUnionArray x = case x of | |
| 3780 | + DoubleInUnionArray y -> Jenc.float y | |
| 3781 | + ArrayClassInUnionArray y -> encodeArrayClass y | |
| 3782 | + | |
| 3783 | +arrayClass : Jdec.Decoder ArrayClass | |
| 3784 | +arrayClass = | |
| 3785 | + Jdec.succeed ArrayClass | |
| 3786 | + | |
| 3787 | +encodeArrayClass : ArrayClass -> Jenc.Value | |
| 3788 | +encodeArrayClass x = | |
| 3789 | + Jenc.object | |
| 3790 | + [ | |
| 3791 | + ] | |
| 3792 | + | |
| 3793 | +unionASM : Jdec.Decoder UnionASM | |
| 3794 | +unionASM = | |
| 3795 | + Jdec.oneOf | |
| 3796 | + [ Jdec.map DoubleInUnionASM Jdec.float | |
| 3797 | + , Jdec.map ASMInUnionASM asm | |
| 3798 | + ] | |
| 3799 | + | |
| 3800 | +encodeUnionASM : UnionASM -> Jenc.Value | |
| 3801 | +encodeUnionASM x = case x of | |
| 3802 | + DoubleInUnionASM y -> Jenc.float y | |
| 3803 | + ASMInUnionASM y -> encodeASM y | |
| 3804 | + | |
| 3805 | +asm : Jdec.Decoder ASM | |
| 3806 | +asm = | |
| 3807 | + Jdec.succeed ASM | |
| 3808 | + | |
| 3809 | +encodeASM : ASM -> Jenc.Value | |
| 3810 | +encodeASM x = | |
| 3811 | + Jenc.object | |
| 3812 | + [ | |
| 3813 | + ] | |
| 3814 | + | |
| 3815 | +unionAssert : Jdec.Decoder UnionAssert | |
| 3816 | +unionAssert = | |
| 3817 | + Jdec.oneOf | |
| 3818 | + [ Jdec.map DoubleInUnionAssert Jdec.float | |
| 3819 | + , Jdec.map AssertInUnionAssert assert | |
| 3820 | + ] | |
| 3821 | + | |
| 3822 | +encodeUnionAssert : UnionAssert -> Jenc.Value | |
| 3823 | +encodeUnionAssert x = case x of | |
| 3824 | + DoubleInUnionAssert y -> Jenc.float y | |
| 3825 | + AssertInUnionAssert y -> encodeAssert y | |
| 3826 | + | |
| 3827 | +assert : Jdec.Decoder Assert | |
| 3828 | +assert = | |
| 3829 | + Jdec.succeed Assert | |
| 3830 | + | |
| 3831 | +encodeAssert : Assert -> Jenc.Value | |
| 3832 | +encodeAssert x = | |
| 3833 | + Jenc.object | |
| 3834 | + [ | |
| 3835 | + ] | |
| 3836 | + | |
| 3837 | +unionAssociatedtype : Jdec.Decoder UnionAssociatedtype | |
| 3838 | +unionAssociatedtype = | |
| 3839 | + Jdec.oneOf | |
| 3840 | + [ Jdec.map DoubleInUnionAssociatedtype Jdec.float | |
| 3841 | + , Jdec.map AssociatedtypeInUnionAssociatedtype associatedtype | |
| 3842 | + ] | |
| 3843 | + | |
| 3844 | +encodeUnionAssociatedtype : UnionAssociatedtype -> Jenc.Value | |
| 3845 | +encodeUnionAssociatedtype x = case x of | |
| 3846 | + DoubleInUnionAssociatedtype y -> Jenc.float y | |
| 3847 | + AssociatedtypeInUnionAssociatedtype y -> encodeAssociatedtype y | |
| 3848 | + | |
| 3849 | +associatedtype : Jdec.Decoder Associatedtype | |
| 3850 | +associatedtype = | |
| 3851 | + Jdec.succeed Associatedtype | |
| 3852 | + | |
| 3853 | +encodeAssociatedtype : Associatedtype -> Jenc.Value | |
| 3854 | +encodeAssociatedtype x = | |
| 3855 | + Jenc.object | |
| 3856 | + [ | |
| 3857 | + ] | |
| 3858 | + | |
| 3859 | +unionAssociativity : Jdec.Decoder UnionAssociativity | |
| 3860 | +unionAssociativity = | |
| 3861 | + Jdec.oneOf | |
| 3862 | + [ Jdec.map DoubleInUnionAssociativity Jdec.float | |
| 3863 | + , Jdec.map AssociativityInUnionAssociativity associativity | |
| 3864 | + ] | |
| 3865 | + | |
| 3866 | +encodeUnionAssociativity : UnionAssociativity -> Jenc.Value | |
| 3867 | +encodeUnionAssociativity x = case x of | |
| 3868 | + DoubleInUnionAssociativity y -> Jenc.float y | |
| 3869 | + AssociativityInUnionAssociativity y -> encodeAssociativity y | |
| 3870 | + | |
| 3871 | +associativity : Jdec.Decoder Associativity | |
| 3872 | +associativity = | |
| 3873 | + Jdec.succeed Associativity | |
| 3874 | + | |
| 3875 | +encodeAssociativity : Associativity -> Jenc.Value | |
| 3876 | +encodeAssociativity x = | |
| 3877 | + Jenc.object | |
| 3878 | + [ | |
| 3879 | + ] | |
| 3880 | + | |
| 3881 | +unionAsync : Jdec.Decoder UnionAsync | |
| 3882 | +unionAsync = | |
| 3883 | + Jdec.oneOf | |
| 3884 | + [ Jdec.map DoubleInUnionAsync Jdec.float | |
| 3885 | + , Jdec.map AsyncInUnionAsync async | |
| 3886 | + ] | |
| 3887 | + | |
| 3888 | +encodeUnionAsync : UnionAsync -> Jenc.Value | |
| 3889 | +encodeUnionAsync x = case x of | |
| 3890 | + DoubleInUnionAsync y -> Jenc.float y | |
| 3891 | + AsyncInUnionAsync y -> encodeAsync y | |
| 3892 | + | |
| 3893 | +async : Jdec.Decoder Async | |
| 3894 | +async = | |
| 3895 | + Jdec.succeed Async | |
| 3896 | + | |
| 3897 | +encodeAsync : Async -> Jenc.Value | |
| 3898 | +encodeAsync x = | |
| 3899 | + Jenc.object | |
| 3900 | + [ | |
| 3901 | + ] | |
| 3902 | + | |
| 3903 | +unionAtomic : Jdec.Decoder UnionAtomic | |
| 3904 | +unionAtomic = | |
| 3905 | + Jdec.oneOf | |
| 3906 | + [ Jdec.map DoubleInUnionAtomic Jdec.float | |
| 3907 | + , Jdec.map AtomicInUnionAtomic atomic | |
| 3908 | + ] | |
| 3909 | + | |
| 3910 | +encodeUnionAtomic : UnionAtomic -> Jenc.Value | |
| 3911 | +encodeUnionAtomic x = case x of | |
| 3912 | + DoubleInUnionAtomic y -> Jenc.float y | |
| 3913 | + AtomicInUnionAtomic y -> encodeAtomic y | |
| 3914 | + | |
| 3915 | +atomic : Jdec.Decoder Atomic | |
| 3916 | +atomic = | |
| 3917 | + Jdec.succeed Atomic | |
| 3918 | + | |
| 3919 | +encodeAtomic : Atomic -> Jenc.Value | |
| 3920 | +encodeAtomic x = | |
| 3921 | + Jenc.object | |
| 3922 | + [ | |
| 3923 | + ] | |
| 3924 | + | |
| 3925 | +unionAtomicCancel : Jdec.Decoder UnionAtomicCancel | |
| 3926 | +unionAtomicCancel = | |
| 3927 | + Jdec.oneOf | |
| 3928 | + [ Jdec.map DoubleInUnionAtomicCancel Jdec.float | |
| 3929 | + , Jdec.map AtomicCancelInUnionAtomicCancel atomicCancel | |
| 3930 | + ] | |
| 3931 | + | |
| 3932 | +encodeUnionAtomicCancel : UnionAtomicCancel -> Jenc.Value | |
| 3933 | +encodeUnionAtomicCancel x = case x of | |
| 3934 | + DoubleInUnionAtomicCancel y -> Jenc.float y | |
| 3935 | + AtomicCancelInUnionAtomicCancel y -> encodeAtomicCancel y | |
| 3936 | + | |
| 3937 | +atomicCancel : Jdec.Decoder AtomicCancel | |
| 3938 | +atomicCancel = | |
| 3939 | + Jdec.succeed AtomicCancel | |
| 3940 | + | |
| 3941 | +encodeAtomicCancel : AtomicCancel -> Jenc.Value | |
| 3942 | +encodeAtomicCancel x = | |
| 3943 | + Jenc.object | |
| 3944 | + [ | |
| 3945 | + ] | |
| 3946 | + | |
| 3947 | +unionAtomicCommit : Jdec.Decoder UnionAtomicCommit | |
| 3948 | +unionAtomicCommit = | |
| 3949 | + Jdec.oneOf | |
| 3950 | + [ Jdec.map DoubleInUnionAtomicCommit Jdec.float | |
| 3951 | + , Jdec.map AtomicCommitInUnionAtomicCommit atomicCommit | |
| 3952 | + ] | |
| 3953 | + | |
| 3954 | +encodeUnionAtomicCommit : UnionAtomicCommit -> Jenc.Value | |
| 3955 | +encodeUnionAtomicCommit x = case x of | |
| 3956 | + DoubleInUnionAtomicCommit y -> Jenc.float y | |
| 3957 | + AtomicCommitInUnionAtomicCommit y -> encodeAtomicCommit y | |
| 3958 | + | |
| 3959 | +atomicCommit : Jdec.Decoder AtomicCommit | |
| 3960 | +atomicCommit = | |
| 3961 | + Jdec.succeed AtomicCommit | |
| 3962 | + | |
| 3963 | +encodeAtomicCommit : AtomicCommit -> Jenc.Value | |
| 3964 | +encodeAtomicCommit x = | |
| 3965 | + Jenc.object | |
| 3966 | + [ | |
| 3967 | + ] | |
| 3968 | + | |
| 3969 | +unionAtomicNoexcept : Jdec.Decoder UnionAtomicNoexcept | |
| 3970 | +unionAtomicNoexcept = | |
| 3971 | + Jdec.oneOf | |
| 3972 | + [ Jdec.map DoubleInUnionAtomicNoexcept Jdec.float | |
| 3973 | + , Jdec.map AtomicNoexceptInUnionAtomicNoexcept atomicNoexcept | |
| 3974 | + ] | |
| 3975 | + | |
| 3976 | +encodeUnionAtomicNoexcept : UnionAtomicNoexcept -> Jenc.Value | |
| 3977 | +encodeUnionAtomicNoexcept x = case x of | |
| 3978 | + DoubleInUnionAtomicNoexcept y -> Jenc.float y | |
| 3979 | + AtomicNoexceptInUnionAtomicNoexcept y -> encodeAtomicNoexcept y | |
| 3980 | + | |
| 3981 | +atomicNoexcept : Jdec.Decoder AtomicNoexcept | |
| 3982 | +atomicNoexcept = | |
| 3983 | + Jdec.succeed AtomicNoexcept | |
| 3984 | + | |
| 3985 | +encodeAtomicNoexcept : AtomicNoexcept -> Jenc.Value | |
| 3986 | +encodeAtomicNoexcept x = | |
| 3987 | + Jenc.object | |
| 3988 | + [ | |
| 3989 | + ] | |
| 3990 | + | |
| 3991 | +unionAuto : Jdec.Decoder UnionAuto | |
| 3992 | +unionAuto = | |
| 3993 | + Jdec.oneOf | |
| 3994 | + [ Jdec.map DoubleInUnionAuto Jdec.float | |
| 3995 | + , Jdec.map AutoInUnionAuto auto | |
| 3996 | + ] | |
| 3997 | + | |
| 3998 | +encodeUnionAuto : UnionAuto -> Jenc.Value | |
| 3999 | +encodeUnionAuto x = case x of | |
| 4000 | + DoubleInUnionAuto y -> Jenc.float y | |
| 4001 | + AutoInUnionAuto y -> encodeAuto y | |
| 4002 | + | |
| 4003 | +auto : Jdec.Decoder Auto | |
| 4004 | +auto = | |
| 4005 | + Jdec.succeed Auto | |
| 4006 | + | |
| 4007 | +encodeAuto : Auto -> Jenc.Value | |
| 4008 | +encodeAuto x = | |
| 4009 | + Jenc.object | |
| 4010 | + [ | |
| 4011 | + ] | |
| 4012 | + | |
| 4013 | +unionAwait : Jdec.Decoder UnionAwait | |
| 4014 | +unionAwait = | |
| 4015 | + Jdec.oneOf | |
| 4016 | + [ Jdec.map DoubleInUnionAwait Jdec.float | |
| 4017 | + , Jdec.map AwaitInUnionAwait await | |
| 4018 | + ] | |
| 4019 | + | |
| 4020 | +encodeUnionAwait : UnionAwait -> Jenc.Value | |
| 4021 | +encodeUnionAwait x = case x of | |
| 4022 | + DoubleInUnionAwait y -> Jenc.float y | |
| 4023 | + AwaitInUnionAwait y -> encodeAwait y | |
| 4024 | + | |
| 4025 | +await : Jdec.Decoder Await | |
| 4026 | +await = | |
| 4027 | + Jdec.succeed Await | |
| 4028 | + | |
| 4029 | +encodeAwait : Await -> Jenc.Value | |
| 4030 | +encodeAwait x = | |
| 4031 | + Jenc.object | |
| 4032 | + [ | |
| 4033 | + ] | |
| 4034 | + | |
| 4035 | +unionBase : Jdec.Decoder UnionBase | |
| 4036 | +unionBase = | |
| 4037 | + Jdec.oneOf | |
| 4038 | + [ Jdec.map DoubleInUnionBase Jdec.float | |
| 4039 | + , Jdec.map BaseInUnionBase base | |
| 4040 | + ] | |
| 4041 | + | |
| 4042 | +encodeUnionBase : UnionBase -> Jenc.Value | |
| 4043 | +encodeUnionBase x = case x of | |
| 4044 | + DoubleInUnionBase y -> Jenc.float y | |
| 4045 | + BaseInUnionBase y -> encodeBase y | |
| 4046 | + | |
| 4047 | +base : Jdec.Decoder Base | |
| 4048 | +base = | |
| 4049 | + Jdec.succeed Base | |
| 4050 | + | |
| 4051 | +encodeBase : Base -> Jenc.Value | |
| 4052 | +encodeBase x = | |
| 4053 | + Jenc.object | |
| 4054 | + [ | |
| 4055 | + ] | |
| 4056 | + | |
| 4057 | +unionBitand : Jdec.Decoder UnionBitand | |
| 4058 | +unionBitand = | |
| 4059 | + Jdec.oneOf | |
| 4060 | + [ Jdec.map DoubleInUnionBitand Jdec.float | |
| 4061 | + , Jdec.map BitandInUnionBitand bitand | |
| 4062 | + ] | |
| 4063 | + | |
| 4064 | +encodeUnionBitand : UnionBitand -> Jenc.Value | |
| 4065 | +encodeUnionBitand x = case x of | |
| 4066 | + DoubleInUnionBitand y -> Jenc.float y | |
| 4067 | + BitandInUnionBitand y -> encodeBitand y | |
| 4068 | + | |
| 4069 | +bitand : Jdec.Decoder Bitand | |
| 4070 | +bitand = | |
| 4071 | + Jdec.succeed Bitand | |
| 4072 | + | |
| 4073 | +encodeBitand : Bitand -> Jenc.Value | |
| 4074 | +encodeBitand x = | |
| 4075 | + Jenc.object | |
| 4076 | + [ | |
| 4077 | + ] | |
| 4078 | + | |
| 4079 | +unionBitor : Jdec.Decoder UnionBitor | |
| 4080 | +unionBitor = | |
| 4081 | + Jdec.oneOf | |
| 4082 | + [ Jdec.map DoubleInUnionBitor Jdec.float | |
| 4083 | + , Jdec.map BitorInUnionBitor bitor | |
| 4084 | + ] | |
| 4085 | + | |
| 4086 | +encodeUnionBitor : UnionBitor -> Jenc.Value | |
| 4087 | +encodeUnionBitor x = case x of | |
| 4088 | + DoubleInUnionBitor y -> Jenc.float y | |
| 4089 | + BitorInUnionBitor y -> encodeBitor y | |
| 4090 | + | |
| 4091 | +bitor : Jdec.Decoder Bitor | |
| 4092 | +bitor = | |
| 4093 | + Jdec.succeed Bitor | |
| 4094 | + | |
| 4095 | +encodeBitor : Bitor -> Jenc.Value | |
| 4096 | +encodeBitor x = | |
| 4097 | + Jenc.object | |
| 4098 | + [ | |
| 4099 | + ] | |
| 4100 | + | |
| 4101 | +unionBoolean : Jdec.Decoder UnionBoolean | |
| 4102 | +unionBoolean = | |
| 4103 | + Jdec.oneOf | |
| 4104 | + [ Jdec.map DoubleInUnionBoolean Jdec.float | |
| 4105 | + , Jdec.map BooleanInUnionBoolean boolean | |
| 4106 | + ] | |
| 4107 | + | |
| 4108 | +encodeUnionBoolean : UnionBoolean -> Jenc.Value | |
| 4109 | +encodeUnionBoolean x = case x of | |
| 4110 | + DoubleInUnionBoolean y -> Jenc.float y | |
| 4111 | + BooleanInUnionBoolean y -> encodeBoolean y | |
| 4112 | + | |
| 4113 | +boolean : Jdec.Decoder Boolean | |
| 4114 | +boolean = | |
| 4115 | + Jdec.succeed Boolean | |
| 4116 | + | |
| 4117 | +encodeBoolean : Boolean -> Jenc.Value | |
| 4118 | +encodeBoolean x = | |
| 4119 | + Jenc.object | |
| 4120 | + [ | |
| 4121 | + ] | |
| 4122 | + | |
| 4123 | +unionBreak : Jdec.Decoder UnionBreak | |
| 4124 | +unionBreak = | |
| 4125 | + Jdec.oneOf | |
| 4126 | + [ Jdec.map DoubleInUnionBreak Jdec.float | |
| 4127 | + , Jdec.map BreakInUnionBreak break | |
| 4128 | + ] | |
| 4129 | + | |
| 4130 | +encodeUnionBreak : UnionBreak -> Jenc.Value | |
| 4131 | +encodeUnionBreak x = case x of | |
| 4132 | + DoubleInUnionBreak y -> Jenc.float y | |
| 4133 | + BreakInUnionBreak y -> encodeBreak y | |
| 4134 | + | |
| 4135 | +break : Jdec.Decoder Break | |
| 4136 | +break = | |
| 4137 | + Jdec.succeed Break | |
| 4138 | + | |
| 4139 | +encodeBreak : Break -> Jenc.Value | |
| 4140 | +encodeBreak x = | |
| 4141 | + Jenc.object | |
| 4142 | + [ | |
| 4143 | + ] | |
| 4144 | + | |
| 4145 | +unionBycopy : Jdec.Decoder UnionBycopy | |
| 4146 | +unionBycopy = | |
| 4147 | + Jdec.oneOf | |
| 4148 | + [ Jdec.map DoubleInUnionBycopy Jdec.float | |
| 4149 | + , Jdec.map BycopyInUnionBycopy bycopy | |
| 4150 | + ] | |
| 4151 | + | |
| 4152 | +encodeUnionBycopy : UnionBycopy -> Jenc.Value | |
| 4153 | +encodeUnionBycopy x = case x of | |
| 4154 | + DoubleInUnionBycopy y -> Jenc.float y | |
| 4155 | + BycopyInUnionBycopy y -> encodeBycopy y | |
| 4156 | + | |
| 4157 | +bycopy : Jdec.Decoder Bycopy | |
| 4158 | +bycopy = | |
| 4159 | + Jdec.succeed Bycopy | |
| 4160 | + | |
| 4161 | +encodeBycopy : Bycopy -> Jenc.Value | |
| 4162 | +encodeBycopy x = | |
| 4163 | + Jenc.object | |
| 4164 | + [ | |
| 4165 | + ] | |
| 4166 | + | |
| 4167 | +unionByref : Jdec.Decoder UnionByref | |
| 4168 | +unionByref = | |
| 4169 | + Jdec.oneOf | |
| 4170 | + [ Jdec.map DoubleInUnionByref Jdec.float | |
| 4171 | + , Jdec.map ByrefInUnionByref byref | |
| 4172 | + ] | |
| 4173 | + | |
| 4174 | +encodeUnionByref : UnionByref -> Jenc.Value | |
| 4175 | +encodeUnionByref x = case x of | |
| 4176 | + DoubleInUnionByref y -> Jenc.float y | |
| 4177 | + ByrefInUnionByref y -> encodeByref y | |
| 4178 | + | |
| 4179 | +byref : Jdec.Decoder Byref | |
| 4180 | +byref = | |
| 4181 | + Jdec.succeed Byref | |
| 4182 | + | |
| 4183 | +encodeByref : Byref -> Jenc.Value | |
| 4184 | +encodeByref x = | |
| 4185 | + Jenc.object | |
| 4186 | + [ | |
| 4187 | + ] | |
| 4188 | + | |
| 4189 | +unionByte : Jdec.Decoder UnionByte | |
| 4190 | +unionByte = | |
| 4191 | + Jdec.oneOf | |
| 4192 | + [ Jdec.map DoubleInUnionByte Jdec.float | |
| 4193 | + , Jdec.map ByteInUnionByte byte | |
| 4194 | + ] | |
| 4195 | + | |
| 4196 | +encodeUnionByte : UnionByte -> Jenc.Value | |
| 4197 | +encodeUnionByte x = case x of | |
| 4198 | + DoubleInUnionByte y -> Jenc.float y | |
| 4199 | + ByteInUnionByte y -> encodeByte y | |
| 4200 | + | |
| 4201 | +byte : Jdec.Decoder Byte | |
| 4202 | +byte = | |
| 4203 | + Jdec.succeed Byte | |
| 4204 | + | |
| 4205 | +encodeByte : Byte -> Jenc.Value | |
| 4206 | +encodeByte x = | |
| 4207 | + Jenc.object | |
| 4208 | + [ | |
| 4209 | + ] | |
| 4210 | + | |
| 4211 | +unionCatch : Jdec.Decoder UnionCatch | |
| 4212 | +unionCatch = | |
| 4213 | + Jdec.oneOf | |
| 4214 | + [ Jdec.map DoubleInUnionCatch Jdec.float | |
| 4215 | + , Jdec.map CatchInUnionCatch catch | |
| 4216 | + ] | |
| 4217 | + | |
| 4218 | +encodeUnionCatch : UnionCatch -> Jenc.Value | |
| 4219 | +encodeUnionCatch x = case x of | |
| 4220 | + DoubleInUnionCatch y -> Jenc.float y | |
| 4221 | + CatchInUnionCatch y -> encodeCatch y | |
| 4222 | + | |
| 4223 | +catch : Jdec.Decoder Catch | |
| 4224 | +catch = | |
| 4225 | + Jdec.succeed Catch | |
| 4226 | + | |
| 4227 | +encodeCatch : Catch -> Jenc.Value | |
| 4228 | +encodeCatch x = | |
| 4229 | + Jenc.object | |
| 4230 | + [ | |
| 4231 | + ] | |
| 4232 | + | |
| 4233 | +unionChan : Jdec.Decoder UnionChan | |
| 4234 | +unionChan = | |
| 4235 | + Jdec.oneOf | |
| 4236 | + [ Jdec.map DoubleInUnionChan Jdec.float | |
| 4237 | + , Jdec.map ChanInUnionChan chan | |
| 4238 | + ] | |
| 4239 | + | |
| 4240 | +encodeUnionChan : UnionChan -> Jenc.Value | |
| 4241 | +encodeUnionChan x = case x of | |
| 4242 | + DoubleInUnionChan y -> Jenc.float y | |
| 4243 | + ChanInUnionChan y -> encodeChan y | |
| 4244 | + | |
| 4245 | +chan : Jdec.Decoder Chan | |
| 4246 | +chan = | |
| 4247 | + Jdec.succeed Chan | |
| 4248 | + | |
| 4249 | +encodeChan : Chan -> Jenc.Value | |
| 4250 | +encodeChan x = | |
| 4251 | + Jenc.object | |
| 4252 | + [ | |
| 4253 | + ] | |
| 4254 | + | |
| 4255 | +unionChar : Jdec.Decoder UnionChar | |
| 4256 | +unionChar = | |
| 4257 | + Jdec.oneOf | |
| 4258 | + [ Jdec.map DoubleInUnionChar Jdec.float | |
| 4259 | + , Jdec.map CharInUnionChar char | |
| 4260 | + ] | |
| 4261 | + | |
| 4262 | +encodeUnionChar : UnionChar -> Jenc.Value | |
| 4263 | +encodeUnionChar x = case x of | |
| 4264 | + DoubleInUnionChar y -> Jenc.float y | |
| 4265 | + CharInUnionChar y -> encodeChar y | |
| 4266 | + | |
| 4267 | +char : Jdec.Decoder Char | |
| 4268 | +char = | |
| 4269 | + Jdec.succeed Char | |
| 4270 | + | |
| 4271 | +encodeChar : Char -> Jenc.Value | |
| 4272 | +encodeChar x = | |
| 4273 | + Jenc.object | |
| 4274 | + [ | |
| 4275 | + ] | |
| 4276 | + | |
| 4277 | +unionChar16T : Jdec.Decoder UnionChar16T | |
| 4278 | +unionChar16T = | |
| 4279 | + Jdec.oneOf | |
| 4280 | + [ Jdec.map DoubleInUnionChar16T Jdec.float | |
| 4281 | + , Jdec.map Char16TInUnionChar16T char16T | |
| 4282 | + ] | |
| 4283 | + | |
| 4284 | +encodeUnionChar16T : UnionChar16T -> Jenc.Value | |
| 4285 | +encodeUnionChar16T x = case x of | |
| 4286 | + DoubleInUnionChar16T y -> Jenc.float y | |
| 4287 | + Char16TInUnionChar16T y -> encodeChar16T y | |
| 4288 | + | |
| 4289 | +char16T : Jdec.Decoder Char16T | |
| 4290 | +char16T = | |
| 4291 | + Jdec.succeed Char16T | |
| 4292 | + | |
| 4293 | +encodeChar16T : Char16T -> Jenc.Value | |
| 4294 | +encodeChar16T x = | |
| 4295 | + Jenc.object | |
| 4296 | + [ | |
| 4297 | + ] | |
| 4298 | + | |
| 4299 | +unionChar32T : Jdec.Decoder UnionChar32T | |
| 4300 | +unionChar32T = | |
| 4301 | + Jdec.oneOf | |
| 4302 | + [ Jdec.map DoubleInUnionChar32T Jdec.float | |
| 4303 | + , Jdec.map Char32TInUnionChar32T char32T | |
| 4304 | + ] | |
| 4305 | + | |
| 4306 | +encodeUnionChar32T : UnionChar32T -> Jenc.Value | |
| 4307 | +encodeUnionChar32T x = case x of | |
| 4308 | + DoubleInUnionChar32T y -> Jenc.float y | |
| 4309 | + Char32TInUnionChar32T y -> encodeChar32T y | |
| 4310 | + | |
| 4311 | +char32T : Jdec.Decoder Char32T | |
| 4312 | +char32T = | |
| 4313 | + Jdec.succeed Char32T | |
| 4314 | + | |
| 4315 | +encodeChar32T : Char32T -> Jenc.Value | |
| 4316 | +encodeChar32T x = | |
| 4317 | + Jenc.object | |
| 4318 | + [ | |
| 4319 | + ] | |
| 4320 | + | |
| 4321 | +unionChecked : Jdec.Decoder UnionChecked | |
| 4322 | +unionChecked = | |
| 4323 | + Jdec.oneOf | |
| 4324 | + [ Jdec.map DoubleInUnionChecked Jdec.float | |
| 4325 | + , Jdec.map CheckedInUnionChecked checked | |
| 4326 | + ] | |
| 4327 | + | |
| 4328 | +encodeUnionChecked : UnionChecked -> Jenc.Value | |
| 4329 | +encodeUnionChecked x = case x of | |
| 4330 | + DoubleInUnionChecked y -> Jenc.float y | |
| 4331 | + CheckedInUnionChecked y -> encodeChecked y | |
| 4332 | + | |
| 4333 | +checked : Jdec.Decoder Checked | |
| 4334 | +checked = | |
| 4335 | + Jdec.succeed Checked | |
| 4336 | + | |
| 4337 | +encodeChecked : Checked -> Jenc.Value | |
| 4338 | +encodeChecked x = | |
| 4339 | + Jenc.object | |
| 4340 | + [ | |
| 4341 | + ] | |
| 4342 | + | |
| 4343 | +unionClass : Jdec.Decoder UnionClass | |
| 4344 | +unionClass = | |
| 4345 | + Jdec.oneOf | |
| 4346 | + [ Jdec.map DoubleInUnionClass Jdec.float | |
| 4347 | + , Jdec.map ClassInUnionClass class | |
| 4348 | + ] | |
| 4349 | + | |
| 4350 | +encodeUnionClass : UnionClass -> Jenc.Value | |
| 4351 | +encodeUnionClass x = case x of | |
| 4352 | + DoubleInUnionClass y -> Jenc.float y | |
| 4353 | + ClassInUnionClass y -> encodeClass y | |
| 4354 | + | |
| 4355 | +class : Jdec.Decoder Class | |
| 4356 | +class = | |
| 4357 | + Jdec.succeed Class | |
| 4358 | + | |
| 4359 | +encodeClass : Class -> Jenc.Value | |
| 4360 | +encodeClass x = | |
| 4361 | + Jenc.object | |
| 4362 | + [ | |
| 4363 | + ] | |
| 4364 | + | |
| 4365 | +unionCoAwait : Jdec.Decoder UnionCoAwait | |
| 4366 | +unionCoAwait = | |
| 4367 | + Jdec.oneOf | |
| 4368 | + [ Jdec.map DoubleInUnionCoAwait Jdec.float | |
| 4369 | + , Jdec.map CoAwaitInUnionCoAwait coAwait | |
| 4370 | + ] | |
| 4371 | + | |
| 4372 | +encodeUnionCoAwait : UnionCoAwait -> Jenc.Value | |
| 4373 | +encodeUnionCoAwait x = case x of | |
| 4374 | + DoubleInUnionCoAwait y -> Jenc.float y | |
| 4375 | + CoAwaitInUnionCoAwait y -> encodeCoAwait y | |
| 4376 | + | |
| 4377 | +coAwait : Jdec.Decoder CoAwait | |
| 4378 | +coAwait = | |
| 4379 | + Jdec.succeed CoAwait | |
| 4380 | + | |
| 4381 | +encodeCoAwait : CoAwait -> Jenc.Value | |
| 4382 | +encodeCoAwait x = | |
| 4383 | + Jenc.object | |
| 4384 | + [ | |
| 4385 | + ] | |
| 4386 | + | |
| 4387 | +unionCoReturn : Jdec.Decoder UnionCoReturn | |
| 4388 | +unionCoReturn = | |
| 4389 | + Jdec.oneOf | |
| 4390 | + [ Jdec.map DoubleInUnionCoReturn Jdec.float | |
| 4391 | + , Jdec.map CoReturnInUnionCoReturn coReturn | |
| 4392 | + ] | |
| 4393 | + | |
| 4394 | +encodeUnionCoReturn : UnionCoReturn -> Jenc.Value | |
| 4395 | +encodeUnionCoReturn x = case x of | |
| 4396 | + DoubleInUnionCoReturn y -> Jenc.float y | |
| 4397 | + CoReturnInUnionCoReturn y -> encodeCoReturn y | |
| 4398 | + | |
| 4399 | +coReturn : Jdec.Decoder CoReturn | |
| 4400 | +coReturn = | |
| 4401 | + Jdec.succeed CoReturn | |
| 4402 | + | |
| 4403 | +encodeCoReturn : CoReturn -> Jenc.Value | |
| 4404 | +encodeCoReturn x = | |
| 4405 | + Jenc.object | |
| 4406 | + [ | |
| 4407 | + ] | |
| 4408 | + | |
| 4409 | +unionCoYield : Jdec.Decoder UnionCoYield | |
| 4410 | +unionCoYield = | |
| 4411 | + Jdec.oneOf | |
| 4412 | + [ Jdec.map DoubleInUnionCoYield Jdec.float | |
| 4413 | + , Jdec.map CoYieldInUnionCoYield coYield | |
| 4414 | + ] | |
| 4415 | + | |
| 4416 | +encodeUnionCoYield : UnionCoYield -> Jenc.Value | |
| 4417 | +encodeUnionCoYield x = case x of | |
| 4418 | + DoubleInUnionCoYield y -> Jenc.float y | |
| 4419 | + CoYieldInUnionCoYield y -> encodeCoYield y | |
| 4420 | + | |
| 4421 | +coYield : Jdec.Decoder CoYield | |
| 4422 | +coYield = | |
| 4423 | + Jdec.succeed CoYield | |
| 4424 | + | |
| 4425 | +encodeCoYield : CoYield -> Jenc.Value | |
| 4426 | +encodeCoYield x = | |
| 4427 | + Jenc.object | |
| 4428 | + [ | |
| 4429 | + ] | |
| 4430 | + | |
| 4431 | +unionCompl : Jdec.Decoder UnionCompl | |
| 4432 | +unionCompl = | |
| 4433 | + Jdec.oneOf | |
| 4434 | + [ Jdec.map DoubleInUnionCompl Jdec.float | |
| 4435 | + , Jdec.map ComplInUnionCompl compl | |
| 4436 | + ] | |
| 4437 | + | |
| 4438 | +encodeUnionCompl : UnionCompl -> Jenc.Value | |
| 4439 | +encodeUnionCompl x = case x of | |
| 4440 | + DoubleInUnionCompl y -> Jenc.float y | |
| 4441 | + ComplInUnionCompl y -> encodeCompl y | |
| 4442 | + | |
| 4443 | +compl : Jdec.Decoder Compl | |
| 4444 | +compl = | |
| 4445 | + Jdec.succeed Compl | |
| 4446 | + | |
| 4447 | +encodeCompl : Compl -> Jenc.Value | |
| 4448 | +encodeCompl x = | |
| 4449 | + Jenc.object | |
| 4450 | + [ | |
| 4451 | + ] | |
| 4452 | + | |
| 4453 | +unionComplex : Jdec.Decoder UnionComplex | |
| 4454 | +unionComplex = | |
| 4455 | + Jdec.oneOf | |
| 4456 | + [ Jdec.map DoubleInUnionComplex Jdec.float | |
| 4457 | + , Jdec.map ComplexInUnionComplex complex | |
| 4458 | + ] | |
| 4459 | + | |
| 4460 | +encodeUnionComplex : UnionComplex -> Jenc.Value | |
| 4461 | +encodeUnionComplex x = case x of | |
| 4462 | + DoubleInUnionComplex y -> Jenc.float y | |
| 4463 | + ComplexInUnionComplex y -> encodeComplex y | |
| 4464 | + | |
| 4465 | +complex : Jdec.Decoder Complex | |
| 4466 | +complex = | |
| 4467 | + Jdec.succeed Complex | |
| 4468 | + | |
| 4469 | +encodeComplex : Complex -> Jenc.Value | |
| 4470 | +encodeComplex x = | |
| 4471 | + Jenc.object | |
| 4472 | + [ | |
| 4473 | + ] | |
| 4474 | + | |
| 4475 | +unionConcept : Jdec.Decoder UnionConcept | |
| 4476 | +unionConcept = | |
| 4477 | + Jdec.oneOf | |
| 4478 | + [ Jdec.map DoubleInUnionConcept Jdec.float | |
| 4479 | + , Jdec.map ConceptInUnionConcept concept | |
| 4480 | + ] | |
| 4481 | + | |
| 4482 | +encodeUnionConcept : UnionConcept -> Jenc.Value | |
| 4483 | +encodeUnionConcept x = case x of | |
| 4484 | + DoubleInUnionConcept y -> Jenc.float y | |
| 4485 | + ConceptInUnionConcept y -> encodeConcept y | |
| 4486 | + | |
| 4487 | +concept : Jdec.Decoder Concept | |
| 4488 | +concept = | |
| 4489 | + Jdec.succeed Concept | |
| 4490 | + | |
| 4491 | +encodeConcept : Concept -> Jenc.Value | |
| 4492 | +encodeConcept x = | |
| 4493 | + Jenc.object | |
| 4494 | + [ | |
| 4495 | + ] | |
| 4496 | + | |
| 4497 | +unionConsole : Jdec.Decoder UnionConsole | |
| 4498 | +unionConsole = | |
| 4499 | + Jdec.oneOf | |
| 4500 | + [ Jdec.map DoubleInUnionConsole Jdec.float | |
| 4501 | + , Jdec.map ConsoleInUnionConsole console | |
| 4502 | + ] | |
| 4503 | + | |
| 4504 | +encodeUnionConsole : UnionConsole -> Jenc.Value | |
| 4505 | +encodeUnionConsole x = case x of | |
| 4506 | + DoubleInUnionConsole y -> Jenc.float y | |
| 4507 | + ConsoleInUnionConsole y -> encodeConsole y | |
| 4508 | + | |
| 4509 | +console : Jdec.Decoder Console | |
| 4510 | +console = | |
| 4511 | + Jdec.succeed Console | |
| 4512 | + | |
| 4513 | +encodeConsole : Console -> Jenc.Value | |
| 4514 | +encodeConsole x = | |
| 4515 | + Jenc.object | |
| 4516 | + [ | |
| 4517 | + ] | |
| 4518 | + | |
| 4519 | +unionConst : Jdec.Decoder UnionConst | |
| 4520 | +unionConst = | |
| 4521 | + Jdec.oneOf | |
| 4522 | + [ Jdec.map DoubleInUnionConst Jdec.float | |
| 4523 | + , Jdec.map ConstInUnionConst const | |
| 4524 | + ] | |
| 4525 | + | |
| 4526 | +encodeUnionConst : UnionConst -> Jenc.Value | |
| 4527 | +encodeUnionConst x = case x of | |
| 4528 | + DoubleInUnionConst y -> Jenc.float y | |
| 4529 | + ConstInUnionConst y -> encodeConst y | |
| 4530 | + | |
| 4531 | +const : Jdec.Decoder Const | |
| 4532 | +const = | |
| 4533 | + Jdec.succeed Const | |
| 4534 | + | |
| 4535 | +encodeConst : Const -> Jenc.Value | |
| 4536 | +encodeConst x = | |
| 4537 | + Jenc.object | |
| 4538 | + [ | |
| 4539 | + ] | |
| 4540 | + | |
| 4541 | +unionConstCast : Jdec.Decoder UnionConstCast | |
| 4542 | +unionConstCast = | |
| 4543 | + Jdec.oneOf | |
| 4544 | + [ Jdec.map DoubleInUnionConstCast Jdec.float | |
| 4545 | + , Jdec.map ConstCastInUnionConstCast constCast | |
| 4546 | + ] | |
| 4547 | + | |
| 4548 | +encodeUnionConstCast : UnionConstCast -> Jenc.Value | |
| 4549 | +encodeUnionConstCast x = case x of | |
| 4550 | + DoubleInUnionConstCast y -> Jenc.float y | |
| 4551 | + ConstCastInUnionConstCast y -> encodeConstCast y | |
| 4552 | + | |
| 4553 | +constCast : Jdec.Decoder ConstCast | |
| 4554 | +constCast = | |
| 4555 | + Jdec.succeed ConstCast | |
| 4556 | + | |
| 4557 | +encodeConstCast : ConstCast -> Jenc.Value | |
| 4558 | +encodeConstCast x = | |
| 4559 | + Jenc.object | |
| 4560 | + [ | |
| 4561 | + ] | |
| 4562 | + | |
| 4563 | +unionConstexpr : Jdec.Decoder UnionConstexpr | |
| 4564 | +unionConstexpr = | |
| 4565 | + Jdec.oneOf | |
| 4566 | + [ Jdec.map DoubleInUnionConstexpr Jdec.float | |
| 4567 | + , Jdec.map ConstexprInUnionConstexpr constexpr | |
| 4568 | + ] | |
| 4569 | + | |
| 4570 | +encodeUnionConstexpr : UnionConstexpr -> Jenc.Value | |
| 4571 | +encodeUnionConstexpr x = case x of | |
| 4572 | + DoubleInUnionConstexpr y -> Jenc.float y | |
| 4573 | + ConstexprInUnionConstexpr y -> encodeConstexpr y | |
| 4574 | + | |
| 4575 | +constexpr : Jdec.Decoder Constexpr | |
| 4576 | +constexpr = | |
| 4577 | + Jdec.succeed Constexpr | |
| 4578 | + | |
| 4579 | +encodeConstexpr : Constexpr -> Jenc.Value | |
| 4580 | +encodeConstexpr x = | |
| 4581 | + Jenc.object | |
| 4582 | + [ | |
| 4583 | + ] | |
| 4584 | + | |
| 4585 | +unionConstructor : Jdec.Decoder UnionConstructor | |
| 4586 | +unionConstructor = | |
| 4587 | + Jdec.oneOf | |
| 4588 | + [ Jdec.map DoubleInUnionConstructor Jdec.float | |
| 4589 | + , Jdec.map ConstructorInUnionConstructor constructor | |
| 4590 | + ] | |
| 4591 | + | |
| 4592 | +encodeUnionConstructor : UnionConstructor -> Jenc.Value | |
| 4593 | +encodeUnionConstructor x = case x of | |
| 4594 | + DoubleInUnionConstructor y -> Jenc.float y | |
| 4595 | + ConstructorInUnionConstructor y -> encodeConstructor y | |
| 4596 | + | |
| 4597 | +constructor : Jdec.Decoder Constructor | |
| 4598 | +constructor = | |
| 4599 | + Jdec.succeed Constructor | |
| 4600 | + | |
| 4601 | +encodeConstructor : Constructor -> Jenc.Value | |
| 4602 | +encodeConstructor x = | |
| 4603 | + Jenc.object | |
| 4604 | + [ | |
| 4605 | + ] | |
| 4606 | + | |
| 4607 | +unionContinue : Jdec.Decoder UnionContinue | |
| 4608 | +unionContinue = | |
| 4609 | + Jdec.oneOf | |
| 4610 | + [ Jdec.map DoubleInUnionContinue Jdec.float | |
| 4611 | + , Jdec.map ContinueInUnionContinue continue | |
| 4612 | + ] | |
| 4613 | + | |
| 4614 | +encodeUnionContinue : UnionContinue -> Jenc.Value | |
| 4615 | +encodeUnionContinue x = case x of | |
| 4616 | + DoubleInUnionContinue y -> Jenc.float y | |
| 4617 | + ContinueInUnionContinue y -> encodeContinue y | |
| 4618 | + | |
| 4619 | +continue : Jdec.Decoder Continue | |
| 4620 | +continue = | |
| 4621 | + Jdec.succeed Continue | |
| 4622 | + | |
| 4623 | +encodeContinue : Continue -> Jenc.Value | |
| 4624 | +encodeContinue x = | |
| 4625 | + Jenc.object | |
| 4626 | + [ | |
| 4627 | + ] | |
| 4628 | + | |
| 4629 | +unionConvenience : Jdec.Decoder UnionConvenience | |
| 4630 | +unionConvenience = | |
| 4631 | + Jdec.oneOf | |
| 4632 | + [ Jdec.map DoubleInUnionConvenience Jdec.float | |
| 4633 | + , Jdec.map ConvenienceInUnionConvenience convenience | |
| 4634 | + ] | |
| 4635 | + | |
| 4636 | +encodeUnionConvenience : UnionConvenience -> Jenc.Value | |
| 4637 | +encodeUnionConvenience x = case x of | |
| 4638 | + DoubleInUnionConvenience y -> Jenc.float y | |
| 4639 | + ConvenienceInUnionConvenience y -> encodeConvenience y | |
| 4640 | + | |
| 4641 | +convenience : Jdec.Decoder Convenience | |
| 4642 | +convenience = | |
| 4643 | + Jdec.succeed Convenience | |
| 4644 | + | |
| 4645 | +encodeConvenience : Convenience -> Jenc.Value | |
| 4646 | +encodeConvenience x = | |
| 4647 | + Jenc.object | |
| 4648 | + [ | |
| 4649 | + ] | |
| 4650 | + | |
| 4651 | +unionConvert : Jdec.Decoder UnionConvert | |
| 4652 | +unionConvert = | |
| 4653 | + Jdec.oneOf | |
| 4654 | + [ Jdec.map DoubleInUnionConvert Jdec.float | |
| 4655 | + , Jdec.map ConvertInUnionConvert convert | |
| 4656 | + ] | |
| 4657 | + | |
| 4658 | +encodeUnionConvert : UnionConvert -> Jenc.Value | |
| 4659 | +encodeUnionConvert x = case x of | |
| 4660 | + DoubleInUnionConvert y -> Jenc.float y | |
| 4661 | + ConvertInUnionConvert y -> encodeConvert y | |
| 4662 | + | |
| 4663 | +convert : Jdec.Decoder Convert | |
| 4664 | +convert = | |
| 4665 | + Jdec.succeed Convert | |
| 4666 | + | |
| 4667 | +encodeConvert : Convert -> Jenc.Value | |
| 4668 | +encodeConvert x = | |
| 4669 | + Jenc.object | |
| 4670 | + [ | |
| 4671 | + ] | |
| 4672 | + | |
| 4673 | +unionConverter : Jdec.Decoder UnionConverter | |
| 4674 | +unionConverter = | |
| 4675 | + Jdec.oneOf | |
| 4676 | + [ Jdec.map DoubleInUnionConverter Jdec.float | |
| 4677 | + , Jdec.map ConverterInUnionConverter converter | |
| 4678 | + ] | |
| 4679 | + | |
| 4680 | +encodeUnionConverter : UnionConverter -> Jenc.Value | |
| 4681 | +encodeUnionConverter x = case x of | |
| 4682 | + DoubleInUnionConverter y -> Jenc.float y | |
| 4683 | + ConverterInUnionConverter y -> encodeConverter y | |
| 4684 | + | |
| 4685 | +converter : Jdec.Decoder Converter | |
| 4686 | +converter = | |
| 4687 | + Jdec.succeed Converter | |
| 4688 | + | |
| 4689 | +encodeConverter : Converter -> Jenc.Value | |
| 4690 | +encodeConverter x = | |
| 4691 | + Jenc.object | |
| 4692 | + [ | |
| 4693 | + ] | |
| 4694 | + | |
| 4695 | +unionDate : Jdec.Decoder UnionDate | |
| 4696 | +unionDate = | |
| 4697 | + Jdec.oneOf | |
| 4698 | + [ Jdec.map DoubleInUnionDate Jdec.float | |
| 4699 | + , Jdec.map DateInUnionDate date | |
| 4700 | + ] | |
| 4701 | + | |
| 4702 | +encodeUnionDate : UnionDate -> Jenc.Value | |
| 4703 | +encodeUnionDate x = case x of | |
| 4704 | + DoubleInUnionDate y -> Jenc.float y | |
| 4705 | + DateInUnionDate y -> encodeDate y | |
| 4706 | + | |
| 4707 | +date : Jdec.Decoder Date | |
| 4708 | +date = | |
| 4709 | + Jdec.succeed Date | |
| 4710 | + | |
| 4711 | +encodeDate : Date -> Jenc.Value | |
| 4712 | +encodeDate x = | |
| 4713 | + Jenc.object | |
| 4714 | + [ | |
| 4715 | + ] | |
| 4716 | + | |
| 4717 | +unionDateParseHandling : Jdec.Decoder UnionDateParseHandling | |
| 4718 | +unionDateParseHandling = | |
| 4719 | + Jdec.oneOf | |
| 4720 | + [ Jdec.map DoubleInUnionDateParseHandling Jdec.float | |
| 4721 | + , Jdec.map DateParseHandlingInUnionDateParseHandling dateParseHandling | |
| 4722 | + ] | |
| 4723 | + | |
| 4724 | +encodeUnionDateParseHandling : UnionDateParseHandling -> Jenc.Value | |
| 4725 | +encodeUnionDateParseHandling x = case x of | |
| 4726 | + DoubleInUnionDateParseHandling y -> Jenc.float y | |
| 4727 | + DateParseHandlingInUnionDateParseHandling y -> encodeDateParseHandling y | |
| 4728 | + | |
| 4729 | +dateParseHandling : Jdec.Decoder DateParseHandling | |
| 4730 | +dateParseHandling = | |
| 4731 | + Jdec.succeed DateParseHandling | |
| 4732 | + | |
| 4733 | +encodeDateParseHandling : DateParseHandling -> Jenc.Value | |
| 4734 | +encodeDateParseHandling x = | |
| 4735 | + Jenc.object | |
| 4736 | + [ | |
| 4737 | + ] | |
| 4738 | + | |
| 4739 | +unionDebugger : Jdec.Decoder UnionDebugger | |
| 4740 | +unionDebugger = | |
| 4741 | + Jdec.oneOf | |
| 4742 | + [ Jdec.map DoubleInUnionDebugger Jdec.float | |
| 4743 | + , Jdec.map DebuggerInUnionDebugger debugger | |
| 4744 | + ] | |
| 4745 | + | |
| 4746 | +encodeUnionDebugger : UnionDebugger -> Jenc.Value | |
| 4747 | +encodeUnionDebugger x = case x of | |
| 4748 | + DoubleInUnionDebugger y -> Jenc.float y | |
| 4749 | + DebuggerInUnionDebugger y -> encodeDebugger y | |
| 4750 | + | |
| 4751 | +debugger : Jdec.Decoder Debugger | |
| 4752 | +debugger = | |
| 4753 | + Jdec.succeed Debugger | |
| 4754 | + | |
| 4755 | +encodeDebugger : Debugger -> Jenc.Value | |
| 4756 | +encodeDebugger x = | |
| 4757 | + Jenc.object | |
| 4758 | + [ | |
| 4759 | + ] | |
| 4760 | + | |
| 4761 | +unionDecimal : Jdec.Decoder UnionDecimal | |
| 4762 | +unionDecimal = | |
| 4763 | + Jdec.oneOf | |
| 4764 | + [ Jdec.map DoubleInUnionDecimal Jdec.float | |
| 4765 | + , Jdec.map DecimalInUnionDecimal decimal | |
| 4766 | + ] | |
| 4767 | + | |
| 4768 | +encodeUnionDecimal : UnionDecimal -> Jenc.Value | |
| 4769 | +encodeUnionDecimal x = case x of | |
| 4770 | + DoubleInUnionDecimal y -> Jenc.float y | |
| 4771 | + DecimalInUnionDecimal y -> encodeDecimal y | |
| 4772 | + | |
| 4773 | +decimal : Jdec.Decoder Decimal | |
| 4774 | +decimal = | |
| 4775 | + Jdec.succeed Decimal | |
| 4776 | + | |
| 4777 | +encodeDecimal : Decimal -> Jenc.Value | |
| 4778 | +encodeDecimal x = | |
| 4779 | + Jenc.object | |
| 4780 | + [ | |
| 4781 | + ] | |
| 4782 | + | |
| 4783 | +unionDeclare : Jdec.Decoder UnionDeclare | |
| 4784 | +unionDeclare = | |
| 4785 | + Jdec.oneOf | |
| 4786 | + [ Jdec.map DoubleInUnionDeclare Jdec.float | |
| 4787 | + , Jdec.map DeclareInUnionDeclare declare | |
| 4788 | + ] | |
| 4789 | + | |
| 4790 | +encodeUnionDeclare : UnionDeclare -> Jenc.Value | |
| 4791 | +encodeUnionDeclare x = case x of | |
| 4792 | + DoubleInUnionDeclare y -> Jenc.float y | |
| 4793 | + DeclareInUnionDeclare y -> encodeDeclare y | |
| 4794 | + | |
| 4795 | +declare : Jdec.Decoder Declare | |
| 4796 | +declare = | |
| 4797 | + Jdec.succeed Declare | |
| 4798 | + | |
| 4799 | +encodeDeclare : Declare -> Jenc.Value | |
| 4800 | +encodeDeclare x = | |
| 4801 | + Jenc.object | |
| 4802 | + [ | |
| 4803 | + ] | |
| 4804 | + | |
| 4805 | +unionDecltype : Jdec.Decoder UnionDecltype | |
| 4806 | +unionDecltype = | |
| 4807 | + Jdec.oneOf | |
| 4808 | + [ Jdec.map DoubleInUnionDecltype Jdec.float | |
| 4809 | + , Jdec.map DecltypeInUnionDecltype decltype | |
| 4810 | + ] | |
| 4811 | + | |
| 4812 | +encodeUnionDecltype : UnionDecltype -> Jenc.Value | |
| 4813 | +encodeUnionDecltype x = case x of | |
| 4814 | + DoubleInUnionDecltype y -> Jenc.float y | |
| 4815 | + DecltypeInUnionDecltype y -> encodeDecltype y | |
| 4816 | + | |
| 4817 | +decltype : Jdec.Decoder Decltype | |
| 4818 | +decltype = | |
| 4819 | + Jdec.succeed Decltype | |
| 4820 | + | |
| 4821 | +encodeDecltype : Decltype -> Jenc.Value | |
| 4822 | +encodeDecltype x = | |
| 4823 | + Jenc.object | |
| 4824 | + [ | |
| 4825 | + ] | |
| 4826 | + | |
| 4827 | +unionDecodeString : Jdec.Decoder UnionDecodeString | |
| 4828 | +unionDecodeString = | |
| 4829 | + Jdec.oneOf | |
| 4830 | + [ Jdec.map DoubleInUnionDecodeString Jdec.float | |
| 4831 | + , Jdec.map DecodeStringInUnionDecodeString decodeString | |
| 4832 | + ] | |
| 4833 | + | |
| 4834 | +encodeUnionDecodeString : UnionDecodeString -> Jenc.Value | |
| 4835 | +encodeUnionDecodeString x = case x of | |
| 4836 | + DoubleInUnionDecodeString y -> Jenc.float y | |
| 4837 | + DecodeStringInUnionDecodeString y -> encodeDecodeString y | |
| 4838 | + | |
| 4839 | +decodeString : Jdec.Decoder DecodeString | |
| 4840 | +decodeString = | |
| 4841 | + Jdec.succeed DecodeString | |
| 4842 | + | |
| 4843 | +encodeDecodeString : DecodeString -> Jenc.Value | |
| 4844 | +encodeDecodeString x = | |
| 4845 | + Jenc.object | |
| 4846 | + [ | |
| 4847 | + ] | |
| 4848 | + | |
| 4849 | +unionDef : Jdec.Decoder UnionDef | |
| 4850 | +unionDef = | |
| 4851 | + Jdec.oneOf | |
| 4852 | + [ Jdec.map DoubleInUnionDef Jdec.float | |
| 4853 | + , Jdec.map DefInUnionDef def | |
| 4854 | + ] | |
| 4855 | + | |
| 4856 | +encodeUnionDef : UnionDef -> Jenc.Value | |
| 4857 | +encodeUnionDef x = case x of | |
| 4858 | + DoubleInUnionDef y -> Jenc.float y | |
| 4859 | + DefInUnionDef y -> encodeDef y | |
| 4860 | + | |
| 4861 | +def : Jdec.Decoder Def | |
| 4862 | +def = | |
| 4863 | + Jdec.succeed Def | |
| 4864 | + | |
| 4865 | +encodeDef : Def -> Jenc.Value | |
| 4866 | +encodeDef x = | |
| 4867 | + Jenc.object | |
| 4868 | + [ | |
| 4869 | + ] | |
| 4870 | + | |
| 4871 | +unionDefault : Jdec.Decoder UnionDefault | |
| 4872 | +unionDefault = | |
| 4873 | + Jdec.oneOf | |
| 4874 | + [ Jdec.map DoubleInUnionDefault Jdec.float | |
| 4875 | + , Jdec.map DefaultInUnionDefault default | |
| 4876 | + ] | |
| 4877 | + | |
| 4878 | +encodeUnionDefault : UnionDefault -> Jenc.Value | |
| 4879 | +encodeUnionDefault x = case x of | |
| 4880 | + DoubleInUnionDefault y -> Jenc.float y | |
| 4881 | + DefaultInUnionDefault y -> encodeDefault y | |
| 4882 | + | |
| 4883 | +default : Jdec.Decoder Default | |
| 4884 | +default = | |
| 4885 | + Jdec.succeed Default | |
| 4886 | + | |
| 4887 | +encodeDefault : Default -> Jenc.Value | |
| 4888 | +encodeDefault x = | |
| 4889 | + Jenc.object | |
| 4890 | + [ | |
| 4891 | + ] | |
| 4892 | + | |
| 4893 | +unionDefer : Jdec.Decoder UnionDefer | |
| 4894 | +unionDefer = | |
| 4895 | + Jdec.oneOf | |
| 4896 | + [ Jdec.map DoubleInUnionDefer Jdec.float | |
| 4897 | + , Jdec.map DeferInUnionDefer defer | |
| 4898 | + ] | |
| 4899 | + | |
| 4900 | +encodeUnionDefer : UnionDefer -> Jenc.Value | |
| 4901 | +encodeUnionDefer x = case x of | |
| 4902 | + DoubleInUnionDefer y -> Jenc.float y | |
| 4903 | + DeferInUnionDefer y -> encodeDefer y | |
| 4904 | + | |
| 4905 | +defer : Jdec.Decoder Defer | |
| 4906 | +defer = | |
| 4907 | + Jdec.succeed Defer | |
| 4908 | + | |
| 4909 | +encodeDefer : Defer -> Jenc.Value | |
| 4910 | +encodeDefer x = | |
| 4911 | + Jenc.object | |
| 4912 | + [ | |
| 4913 | + ] | |
| 4914 | + | |
| 4915 | +unionDeinit : Jdec.Decoder UnionDeinit | |
| 4916 | +unionDeinit = | |
| 4917 | + Jdec.oneOf | |
| 4918 | + [ Jdec.map DoubleInUnionDeinit Jdec.float | |
| 4919 | + , Jdec.map DeinitInUnionDeinit deinit | |
| 4920 | + ] | |
| 4921 | + | |
| 4922 | +encodeUnionDeinit : UnionDeinit -> Jenc.Value | |
| 4923 | +encodeUnionDeinit x = case x of | |
| 4924 | + DoubleInUnionDeinit y -> Jenc.float y | |
| 4925 | + DeinitInUnionDeinit y -> encodeDeinit y | |
| 4926 | + | |
| 4927 | +deinit : Jdec.Decoder Deinit | |
| 4928 | +deinit = | |
| 4929 | + Jdec.succeed Deinit | |
| 4930 | + | |
| 4931 | +encodeDeinit : Deinit -> Jenc.Value | |
| 4932 | +encodeDeinit x = | |
| 4933 | + Jenc.object | |
| 4934 | + [ | |
| 4935 | + ] | |
| 4936 | + | |
| 4937 | +unionDel : Jdec.Decoder UnionDel | |
| 4938 | +unionDel = | |
| 4939 | + Jdec.oneOf | |
| 4940 | + [ Jdec.map DoubleInUnionDel Jdec.float | |
| 4941 | + , Jdec.map DelInUnionDel del | |
| 4942 | + ] | |
| 4943 | + | |
| 4944 | +encodeUnionDel : UnionDel -> Jenc.Value | |
| 4945 | +encodeUnionDel x = case x of | |
| 4946 | + DoubleInUnionDel y -> Jenc.float y | |
| 4947 | + DelInUnionDel y -> encodeDel y | |
| 4948 | + | |
| 4949 | +del : Jdec.Decoder Del | |
| 4950 | +del = | |
| 4951 | + Jdec.succeed Del | |
| 4952 | + | |
| 4953 | +encodeDel : Del -> Jenc.Value | |
| 4954 | +encodeDel x = | |
| 4955 | + Jenc.object | |
| 4956 | + [ | |
| 4957 | + ] | |
| 4958 | + | |
| 4959 | +unionDelegate : Jdec.Decoder UnionDelegate | |
| 4960 | +unionDelegate = | |
| 4961 | + Jdec.oneOf | |
| 4962 | + [ Jdec.map DoubleInUnionDelegate Jdec.float | |
| 4963 | + , Jdec.map DelegateInUnionDelegate delegate | |
| 4964 | + ] | |
| 4965 | + | |
| 4966 | +encodeUnionDelegate : UnionDelegate -> Jenc.Value | |
| 4967 | +encodeUnionDelegate x = case x of | |
| 4968 | + DoubleInUnionDelegate y -> Jenc.float y | |
| 4969 | + DelegateInUnionDelegate y -> encodeDelegate y | |
| 4970 | + | |
| 4971 | +delegate : Jdec.Decoder Delegate | |
| 4972 | +delegate = | |
| 4973 | + Jdec.succeed Delegate | |
| 4974 | + | |
| 4975 | +encodeDelegate : Delegate -> Jenc.Value | |
| 4976 | +encodeDelegate x = | |
| 4977 | + Jenc.object | |
| 4978 | + [ | |
| 4979 | + ] | |
| 4980 | + | |
| 4981 | +unionDelete : Jdec.Decoder UnionDelete | |
| 4982 | +unionDelete = | |
| 4983 | + Jdec.oneOf | |
| 4984 | + [ Jdec.map DoubleInUnionDelete Jdec.float | |
| 4985 | + , Jdec.map DeleteInUnionDelete delete | |
| 4986 | + ] | |
| 4987 | + | |
| 4988 | +encodeUnionDelete : UnionDelete -> Jenc.Value | |
| 4989 | +encodeUnionDelete x = case x of | |
| 4990 | + DoubleInUnionDelete y -> Jenc.float y | |
| 4991 | + DeleteInUnionDelete y -> encodeDelete y | |
| 4992 | + | |
| 4993 | +delete : Jdec.Decoder Delete | |
| 4994 | +delete = | |
| 4995 | + Jdec.succeed Delete | |
| 4996 | + | |
| 4997 | +encodeDelete : Delete -> Jenc.Value | |
| 4998 | +encodeDelete x = | |
| 4999 | + Jenc.object | |
| 5000 | + [ | |
| 5001 | + ] | |
| 5002 | + | |
| 5003 | +unionDict : Jdec.Decoder UnionDict | |
| 5004 | +unionDict = | |
| 5005 | + Jdec.oneOf | |
| 5006 | + [ Jdec.map DoubleInUnionDict Jdec.float | |
| 5007 | + , Jdec.map DictClassInUnionDict dictClass | |
| 5008 | + ] | |
| 5009 | + | |
| 5010 | +encodeUnionDict : UnionDict -> Jenc.Value | |
| 5011 | +encodeUnionDict x = case x of | |
| 5012 | + DoubleInUnionDict y -> Jenc.float y | |
| 5013 | + DictClassInUnionDict y -> encodeDictClass y | |
| 5014 | + | |
| 5015 | +dictClass : Jdec.Decoder DictClass | |
| 5016 | +dictClass = | |
| 5017 | + Jdec.succeed DictClass | |
| 5018 | + | |
| 5019 | +encodeDictClass : DictClass -> Jenc.Value | |
| 5020 | +encodeDictClass x = | |
| 5021 | + Jenc.object | |
| 5022 | + [ | |
| 5023 | + ] | |
| 5024 | + | |
| 5025 | +unionDictionary : Jdec.Decoder UnionDictionary | |
| 5026 | +unionDictionary = | |
| 5027 | + Jdec.oneOf | |
| 5028 | + [ Jdec.map DoubleInUnionDictionary Jdec.float | |
| 5029 | + , Jdec.map DictionaryInUnionDictionary dictionary | |
| 5030 | + ] | |
| 5031 | + | |
| 5032 | +encodeUnionDictionary : UnionDictionary -> Jenc.Value | |
| 5033 | +encodeUnionDictionary x = case x of | |
| 5034 | + DoubleInUnionDictionary y -> Jenc.float y | |
| 5035 | + DictionaryInUnionDictionary y -> encodeDictionary y | |
| 5036 | + | |
| 5037 | +dictionary : Jdec.Decoder Dictionary | |
| 5038 | +dictionary = | |
| 5039 | + Jdec.succeed Dictionary | |
| 5040 | + | |
| 5041 | +encodeDictionary : Dictionary -> Jenc.Value | |
| 5042 | +encodeDictionary x = | |
| 5043 | + Jenc.object | |
| 5044 | + [ | |
| 5045 | + ] | |
| 5046 | + | |
| 5047 | +unionDidSet : Jdec.Decoder UnionDidSet | |
| 5048 | +unionDidSet = | |
| 5049 | + Jdec.oneOf | |
| 5050 | + [ Jdec.map DoubleInUnionDidSet Jdec.float | |
| 5051 | + , Jdec.map DidSetInUnionDidSet didSet | |
| 5052 | + ] | |
| 5053 | + | |
| 5054 | +encodeUnionDidSet : UnionDidSet -> Jenc.Value | |
| 5055 | +encodeUnionDidSet x = case x of | |
| 5056 | + DoubleInUnionDidSet y -> Jenc.float y | |
| 5057 | + DidSetInUnionDidSet y -> encodeDidSet y | |
| 5058 | + | |
| 5059 | +didSet : Jdec.Decoder DidSet | |
| 5060 | +didSet = | |
| 5061 | + Jdec.succeed DidSet | |
| 5062 | + | |
| 5063 | +encodeDidSet : DidSet -> Jenc.Value | |
| 5064 | +encodeDidSet x = | |
| 5065 | + Jenc.object | |
| 5066 | + [ | |
| 5067 | + ] | |
| 5068 | + | |
| 5069 | +unionDo : Jdec.Decoder UnionDo | |
| 5070 | +unionDo = | |
| 5071 | + Jdec.oneOf | |
| 5072 | + [ Jdec.map DoubleInUnionDo Jdec.float | |
| 5073 | + , Jdec.map DoInUnionDo do | |
| 5074 | + ] | |
| 5075 | + | |
| 5076 | +encodeUnionDo : UnionDo -> Jenc.Value | |
| 5077 | +encodeUnionDo x = case x of | |
| 5078 | + DoubleInUnionDo y -> Jenc.float y | |
| 5079 | + DoInUnionDo y -> encodeDo y | |
| 5080 | + | |
| 5081 | +do : Jdec.Decoder Do | |
| 5082 | +do = | |
| 5083 | + Jdec.succeed Do | |
| 5084 | + | |
| 5085 | +encodeDo : Do -> Jenc.Value | |
| 5086 | +encodeDo x = | |
| 5087 | + Jenc.object | |
| 5088 | + [ | |
| 5089 | + ] | |
| 5090 | + | |
| 5091 | +unionDouble : Jdec.Decoder UnionDouble | |
| 5092 | +unionDouble = | |
| 5093 | + Jdec.oneOf | |
| 5094 | + [ Jdec.map DoubleInUnionDouble Jdec.float | |
| 5095 | + , Jdec.map PurpleDoubleInUnionDouble double | |
| 5096 | + ] | |
| 5097 | + | |
| 5098 | +encodeUnionDouble : UnionDouble -> Jenc.Value | |
| 5099 | +encodeUnionDouble x = case x of | |
| 5100 | + DoubleInUnionDouble y -> Jenc.float y | |
| 5101 | + PurpleDoubleInUnionDouble y -> encodeDouble y | |
| 5102 | + | |
| 5103 | +double : Jdec.Decoder Double | |
| 5104 | +double = | |
| 5105 | + Jdec.succeed Double | |
| 5106 | + | |
| 5107 | +encodeDouble : Double -> Jenc.Value | |
| 5108 | +encodeDouble x = | |
| 5109 | + Jenc.object | |
| 5110 | + [ | |
| 5111 | + ] | |
| 5112 | + | |
| 5113 | +unionDynamic : Jdec.Decoder UnionDynamic | |
| 5114 | +unionDynamic = | |
| 5115 | + Jdec.oneOf | |
| 5116 | + [ Jdec.map DoubleInUnionDynamic Jdec.float | |
| 5117 | + , Jdec.map DynamicInUnionDynamic dynamic | |
| 5118 | + ] | |
| 5119 | + | |
| 5120 | +encodeUnionDynamic : UnionDynamic -> Jenc.Value | |
| 5121 | +encodeUnionDynamic x = case x of | |
| 5122 | + DoubleInUnionDynamic y -> Jenc.float y | |
| 5123 | + DynamicInUnionDynamic y -> encodeDynamic y | |
| 5124 | + | |
| 5125 | +dynamic : Jdec.Decoder Dynamic | |
| 5126 | +dynamic = | |
| 5127 | + Jdec.succeed Dynamic | |
| 5128 | + | |
| 5129 | +encodeDynamic : Dynamic -> Jenc.Value | |
| 5130 | +encodeDynamic x = | |
| 5131 | + Jenc.object | |
| 5132 | + [ | |
| 5133 | + ] | |
| 5134 | + | |
| 5135 | +unionDynamicCast : Jdec.Decoder UnionDynamicCast | |
| 5136 | +unionDynamicCast = | |
| 5137 | + Jdec.oneOf | |
| 5138 | + [ Jdec.map DoubleInUnionDynamicCast Jdec.float | |
| 5139 | + , Jdec.map DynamicCastInUnionDynamicCast dynamicCast | |
| 5140 | + ] | |
| 5141 | + | |
| 5142 | +encodeUnionDynamicCast : UnionDynamicCast -> Jenc.Value | |
| 5143 | +encodeUnionDynamicCast x = case x of | |
| 5144 | + DoubleInUnionDynamicCast y -> Jenc.float y | |
| 5145 | + DynamicCastInUnionDynamicCast y -> encodeDynamicCast y | |
| 5146 | + | |
| 5147 | +dynamicCast : Jdec.Decoder DynamicCast | |
| 5148 | +dynamicCast = | |
| 5149 | + Jdec.succeed DynamicCast | |
| 5150 | + | |
| 5151 | +encodeDynamicCast : DynamicCast -> Jenc.Value | |
| 5152 | +encodeDynamicCast x = | |
| 5153 | + Jenc.object | |
| 5154 | + [ | |
| 5155 | + ] | |
| 5156 | + | |
| 5157 | +unionElif : Jdec.Decoder UnionElif | |
| 5158 | +unionElif = | |
| 5159 | + Jdec.oneOf | |
| 5160 | + [ Jdec.map DoubleInUnionElif Jdec.float | |
| 5161 | + , Jdec.map ElifInUnionElif elif | |
| 5162 | + ] | |
| 5163 | + | |
| 5164 | +encodeUnionElif : UnionElif -> Jenc.Value | |
| 5165 | +encodeUnionElif x = case x of | |
| 5166 | + DoubleInUnionElif y -> Jenc.float y | |
| 5167 | + ElifInUnionElif y -> encodeElif y | |
| 5168 | + | |
| 5169 | +elif : Jdec.Decoder Elif | |
| 5170 | +elif = | |
| 5171 | + Jdec.succeed Elif | |
| 5172 | + | |
| 5173 | +encodeElif : Elif -> Jenc.Value | |
| 5174 | +encodeElif x = | |
| 5175 | + Jenc.object | |
| 5176 | + [ | |
| 5177 | + ] | |
| 5178 | + | |
| 5179 | +unionUnion : Jdec.Decoder UnionUnion | |
| 5180 | +unionUnion = | |
| 5181 | + Jdec.oneOf | |
| 5182 | + [ Jdec.map DoubleInUnionUnion Jdec.float | |
| 5183 | + , Jdec.map EmptyInUnionUnion empty | |
| 5184 | + ] | |
| 5185 | + | |
| 5186 | +encodeUnionUnion : UnionUnion -> Jenc.Value | |
| 5187 | +encodeUnionUnion x = case x of | |
| 5188 | + DoubleInUnionUnion y -> Jenc.float y | |
| 5189 | + EmptyInUnionUnion y -> encodeEmpty y | |
| 5190 | + | |
| 5191 | +empty : Jdec.Decoder Empty | |
| 5192 | +empty = | |
| 5193 | + Jdec.succeed Empty | |
| 5194 | + | |
| 5195 | +encodeEmpty : Empty -> Jenc.Value | |
| 5196 | +encodeEmpty x = | |
| 5197 | + Jenc.object | |
| 5198 | + [ | |
| 5199 | + ] | |
| 5200 | + | |
| 5201 | +unionEncodeQuickType : Jdec.Decoder UnionEncodeQuickType | |
| 5202 | +unionEncodeQuickType = | |
| 5203 | + Jdec.oneOf | |
| 5204 | + [ Jdec.map DoubleInUnionEncodeQuickType Jdec.float | |
| 5205 | + , Jdec.map EncodeQuickTypeInUnionEncodeQuickType purpleEncodeQuickType | |
| 5206 | + ] | |
| 5207 | + | |
| 5208 | +encodeUnionEncodeQuickType : UnionEncodeQuickType -> Jenc.Value | |
| 5209 | +encodeUnionEncodeQuickType x = case x of | |
| 5210 | + DoubleInUnionEncodeQuickType y -> Jenc.float y | |
| 5211 | + EncodeQuickTypeInUnionEncodeQuickType y -> encodeEncodeQuickType y | |
| 5212 | + | |
| 5213 | +purpleEncodeQuickType : Jdec.Decoder EncodeQuickType | |
| 5214 | +purpleEncodeQuickType = | |
| 5215 | + Jdec.succeed EncodeQuickType | |
| 5216 | + | |
| 5217 | +encodeEncodeQuickType : EncodeQuickType -> Jenc.Value | |
| 5218 | +encodeEncodeQuickType x = | |
| 5219 | + Jenc.object | |
| 5220 | + [ | |
| 5221 | + ] | |
| 5222 | + | |
| 5223 | +unionEnum : Jdec.Decoder UnionEnum | |
| 5224 | +unionEnum = | |
| 5225 | + Jdec.oneOf | |
| 5226 | + [ Jdec.map DoubleInUnionEnum Jdec.float | |
| 5227 | + , Jdec.map EnumInUnionEnum enum | |
| 5228 | + ] | |
| 5229 | + | |
| 5230 | +encodeUnionEnum : UnionEnum -> Jenc.Value | |
| 5231 | +encodeUnionEnum x = case x of | |
| 5232 | + DoubleInUnionEnum y -> Jenc.float y | |
| 5233 | + EnumInUnionEnum y -> encodeEnum y | |
| 5234 | + | |
| 5235 | +enum : Jdec.Decoder Enum | |
| 5236 | +enum = | |
| 5237 | + Jdec.succeed Enum | |
| 5238 | + | |
| 5239 | +encodeEnum : Enum -> Jenc.Value | |
| 5240 | +encodeEnum x = | |
| 5241 | + Jenc.object | |
| 5242 | + [ | |
| 5243 | + ] | |
| 5244 | + | |
| 5245 | +unionEvent : Jdec.Decoder UnionEvent | |
| 5246 | +unionEvent = | |
| 5247 | + Jdec.oneOf | |
| 5248 | + [ Jdec.map DoubleInUnionEvent Jdec.float | |
| 5249 | + , Jdec.map EventInUnionEvent event | |
| 5250 | + ] | |
| 5251 | + | |
| 5252 | +encodeUnionEvent : UnionEvent -> Jenc.Value | |
| 5253 | +encodeUnionEvent x = case x of | |
| 5254 | + DoubleInUnionEvent y -> Jenc.float y | |
| 5255 | + EventInUnionEvent y -> encodeEvent y | |
| 5256 | + | |
| 5257 | +event : Jdec.Decoder Event | |
| 5258 | +event = | |
| 5259 | + Jdec.succeed Event | |
| 5260 | + | |
| 5261 | +encodeEvent : Event -> Jenc.Value | |
| 5262 | +encodeEvent x = | |
| 5263 | + Jenc.object | |
| 5264 | + [ | |
| 5265 | + ] | |
| 5266 | + | |
| 5267 | +unionExcept : Jdec.Decoder UnionExcept | |
| 5268 | +unionExcept = | |
| 5269 | + Jdec.oneOf | |
| 5270 | + [ Jdec.map DoubleInUnionExcept Jdec.float | |
| 5271 | + , Jdec.map ExceptInUnionExcept except | |
| 5272 | + ] | |
| 5273 | + | |
| 5274 | +encodeUnionExcept : UnionExcept -> Jenc.Value | |
| 5275 | +encodeUnionExcept x = case x of | |
| 5276 | + DoubleInUnionExcept y -> Jenc.float y | |
| 5277 | + ExceptInUnionExcept y -> encodeExcept y | |
| 5278 | + | |
| 5279 | +except : Jdec.Decoder Except | |
| 5280 | +except = | |
| 5281 | + Jdec.succeed Except | |
| 5282 | + | |
| 5283 | +encodeExcept : Except -> Jenc.Value | |
| 5284 | +encodeExcept x = | |
| 5285 | + Jenc.object | |
| 5286 | + [ | |
| 5287 | + ] | |
| 5288 | + | |
| 5289 | +unionException : Jdec.Decoder UnionException | |
| 5290 | +unionException = | |
| 5291 | + Jdec.oneOf | |
| 5292 | + [ Jdec.map DoubleInUnionException Jdec.float | |
| 5293 | + , Jdec.map ExceptionInUnionException exception | |
| 5294 | + ] | |
| 5295 | + | |
| 5296 | +encodeUnionException : UnionException -> Jenc.Value | |
| 5297 | +encodeUnionException x = case x of | |
| 5298 | + DoubleInUnionException y -> Jenc.float y | |
| 5299 | + ExceptionInUnionException y -> encodeException y | |
| 5300 | + | |
| 5301 | +exception : Jdec.Decoder Exception | |
| 5302 | +exception = | |
| 5303 | + Jdec.succeed Exception | |
| 5304 | + | |
| 5305 | +encodeException : Exception -> Jenc.Value | |
| 5306 | +encodeException x = | |
| 5307 | + Jenc.object | |
| 5308 | + [ | |
| 5309 | + ] | |
| 5310 | + | |
| 5311 | +unionExplicit : Jdec.Decoder UnionExplicit | |
| 5312 | +unionExplicit = | |
| 5313 | + Jdec.oneOf | |
| 5314 | + [ Jdec.map DoubleInUnionExplicit Jdec.float | |
| 5315 | + , Jdec.map ExplicitInUnionExplicit explicit | |
| 5316 | + ] | |
| 5317 | + | |
| 5318 | +encodeUnionExplicit : UnionExplicit -> Jenc.Value | |
| 5319 | +encodeUnionExplicit x = case x of | |
| 5320 | + DoubleInUnionExplicit y -> Jenc.float y | |
| 5321 | + ExplicitInUnionExplicit y -> encodeExplicit y | |
| 5322 | + | |
| 5323 | +explicit : Jdec.Decoder Explicit | |
| 5324 | +explicit = | |
| 5325 | + Jdec.succeed Explicit | |
| 5326 | + | |
| 5327 | +encodeExplicit : Explicit -> Jenc.Value | |
| 5328 | +encodeExplicit x = | |
| 5329 | + Jenc.object | |
| 5330 | + [ | |
| 5331 | + ] | |
| 5332 | + | |
| 5333 | +unionExport : Jdec.Decoder UnionExport | |
| 5334 | +unionExport = | |
| 5335 | + Jdec.oneOf | |
| 5336 | + [ Jdec.map DoubleInUnionExport Jdec.float | |
| 5337 | + , Jdec.map ExportInUnionExport export | |
| 5338 | + ] | |
| 5339 | + | |
| 5340 | +encodeUnionExport : UnionExport -> Jenc.Value | |
| 5341 | +encodeUnionExport x = case x of | |
| 5342 | + DoubleInUnionExport y -> Jenc.float y | |
| 5343 | + ExportInUnionExport y -> encodeExport y | |
| 5344 | + | |
| 5345 | +export : Jdec.Decoder Export | |
| 5346 | +export = | |
| 5347 | + Jdec.succeed Export | |
| 5348 | + | |
| 5349 | +encodeExport : Export -> Jenc.Value | |
| 5350 | +encodeExport x = | |
| 5351 | + Jenc.object | |
| 5352 | + [ | |
| 5353 | + ] | |
| 5354 | + | |
| 5355 | +unionExtends : Jdec.Decoder UnionExtends | |
| 5356 | +unionExtends = | |
| 5357 | + Jdec.oneOf | |
| 5358 | + [ Jdec.map DoubleInUnionExtends Jdec.float | |
| 5359 | + , Jdec.map ExtendsInUnionExtends extends | |
| 5360 | + ] | |
| 5361 | + | |
| 5362 | +encodeUnionExtends : UnionExtends -> Jenc.Value | |
| 5363 | +encodeUnionExtends x = case x of | |
| 5364 | + DoubleInUnionExtends y -> Jenc.float y | |
| 5365 | + ExtendsInUnionExtends y -> encodeExtends y | |
| 5366 | + | |
| 5367 | +extends : Jdec.Decoder Extends | |
| 5368 | +extends = | |
| 5369 | + Jdec.succeed Extends | |
| 5370 | + | |
| 5371 | +encodeExtends : Extends -> Jenc.Value | |
| 5372 | +encodeExtends x = | |
| 5373 | + Jenc.object | |
| 5374 | + [ | |
| 5375 | + ] | |
| 5376 | + | |
| 5377 | +unionExtension : Jdec.Decoder UnionExtension | |
| 5378 | +unionExtension = | |
| 5379 | + Jdec.oneOf | |
| 5380 | + [ Jdec.map DoubleInUnionExtension Jdec.float | |
| 5381 | + , Jdec.map ExtensionInUnionExtension extension | |
| 5382 | + ] | |
| 5383 | + | |
| 5384 | +encodeUnionExtension : UnionExtension -> Jenc.Value | |
| 5385 | +encodeUnionExtension x = case x of | |
| 5386 | + DoubleInUnionExtension y -> Jenc.float y | |
| 5387 | + ExtensionInUnionExtension y -> encodeExtension y | |
| 5388 | + | |
| 5389 | +extension : Jdec.Decoder Extension | |
| 5390 | +extension = | |
| 5391 | + Jdec.succeed Extension | |
| 5392 | + | |
| 5393 | +encodeExtension : Extension -> Jenc.Value | |
| 5394 | +encodeExtension x = | |
| 5395 | + Jenc.object | |
| 5396 | + [ | |
| 5397 | + ] | |
| 5398 | + | |
| 5399 | +unionExtern : Jdec.Decoder UnionExtern | |
| 5400 | +unionExtern = | |
| 5401 | + Jdec.oneOf | |
| 5402 | + [ Jdec.map DoubleInUnionExtern Jdec.float | |
| 5403 | + , Jdec.map ExternInUnionExtern extern | |
| 5404 | + ] | |
| 5405 | + | |
| 5406 | +encodeUnionExtern : UnionExtern -> Jenc.Value | |
| 5407 | +encodeUnionExtern x = case x of | |
| 5408 | + DoubleInUnionExtern y -> Jenc.float y | |
| 5409 | + ExternInUnionExtern y -> encodeExtern y | |
| 5410 | + | |
| 5411 | +extern : Jdec.Decoder Extern | |
| 5412 | +extern = | |
| 5413 | + Jdec.succeed Extern | |
| 5414 | + | |
| 5415 | +encodeExtern : Extern -> Jenc.Value | |
| 5416 | +encodeExtern x = | |
| 5417 | + Jenc.object | |
| 5418 | + [ | |
| 5419 | + ] | |
| 5420 | + | |
| 5421 | +unionFallthrough : Jdec.Decoder UnionFallthrough | |
| 5422 | +unionFallthrough = | |
| 5423 | + Jdec.oneOf | |
| 5424 | + [ Jdec.map DoubleInUnionFallthrough Jdec.float | |
| 5425 | + , Jdec.map FallthroughInUnionFallthrough fallthrough | |
| 5426 | + ] | |
| 5427 | + | |
| 5428 | +encodeUnionFallthrough : UnionFallthrough -> Jenc.Value | |
| 5429 | +encodeUnionFallthrough x = case x of | |
| 5430 | + DoubleInUnionFallthrough y -> Jenc.float y | |
| 5431 | + FallthroughInUnionFallthrough y -> encodeFallthrough y | |
| 5432 | + | |
| 5433 | +fallthrough : Jdec.Decoder Fallthrough | |
| 5434 | +fallthrough = | |
| 5435 | + Jdec.succeed Fallthrough | |
| 5436 | + | |
| 5437 | +encodeFallthrough : Fallthrough -> Jenc.Value | |
| 5438 | +encodeFallthrough x = | |
| 5439 | + Jenc.object | |
| 5440 | + [ | |
| 5441 | + ] | |
| 5442 | + | |
| 5443 | +unionFalse : Jdec.Decoder UnionFalse | |
| 5444 | +unionFalse = | |
| 5445 | + Jdec.oneOf | |
| 5446 | + [ Jdec.map DoubleInUnionFalse Jdec.float | |
| 5447 | + , Jdec.map FalseClassInUnionFalse falseClass | |
| 5448 | + ] | |
| 5449 | + | |
| 5450 | +encodeUnionFalse : UnionFalse -> Jenc.Value | |
| 5451 | +encodeUnionFalse x = case x of | |
| 5452 | + DoubleInUnionFalse y -> Jenc.float y | |
| 5453 | + FalseClassInUnionFalse y -> encodeFalseClass y | |
| 5454 | + | |
| 5455 | +falseClass : Jdec.Decoder FalseClass | |
| 5456 | +falseClass = | |
| 5457 | + Jdec.succeed FalseClass | |
| 5458 | + | |
| 5459 | +encodeFalseClass : FalseClass -> Jenc.Value | |
| 5460 | +encodeFalseClass x = | |
| 5461 | + Jenc.object | |
| 5462 | + [ | |
| 5463 | + ] | |
| 5464 | + | |
| 5465 | +unionFileprivate : Jdec.Decoder UnionFileprivate | |
| 5466 | +unionFileprivate = | |
| 5467 | + Jdec.oneOf | |
| 5468 | + [ Jdec.map DoubleInUnionFileprivate Jdec.float | |
| 5469 | + , Jdec.map FileprivateInUnionFileprivate fileprivate | |
| 5470 | + ] | |
| 5471 | + | |
| 5472 | +encodeUnionFileprivate : UnionFileprivate -> Jenc.Value | |
| 5473 | +encodeUnionFileprivate x = case x of | |
| 5474 | + DoubleInUnionFileprivate y -> Jenc.float y | |
| 5475 | + FileprivateInUnionFileprivate y -> encodeFileprivate y | |
| 5476 | + | |
| 5477 | +fileprivate : Jdec.Decoder Fileprivate | |
| 5478 | +fileprivate = | |
| 5479 | + Jdec.succeed Fileprivate | |
| 5480 | + | |
| 5481 | +encodeFileprivate : Fileprivate -> Jenc.Value | |
| 5482 | +encodeFileprivate x = | |
| 5483 | + Jenc.object | |
| 5484 | + [ | |
| 5485 | + ] | |
| 5486 | + | |
| 5487 | +unionFinal : Jdec.Decoder UnionFinal | |
| 5488 | +unionFinal = | |
| 5489 | + Jdec.oneOf | |
| 5490 | + [ Jdec.map DoubleInUnionFinal Jdec.float | |
| 5491 | + , Jdec.map FinalInUnionFinal final | |
| 5492 | + ] | |
| 5493 | + | |
| 5494 | +encodeUnionFinal : UnionFinal -> Jenc.Value | |
| 5495 | +encodeUnionFinal x = case x of | |
| 5496 | + DoubleInUnionFinal y -> Jenc.float y | |
| 5497 | + FinalInUnionFinal y -> encodeFinal y | |
| 5498 | + | |
| 5499 | +final : Jdec.Decoder Final | |
| 5500 | +final = | |
| 5501 | + Jdec.succeed Final | |
| 5502 | + | |
| 5503 | +encodeFinal : Final -> Jenc.Value | |
| 5504 | +encodeFinal x = | |
| 5505 | + Jenc.object | |
| 5506 | + [ | |
| 5507 | + ] | |
| 5508 | + | |
| 5509 | +unionFinally : Jdec.Decoder UnionFinally | |
| 5510 | +unionFinally = | |
| 5511 | + Jdec.oneOf | |
| 5512 | + [ Jdec.map DoubleInUnionFinally Jdec.float | |
| 5513 | + , Jdec.map FinallyInUnionFinally finally | |
| 5514 | + ] | |
| 5515 | + | |
| 5516 | +encodeUnionFinally : UnionFinally -> Jenc.Value | |
| 5517 | +encodeUnionFinally x = case x of | |
| 5518 | + DoubleInUnionFinally y -> Jenc.float y | |
| 5519 | + FinallyInUnionFinally y -> encodeFinally y | |
| 5520 | + | |
| 5521 | +finally : Jdec.Decoder Finally | |
| 5522 | +finally = | |
| 5523 | + Jdec.succeed Finally | |
| 5524 | + | |
| 5525 | +encodeFinally : Finally -> Jenc.Value | |
| 5526 | +encodeFinally x = | |
| 5527 | + Jenc.object | |
| 5528 | + [ | |
| 5529 | + ] | |
| 5530 | + | |
| 5531 | +unionFixed : Jdec.Decoder UnionFixed | |
| 5532 | +unionFixed = | |
| 5533 | + Jdec.oneOf | |
| 5534 | + [ Jdec.map DoubleInUnionFixed Jdec.float | |
| 5535 | + , Jdec.map FixedInUnionFixed fixed | |
| 5536 | + ] | |
| 5537 | + | |
| 5538 | +encodeUnionFixed : UnionFixed -> Jenc.Value | |
| 5539 | +encodeUnionFixed x = case x of | |
| 5540 | + DoubleInUnionFixed y -> Jenc.float y | |
| 5541 | + FixedInUnionFixed y -> encodeFixed y | |
| 5542 | + | |
| 5543 | +fixed : Jdec.Decoder Fixed | |
| 5544 | +fixed = | |
| 5545 | + Jdec.succeed Fixed | |
| 5546 | + | |
| 5547 | +encodeFixed : Fixed -> Jenc.Value | |
| 5548 | +encodeFixed x = | |
| 5549 | + Jenc.object | |
| 5550 | + [ | |
| 5551 | + ] | |
| 5552 | + | |
| 5553 | +unionFor : Jdec.Decoder UnionFor | |
| 5554 | +unionFor = | |
| 5555 | + Jdec.oneOf | |
| 5556 | + [ Jdec.map DoubleInUnionFor Jdec.float | |
| 5557 | + , Jdec.map ForInUnionFor for | |
| 5558 | + ] | |
| 5559 | + | |
| 5560 | +encodeUnionFor : UnionFor -> Jenc.Value | |
| 5561 | +encodeUnionFor x = case x of | |
| 5562 | + DoubleInUnionFor y -> Jenc.float y | |
| 5563 | + ForInUnionFor y -> encodeFor y | |
| 5564 | + | |
| 5565 | +for : Jdec.Decoder For | |
| 5566 | +for = | |
| 5567 | + Jdec.succeed For | |
| 5568 | + | |
| 5569 | +encodeFor : For -> Jenc.Value | |
| 5570 | +encodeFor x = | |
| 5571 | + Jenc.object | |
| 5572 | + [ | |
| 5573 | + ] | |
| 5574 | + | |
| 5575 | +unionForeach : Jdec.Decoder UnionForeach | |
| 5576 | +unionForeach = | |
| 5577 | + Jdec.oneOf | |
| 5578 | + [ Jdec.map DoubleInUnionForeach Jdec.float | |
| 5579 | + , Jdec.map ForeachInUnionForeach foreach | |
| 5580 | + ] | |
| 5581 | + | |
| 5582 | +encodeUnionForeach : UnionForeach -> Jenc.Value | |
| 5583 | +encodeUnionForeach x = case x of | |
| 5584 | + DoubleInUnionForeach y -> Jenc.float y | |
| 5585 | + ForeachInUnionForeach y -> encodeForeach y | |
| 5586 | + | |
| 5587 | +foreach : Jdec.Decoder Foreach | |
| 5588 | +foreach = | |
| 5589 | + Jdec.succeed Foreach | |
| 5590 | + | |
| 5591 | +encodeForeach : Foreach -> Jenc.Value | |
| 5592 | +encodeForeach x = | |
| 5593 | + Jenc.object | |
| 5594 | + [ | |
| 5595 | + ] | |
| 5596 | + | |
| 5597 | +unionFriend : Jdec.Decoder UnionFriend | |
| 5598 | +unionFriend = | |
| 5599 | + Jdec.oneOf | |
| 5600 | + [ Jdec.map DoubleInUnionFriend Jdec.float | |
| 5601 | + , Jdec.map FriendInUnionFriend friend | |
| 5602 | + ] | |
| 5603 | + | |
| 5604 | +encodeUnionFriend : UnionFriend -> Jenc.Value | |
| 5605 | +encodeUnionFriend x = case x of | |
| 5606 | + DoubleInUnionFriend y -> Jenc.float y | |
| 5607 | + FriendInUnionFriend y -> encodeFriend y | |
| 5608 | + | |
| 5609 | +friend : Jdec.Decoder Friend | |
| 5610 | +friend = | |
| 5611 | + Jdec.succeed Friend | |
| 5612 | + | |
| 5613 | +encodeFriend : Friend -> Jenc.Value | |
| 5614 | +encodeFriend x = | |
| 5615 | + Jenc.object | |
| 5616 | + [ | |
| 5617 | + ] | |
| 5618 | + | |
| 5619 | +unionFrom : Jdec.Decoder UnionFrom | |
| 5620 | +unionFrom = | |
| 5621 | + Jdec.oneOf | |
| 5622 | + [ Jdec.map DoubleInUnionFrom Jdec.float | |
| 5623 | + , Jdec.map FromInUnionFrom from | |
| 5624 | + ] | |
| 5625 | + | |
| 5626 | +encodeUnionFrom : UnionFrom -> Jenc.Value | |
| 5627 | +encodeUnionFrom x = case x of | |
| 5628 | + DoubleInUnionFrom y -> Jenc.float y | |
| 5629 | + FromInUnionFrom y -> encodeFrom y | |
| 5630 | + | |
| 5631 | +from : Jdec.Decoder From | |
| 5632 | +from = | |
| 5633 | + Jdec.succeed From | |
| 5634 | + | |
| 5635 | +encodeFrom : From -> Jenc.Value | |
| 5636 | +encodeFrom x = | |
| 5637 | + Jenc.object | |
| 5638 | + [ | |
| 5639 | + ] | |
| 5640 | + | |
| 5641 | +unionFromJSON : Jdec.Decoder UnionFromJSON | |
| 5642 | +unionFromJSON = | |
| 5643 | + Jdec.oneOf | |
| 5644 | + [ Jdec.map DoubleInUnionFromJSON Jdec.float | |
| 5645 | + , Jdec.map FromJSONInUnionFromJSON fromJSON | |
| 5646 | + ] | |
| 5647 | + | |
| 5648 | +encodeUnionFromJSON : UnionFromJSON -> Jenc.Value | |
| 5649 | +encodeUnionFromJSON x = case x of | |
| 5650 | + DoubleInUnionFromJSON y -> Jenc.float y | |
| 5651 | + FromJSONInUnionFromJSON y -> encodeFromJSON y | |
| 5652 | + | |
| 5653 | +fromJSON : Jdec.Decoder FromJSON | |
| 5654 | +fromJSON = | |
| 5655 | + Jdec.succeed FromJSON | |
| 5656 | + | |
| 5657 | +encodeFromJSON : FromJSON -> Jenc.Value | |
| 5658 | +encodeFromJSON x = | |
| 5659 | + Jenc.object | |
| 5660 | + [ | |
| 5661 | + ] | |
| 5662 | + | |
| 5663 | +unionFunc : Jdec.Decoder UnionFunc | |
| 5664 | +unionFunc = | |
| 5665 | + Jdec.oneOf | |
| 5666 | + [ Jdec.map DoubleInUnionFunc Jdec.float | |
| 5667 | + , Jdec.map FuncInUnionFunc func | |
| 5668 | + ] | |
| 5669 | + | |
| 5670 | +encodeUnionFunc : UnionFunc -> Jenc.Value | |
| 5671 | +encodeUnionFunc x = case x of | |
| 5672 | + DoubleInUnionFunc y -> Jenc.float y | |
| 5673 | + FuncInUnionFunc y -> encodeFunc y | |
| 5674 | + | |
| 5675 | +func : Jdec.Decoder Func | |
| 5676 | +func = | |
| 5677 | + Jdec.succeed Func | |
| 5678 | + | |
| 5679 | +encodeFunc : Func -> Jenc.Value | |
| 5680 | +encodeFunc x = | |
| 5681 | + Jenc.object | |
| 5682 | + [ | |
| 5683 | + ] | |
| 5684 | + | |
| 5685 | +unionFunction : Jdec.Decoder UnionFunction | |
| 5686 | +unionFunction = | |
| 5687 | + Jdec.oneOf | |
| 5688 | + [ Jdec.map DoubleInUnionFunction Jdec.float | |
| 5689 | + , Jdec.map FunctionInUnionFunction function | |
| 5690 | + ] | |
| 5691 | + | |
| 5692 | +encodeUnionFunction : UnionFunction -> Jenc.Value | |
| 5693 | +encodeUnionFunction x = case x of | |
| 5694 | + DoubleInUnionFunction y -> Jenc.float y | |
| 5695 | + FunctionInUnionFunction y -> encodeFunction y | |
| 5696 | + | |
| 5697 | +function : Jdec.Decoder Function | |
| 5698 | +function = | |
| 5699 | + Jdec.succeed Function | |
| 5700 | + | |
| 5701 | +encodeFunction : Function -> Jenc.Value | |
| 5702 | +encodeFunction x = | |
| 5703 | + Jenc.object | |
| 5704 | + [ | |
| 5705 | + ] | |
| 5706 | + | |
| 5707 | +unionGet : Jdec.Decoder UnionGet | |
| 5708 | +unionGet = | |
| 5709 | + Jdec.oneOf | |
| 5710 | + [ Jdec.map DoubleInUnionGet Jdec.float | |
| 5711 | + , Jdec.map GetInUnionGet get | |
| 5712 | + ] | |
| 5713 | + | |
| 5714 | +encodeUnionGet : UnionGet -> Jenc.Value | |
| 5715 | +encodeUnionGet x = case x of | |
| 5716 | + DoubleInUnionGet y -> Jenc.float y | |
| 5717 | + GetInUnionGet y -> encodeGet y | |
| 5718 | + | |
| 5719 | +get : Jdec.Decoder Get | |
| 5720 | +get = | |
| 5721 | + Jdec.succeed Get | |
| 5722 | + | |
| 5723 | +encodeGet : Get -> Jenc.Value | |
| 5724 | +encodeGet x = | |
| 5725 | + Jenc.object | |
| 5726 | + [ | |
| 5727 | + ] | |
| 5728 | + | |
| 5729 | +unionGlobal : Jdec.Decoder UnionGlobal | |
| 5730 | +unionGlobal = | |
| 5731 | + Jdec.oneOf | |
| 5732 | + [ Jdec.map DoubleInUnionGlobal Jdec.float | |
| 5733 | + , Jdec.map GlobalInUnionGlobal global | |
| 5734 | + ] | |
| 5735 | + | |
| 5736 | +encodeUnionGlobal : UnionGlobal -> Jenc.Value | |
| 5737 | +encodeUnionGlobal x = case x of | |
| 5738 | + DoubleInUnionGlobal y -> Jenc.float y | |
| 5739 | + GlobalInUnionGlobal y -> encodeGlobal y | |
| 5740 | + | |
| 5741 | +global : Jdec.Decoder Global | |
| 5742 | +global = | |
| 5743 | + Jdec.succeed Global | |
| 5744 | + | |
| 5745 | +encodeGlobal : Global -> Jenc.Value | |
| 5746 | +encodeGlobal x = | |
| 5747 | + Jenc.object | |
| 5748 | + [ | |
| 5749 | + ] | |
| 5750 | + | |
| 5751 | +unionGo : Jdec.Decoder UnionGo | |
| 5752 | +unionGo = | |
| 5753 | + Jdec.oneOf | |
| 5754 | + [ Jdec.map DoubleInUnionGo Jdec.float | |
| 5755 | + , Jdec.map GoInUnionGo go | |
| 5756 | + ] | |
| 5757 | + | |
| 5758 | +encodeUnionGo : UnionGo -> Jenc.Value | |
| 5759 | +encodeUnionGo x = case x of | |
| 5760 | + DoubleInUnionGo y -> Jenc.float y | |
| 5761 | + GoInUnionGo y -> encodeGo y | |
| 5762 | + | |
| 5763 | +go : Jdec.Decoder Go | |
| 5764 | +go = | |
| 5765 | + Jdec.succeed Go | |
| 5766 | + | |
| 5767 | +encodeGo : Go -> Jenc.Value | |
| 5768 | +encodeGo x = | |
| 5769 | + Jenc.object | |
| 5770 | + [ | |
| 5771 | + ] | |
| 5772 | + | |
| 5773 | +unionGoto : Jdec.Decoder UnionGoto | |
| 5774 | +unionGoto = | |
| 5775 | + Jdec.oneOf | |
| 5776 | + [ Jdec.map DoubleInUnionGoto Jdec.float | |
| 5777 | + , Jdec.map GotoInUnionGoto goto | |
| 5778 | + ] | |
| 5779 | + | |
| 5780 | +encodeUnionGoto : UnionGoto -> Jenc.Value | |
| 5781 | +encodeUnionGoto x = case x of | |
| 5782 | + DoubleInUnionGoto y -> Jenc.float y | |
| 5783 | + GotoInUnionGoto y -> encodeGoto y | |
| 5784 | + | |
| 5785 | +goto : Jdec.Decoder Goto | |
| 5786 | +goto = | |
| 5787 | + Jdec.succeed Goto | |
| 5788 | + | |
| 5789 | +encodeGoto : Goto -> Jenc.Value | |
| 5790 | +encodeGoto x = | |
| 5791 | + Jenc.object | |
| 5792 | + [ | |
| 5793 | + ] | |
| 5794 | + | |
| 5795 | +unionGuard : Jdec.Decoder UnionGuard | |
| 5796 | +unionGuard = | |
| 5797 | + Jdec.oneOf | |
| 5798 | + [ Jdec.map DoubleInUnionGuard Jdec.float | |
| 5799 | + , Jdec.map GuardInUnionGuard guard | |
| 5800 | + ] | |
| 5801 | + | |
| 5802 | +encodeUnionGuard : UnionGuard -> Jenc.Value | |
| 5803 | +encodeUnionGuard x = case x of | |
| 5804 | + DoubleInUnionGuard y -> Jenc.float y | |
| 5805 | + GuardInUnionGuard y -> encodeGuard y | |
| 5806 | + | |
| 5807 | +guard : Jdec.Decoder Guard | |
| 5808 | +guard = | |
| 5809 | + Jdec.succeed Guard | |
| 5810 | + | |
| 5811 | +encodeGuard : Guard -> Jenc.Value | |
| 5812 | +encodeGuard x = | |
| 5813 | + Jenc.object | |
| 5814 | + [ | |
| 5815 | + ] | |
| 5816 | + | |
| 5817 | +unionHasOwnProperty : Jdec.Decoder UnionHasOwnProperty | |
| 5818 | +unionHasOwnProperty = | |
| 5819 | + Jdec.oneOf | |
| 5820 | + [ Jdec.map DoubleInUnionHasOwnProperty Jdec.float | |
| 5821 | + , Jdec.map HasOwnPropertyInUnionHasOwnProperty hasOwnProperty | |
| 5822 | + ] | |
| 5823 | + | |
| 5824 | +encodeUnionHasOwnProperty : UnionHasOwnProperty -> Jenc.Value | |
| 5825 | +encodeUnionHasOwnProperty x = case x of | |
| 5826 | + DoubleInUnionHasOwnProperty y -> Jenc.float y | |
| 5827 | + HasOwnPropertyInUnionHasOwnProperty y -> encodeHasOwnProperty y | |
| 5828 | + | |
| 5829 | +hasOwnProperty : Jdec.Decoder HasOwnProperty | |
| 5830 | +hasOwnProperty = | |
| 5831 | + Jdec.succeed HasOwnProperty | |
| 5832 | + | |
| 5833 | +encodeHasOwnProperty : HasOwnProperty -> Jenc.Value | |
| 5834 | +encodeHasOwnProperty x = | |
| 5835 | + Jenc.object | |
| 5836 | + [ | |
| 5837 | + ] | |
| 5838 | + | |
| 5839 | +unionID : Jdec.Decoder UnionID | |
| 5840 | +unionID = | |
| 5841 | + Jdec.oneOf | |
| 5842 | + [ Jdec.map DoubleInUnionID Jdec.float | |
| 5843 | + , Jdec.map IDInUnionID id | |
| 5844 | + ] | |
| 5845 | + | |
| 5846 | +encodeUnionID : UnionID -> Jenc.Value | |
| 5847 | +encodeUnionID x = case x of | |
| 5848 | + DoubleInUnionID y -> Jenc.float y | |
| 5849 | + IDInUnionID y -> encodeID y | |
| 5850 | + | |
| 5851 | +id : Jdec.Decoder ID | |
| 5852 | +id = | |
| 5853 | + Jdec.succeed ID | |
| 5854 | + | |
| 5855 | +encodeID : ID -> Jenc.Value | |
| 5856 | +encodeID x = | |
| 5857 | + Jenc.object | |
| 5858 | + [ | |
| 5859 | + ] | |
| 5860 | + | |
| 5861 | +unionImaginery : Jdec.Decoder UnionImaginery | |
| 5862 | +unionImaginery = | |
| 5863 | + Jdec.oneOf | |
| 5864 | + [ Jdec.map DoubleInUnionImaginery Jdec.float | |
| 5865 | + , Jdec.map ImagineryInUnionImaginery imaginery | |
| 5866 | + ] | |
| 5867 | + | |
| 5868 | +encodeUnionImaginery : UnionImaginery -> Jenc.Value | |
| 5869 | +encodeUnionImaginery x = case x of | |
| 5870 | + DoubleInUnionImaginery y -> Jenc.float y | |
| 5871 | + ImagineryInUnionImaginery y -> encodeImaginery y | |
| 5872 | + | |
| 5873 | +imaginery : Jdec.Decoder Imaginery | |
| 5874 | +imaginery = | |
| 5875 | + Jdec.succeed Imaginery | |
| 5876 | + | |
| 5877 | +encodeImaginery : Imaginery -> Jenc.Value | |
| 5878 | +encodeImaginery x = | |
| 5879 | + Jenc.object | |
| 5880 | + [ | |
| 5881 | + ] | |
| 5882 | + | |
| 5883 | +unionIMP : Jdec.Decoder UnionIMP | |
| 5884 | +unionIMP = | |
| 5885 | + Jdec.oneOf | |
| 5886 | + [ Jdec.map DoubleInUnionIMP Jdec.float | |
| 5887 | + , Jdec.map ImpInUnionIMP imp | |
| 5888 | + ] | |
| 5889 | + | |
| 5890 | +encodeUnionIMP : UnionIMP -> Jenc.Value | |
| 5891 | +encodeUnionIMP x = case x of | |
| 5892 | + DoubleInUnionIMP y -> Jenc.float y | |
| 5893 | + ImpInUnionIMP y -> encodeImp y | |
| 5894 | + | |
| 5895 | +imp : Jdec.Decoder Imp | |
| 5896 | +imp = | |
| 5897 | + Jdec.succeed Imp | |
| 5898 | + | |
| 5899 | +encodeImp : Imp -> Jenc.Value | |
| 5900 | +encodeImp x = | |
| 5901 | + Jenc.object | |
| 5902 | + [ | |
| 5903 | + ] | |
| 5904 | + | |
| 5905 | +unionImplements : Jdec.Decoder UnionImplements | |
| 5906 | +unionImplements = | |
| 5907 | + Jdec.oneOf | |
| 5908 | + [ Jdec.map DoubleInUnionImplements Jdec.float | |
| 5909 | + , Jdec.map ImplementsInUnionImplements implements | |
| 5910 | + ] | |
| 5911 | + | |
| 5912 | +encodeUnionImplements : UnionImplements -> Jenc.Value | |
| 5913 | +encodeUnionImplements x = case x of | |
| 5914 | + DoubleInUnionImplements y -> Jenc.float y | |
| 5915 | + ImplementsInUnionImplements y -> encodeImplements y | |
| 5916 | + | |
| 5917 | +implements : Jdec.Decoder Implements | |
| 5918 | +implements = | |
| 5919 | + Jdec.succeed Implements | |
| 5920 | + | |
| 5921 | +encodeImplements : Implements -> Jenc.Value | |
| 5922 | +encodeImplements x = | |
| 5923 | + Jenc.object | |
| 5924 | + [ | |
| 5925 | + ] | |
| 5926 | + | |
| 5927 | +unionImplicit : Jdec.Decoder UnionImplicit | |
| 5928 | +unionImplicit = | |
| 5929 | + Jdec.oneOf | |
| 5930 | + [ Jdec.map DoubleInUnionImplicit Jdec.float | |
| 5931 | + , Jdec.map ImplicitInUnionImplicit implicit | |
| 5932 | + ] | |
| 5933 | + | |
| 5934 | +encodeUnionImplicit : UnionImplicit -> Jenc.Value | |
| 5935 | +encodeUnionImplicit x = case x of | |
| 5936 | + DoubleInUnionImplicit y -> Jenc.float y | |
| 5937 | + ImplicitInUnionImplicit y -> encodeImplicit y | |
| 5938 | + | |
| 5939 | +implicit : Jdec.Decoder Implicit | |
| 5940 | +implicit = | |
| 5941 | + Jdec.succeed Implicit | |
| 5942 | + | |
| 5943 | +encodeImplicit : Implicit -> Jenc.Value | |
| 5944 | +encodeImplicit x = | |
| 5945 | + Jenc.object | |
| 5946 | + [ | |
| 5947 | + ] | |
| 5948 | + | |
| 5949 | +unionIndirect : Jdec.Decoder UnionIndirect | |
| 5950 | +unionIndirect = | |
| 5951 | + Jdec.oneOf | |
| 5952 | + [ Jdec.map DoubleInUnionIndirect Jdec.float | |
| 5953 | + , Jdec.map IndirectInUnionIndirect indirect | |
| 5954 | + ] | |
| 5955 | + | |
| 5956 | +encodeUnionIndirect : UnionIndirect -> Jenc.Value | |
| 5957 | +encodeUnionIndirect x = case x of | |
| 5958 | + DoubleInUnionIndirect y -> Jenc.float y | |
| 5959 | + IndirectInUnionIndirect y -> encodeIndirect y | |
| 5960 | + | |
| 5961 | +indirect : Jdec.Decoder Indirect | |
| 5962 | +indirect = | |
| 5963 | + Jdec.succeed Indirect | |
| 5964 | + | |
| 5965 | +encodeIndirect : Indirect -> Jenc.Value | |
| 5966 | +encodeIndirect x = | |
| 5967 | + Jenc.object | |
| 5968 | + [ | |
| 5969 | + ] | |
| 5970 | + | |
| 5971 | +unionInit : Jdec.Decoder UnionInit | |
| 5972 | +unionInit = | |
| 5973 | + Jdec.oneOf | |
| 5974 | + [ Jdec.map DoubleInUnionInit Jdec.float | |
| 5975 | + , Jdec.map InitInUnionInit init | |
| 5976 | + ] | |
| 5977 | + | |
| 5978 | +encodeUnionInit : UnionInit -> Jenc.Value | |
| 5979 | +encodeUnionInit x = case x of | |
| 5980 | + DoubleInUnionInit y -> Jenc.float y | |
| 5981 | + InitInUnionInit y -> encodeInit y | |
| 5982 | + | |
| 5983 | +init : Jdec.Decoder Init | |
| 5984 | +init = | |
| 5985 | + Jdec.succeed Init | |
| 5986 | + | |
| 5987 | +encodeInit : Init -> Jenc.Value | |
| 5988 | +encodeInit x = | |
| 5989 | + Jenc.object | |
| 5990 | + [ | |
| 5991 | + ] | |
| 5992 | + | |
| 5993 | +unionInline : Jdec.Decoder UnionInline | |
| 5994 | +unionInline = | |
| 5995 | + Jdec.oneOf | |
| 5996 | + [ Jdec.map DoubleInUnionInline Jdec.float | |
| 5997 | + , Jdec.map InlineInUnionInline inline | |
| 5998 | + ] | |
| 5999 | + | |
| 6000 | +encodeUnionInline : UnionInline -> Jenc.Value | |
| 6001 | +encodeUnionInline x = case x of | |
| 6002 | + DoubleInUnionInline y -> Jenc.float y | |
| 6003 | + InlineInUnionInline y -> encodeInline y | |
| 6004 | + | |
| 6005 | +inline : Jdec.Decoder Inline | |
| 6006 | +inline = | |
| 6007 | + Jdec.succeed Inline | |
| 6008 | + | |
| 6009 | +encodeInline : Inline -> Jenc.Value | |
| 6010 | +encodeInline x = | |
| 6011 | + Jenc.object | |
| 6012 | + [ | |
| 6013 | + ] | |
| 6014 | + | |
| 6015 | +unionInout : Jdec.Decoder UnionInout | |
| 6016 | +unionInout = | |
| 6017 | + Jdec.oneOf | |
| 6018 | + [ Jdec.map DoubleInUnionInout Jdec.float | |
| 6019 | + , Jdec.map InoutInUnionInout inout | |
| 6020 | + ] | |
| 6021 | + | |
| 6022 | +encodeUnionInout : UnionInout -> Jenc.Value | |
| 6023 | +encodeUnionInout x = case x of | |
| 6024 | + DoubleInUnionInout y -> Jenc.float y | |
| 6025 | + InoutInUnionInout y -> encodeInout y | |
| 6026 | + | |
| 6027 | +inout : Jdec.Decoder Inout | |
| 6028 | +inout = | |
| 6029 | + Jdec.succeed Inout | |
| 6030 | + | |
| 6031 | +encodeInout : Inout -> Jenc.Value | |
| 6032 | +encodeInout x = | |
| 6033 | + Jenc.object | |
| 6034 | + [ | |
| 6035 | + ] | |
| 6036 | + | |
| 6037 | +unionInstanceof : Jdec.Decoder UnionInstanceof | |
| 6038 | +unionInstanceof = | |
| 6039 | + Jdec.oneOf | |
| 6040 | + [ Jdec.map DoubleInUnionInstanceof Jdec.float | |
| 6041 | + , Jdec.map InstanceofInUnionInstanceof instanceof | |
| 6042 | + ] | |
| 6043 | + | |
| 6044 | +encodeUnionInstanceof : UnionInstanceof -> Jenc.Value | |
| 6045 | +encodeUnionInstanceof x = case x of | |
| 6046 | + DoubleInUnionInstanceof y -> Jenc.float y | |
| 6047 | + InstanceofInUnionInstanceof y -> encodeInstanceof y | |
| 6048 | + | |
| 6049 | +instanceof : Jdec.Decoder Instanceof | |
| 6050 | +instanceof = | |
| 6051 | + Jdec.succeed Instanceof | |
| 6052 | + | |
| 6053 | +encodeInstanceof : Instanceof -> Jenc.Value | |
| 6054 | +encodeInstanceof x = | |
| 6055 | + Jenc.object | |
| 6056 | + [ | |
| 6057 | + ] | |
| 6058 | + | |
| 6059 | +unionInterface : Jdec.Decoder UnionInterface | |
| 6060 | +unionInterface = | |
| 6061 | + Jdec.oneOf | |
| 6062 | + [ Jdec.map DoubleInUnionInterface Jdec.float | |
| 6063 | + , Jdec.map InterfaceInUnionInterface interface | |
| 6064 | + ] | |
| 6065 | + | |
| 6066 | +encodeUnionInterface : UnionInterface -> Jenc.Value | |
| 6067 | +encodeUnionInterface x = case x of | |
| 6068 | + DoubleInUnionInterface y -> Jenc.float y | |
| 6069 | + InterfaceInUnionInterface y -> encodeInterface y | |
| 6070 | + | |
| 6071 | +interface : Jdec.Decoder Interface | |
| 6072 | +interface = | |
| 6073 | + Jdec.succeed Interface | |
| 6074 | + | |
| 6075 | +encodeInterface : Interface -> Jenc.Value | |
| 6076 | +encodeInterface x = | |
| 6077 | + Jenc.object | |
| 6078 | + [ | |
| 6079 | + ] | |
| 6080 | + | |
| 6081 | +unionInternal : Jdec.Decoder UnionInternal | |
| 6082 | +unionInternal = | |
| 6083 | + Jdec.oneOf | |
| 6084 | + [ Jdec.map DoubleInUnionInternal Jdec.float | |
| 6085 | + , Jdec.map InternalInUnionInternal internal | |
| 6086 | + ] | |
| 6087 | + | |
| 6088 | +encodeUnionInternal : UnionInternal -> Jenc.Value | |
| 6089 | +encodeUnionInternal x = case x of | |
| 6090 | + DoubleInUnionInternal y -> Jenc.float y | |
| 6091 | + InternalInUnionInternal y -> encodeInternal y | |
| 6092 | + | |
| 6093 | +internal : Jdec.Decoder Internal | |
| 6094 | +internal = | |
| 6095 | + Jdec.succeed Internal | |
| 6096 | + | |
| 6097 | +encodeInternal : Internal -> Jenc.Value | |
| 6098 | +encodeInternal x = | |
| 6099 | + Jenc.object | |
| 6100 | + [ | |
| 6101 | + ] | |
| 6102 | + | |
| 6103 | +unionIs : Jdec.Decoder UnionIs | |
| 6104 | +unionIs = | |
| 6105 | + Jdec.oneOf | |
| 6106 | + [ Jdec.map DoubleInUnionIs Jdec.float | |
| 6107 | + , Jdec.map IsInUnionIs is | |
| 6108 | + ] | |
| 6109 | + | |
| 6110 | +encodeUnionIs : UnionIs -> Jenc.Value | |
| 6111 | +encodeUnionIs x = case x of | |
| 6112 | + DoubleInUnionIs y -> Jenc.float y | |
| 6113 | + IsInUnionIs y -> encodeIs y | |
| 6114 | + | |
| 6115 | +is : Jdec.Decoder Is | |
| 6116 | +is = | |
| 6117 | + Jdec.succeed Is | |
| 6118 | + | |
| 6119 | +encodeIs : Is -> Jenc.Value | |
| 6120 | +encodeIs x = | |
| 6121 | + Jenc.object | |
| 6122 | + [ | |
| 6123 | + ] | |
| 6124 | + | |
| 6125 | +unionIterable : Jdec.Decoder UnionIterable | |
| 6126 | +unionIterable = | |
| 6127 | + Jdec.oneOf | |
| 6128 | + [ Jdec.map DoubleInUnionIterable Jdec.float | |
| 6129 | + , Jdec.map IterableInUnionIterable iterable | |
| 6130 | + ] | |
| 6131 | + | |
| 6132 | +encodeUnionIterable : UnionIterable -> Jenc.Value | |
| 6133 | +encodeUnionIterable x = case x of | |
| 6134 | + DoubleInUnionIterable y -> Jenc.float y | |
| 6135 | + IterableInUnionIterable y -> encodeIterable y | |
| 6136 | + | |
| 6137 | +iterable : Jdec.Decoder Iterable | |
| 6138 | +iterable = | |
| 6139 | + Jdec.succeed Iterable | |
| 6140 | + | |
| 6141 | +encodeIterable : Iterable -> Jenc.Value | |
| 6142 | +encodeIterable x = | |
| 6143 | + Jenc.object | |
| 6144 | + [ | |
| 6145 | + ] | |
| 6146 | + | |
| 6147 | +unionJdec : Jdec.Decoder UnionJdec | |
| 6148 | +unionJdec = | |
| 6149 | + Jdec.oneOf | |
| 6150 | + [ Jdec.map DoubleInUnionJdec Jdec.float | |
| 6151 | + , Jdec.map JdecClassInUnionJdec jdecClass | |
| 6152 | + ] | |
| 6153 | + | |
| 6154 | +encodeUnionJdec : UnionJdec -> Jenc.Value | |
| 6155 | +encodeUnionJdec x = case x of | |
| 6156 | + DoubleInUnionJdec y -> Jenc.float y | |
| 6157 | + JdecClassInUnionJdec y -> encodeJdecClass y | |
| 6158 | + | |
| 6159 | +jdecClass : Jdec.Decoder JdecClass | |
| 6160 | +jdecClass = | |
| 6161 | + Jdec.succeed JdecClass | |
| 6162 | + | |
| 6163 | +encodeJdecClass : JdecClass -> Jenc.Value | |
| 6164 | +encodeJdecClass x = | |
| 6165 | + Jenc.object | |
| 6166 | + [ | |
| 6167 | + ] | |
| 6168 | + | |
| 6169 | +unionJenc : Jdec.Decoder UnionJenc | |
| 6170 | +unionJenc = | |
| 6171 | + Jdec.oneOf | |
| 6172 | + [ Jdec.map DoubleInUnionJenc Jdec.float | |
| 6173 | + , Jdec.map JencClassInUnionJenc jencClass | |
| 6174 | + ] | |
| 6175 | + | |
| 6176 | +encodeUnionJenc : UnionJenc -> Jenc.Value | |
| 6177 | +encodeUnionJenc x = case x of | |
| 6178 | + DoubleInUnionJenc y -> Jenc.float y | |
| 6179 | + JencClassInUnionJenc y -> encodeJencClass y | |
| 6180 | + | |
| 6181 | +jencClass : Jdec.Decoder JencClass | |
| 6182 | +jencClass = | |
| 6183 | + Jdec.succeed JencClass | |
| 6184 | + | |
| 6185 | +encodeJencClass : JencClass -> Jenc.Value | |
| 6186 | +encodeJencClass x = | |
| 6187 | + Jenc.object | |
| 6188 | + [ | |
| 6189 | + ] | |
| 6190 | + | |
| 6191 | +unionJpipe : Jdec.Decoder UnionJpipe | |
| 6192 | +unionJpipe = | |
| 6193 | + Jdec.oneOf | |
| 6194 | + [ Jdec.map DoubleInUnionJpipe Jdec.float | |
| 6195 | + , Jdec.map JpipeClassInUnionJpipe jpipeClass | |
| 6196 | + ] | |
| 6197 | + | |
| 6198 | +encodeUnionJpipe : UnionJpipe -> Jenc.Value | |
| 6199 | +encodeUnionJpipe x = case x of | |
| 6200 | + DoubleInUnionJpipe y -> Jenc.float y | |
| 6201 | + JpipeClassInUnionJpipe y -> encodeJpipeClass y | |
| 6202 | + | |
| 6203 | +jpipeClass : Jdec.Decoder JpipeClass | |
| 6204 | +jpipeClass = | |
| 6205 | + Jdec.succeed JpipeClass | |
| 6206 | + | |
| 6207 | +encodeJpipeClass : JpipeClass -> Jenc.Value | |
| 6208 | +encodeJpipeClass x = | |
| 6209 | + Jenc.object | |
| 6210 | + [ | |
| 6211 | + ] | |
| 6212 | + | |
| 6213 | +unionJSON : Jdec.Decoder UnionJSON | |
| 6214 | +unionJSON = | |
| 6215 | + Jdec.oneOf | |
| 6216 | + [ Jdec.map DoubleInUnionJSON Jdec.float | |
| 6217 | + , Jdec.map JSONInUnionJSON json | |
| 6218 | + ] | |
| 6219 | + | |
| 6220 | +encodeUnionJSON : UnionJSON -> Jenc.Value | |
| 6221 | +encodeUnionJSON x = case x of | |
| 6222 | + DoubleInUnionJSON y -> Jenc.float y | |
| 6223 | + JSONInUnionJSON y -> encodeJSON y | |
| 6224 | + | |
| 6225 | +json : Jdec.Decoder JSON | |
| 6226 | +json = | |
| 6227 | + Jdec.succeed JSON | |
| 6228 | + | |
| 6229 | +encodeJSON : JSON -> Jenc.Value | |
| 6230 | +encodeJSON x = | |
| 6231 | + Jenc.object | |
| 6232 | + [ | |
| 6233 | + ] | |
| 6234 | + | |
| 6235 | +unionJSONConverter : Jdec.Decoder UnionJSONConverter | |
| 6236 | +unionJSONConverter = | |
| 6237 | + Jdec.oneOf | |
| 6238 | + [ Jdec.map DoubleInUnionJSONConverter Jdec.float | |
| 6239 | + , Jdec.map JSONConverterInUnionJSONConverter jsonConverter | |
| 6240 | + ] | |
| 6241 | + | |
| 6242 | +encodeUnionJSONConverter : UnionJSONConverter -> Jenc.Value | |
| 6243 | +encodeUnionJSONConverter x = case x of | |
| 6244 | + DoubleInUnionJSONConverter y -> Jenc.float y | |
| 6245 | + JSONConverterInUnionJSONConverter y -> encodeJSONConverter y | |
| 6246 | + | |
| 6247 | +jsonConverter : Jdec.Decoder JSONConverter | |
| 6248 | +jsonConverter = | |
| 6249 | + Jdec.succeed JSONConverter | |
| 6250 | + | |
| 6251 | +encodeJSONConverter : JSONConverter -> Jenc.Value | |
| 6252 | +encodeJSONConverter x = | |
| 6253 | + Jenc.object | |
| 6254 | + [ | |
| 6255 | + ] | |
| 6256 | + | |
| 6257 | +unionJSONSerializer : Jdec.Decoder UnionJSONSerializer | |
| 6258 | +unionJSONSerializer = | |
| 6259 | + Jdec.oneOf | |
| 6260 | + [ Jdec.map DoubleInUnionJSONSerializer Jdec.float | |
| 6261 | + , Jdec.map JSONSerializerInUnionJSONSerializer jsonSerializer | |
| 6262 | + ] | |
| 6263 | + | |
| 6264 | +encodeUnionJSONSerializer : UnionJSONSerializer -> Jenc.Value | |
| 6265 | +encodeUnionJSONSerializer x = case x of | |
| 6266 | + DoubleInUnionJSONSerializer y -> Jenc.float y | |
| 6267 | + JSONSerializerInUnionJSONSerializer y -> encodeJSONSerializer y | |
| 6268 | + | |
| 6269 | +jsonSerializer : Jdec.Decoder JSONSerializer | |
| 6270 | +jsonSerializer = | |
| 6271 | + Jdec.succeed JSONSerializer | |
| 6272 | + | |
| 6273 | +encodeJSONSerializer : JSONSerializer -> Jenc.Value | |
| 6274 | +encodeJSONSerializer x = | |
| 6275 | + Jenc.object | |
| 6276 | + [ | |
| 6277 | + ] | |
| 6278 | + | |
| 6279 | +unionJSONToken : Jdec.Decoder UnionJSONToken | |
| 6280 | +unionJSONToken = | |
| 6281 | + Jdec.oneOf | |
| 6282 | + [ Jdec.map DoubleInUnionJSONToken Jdec.float | |
| 6283 | + , Jdec.map JSONTokenInUnionJSONToken jsonToken | |
| 6284 | + ] | |
| 6285 | + | |
| 6286 | +encodeUnionJSONToken : UnionJSONToken -> Jenc.Value | |
| 6287 | +encodeUnionJSONToken x = case x of | |
| 6288 | + DoubleInUnionJSONToken y -> Jenc.float y | |
| 6289 | + JSONTokenInUnionJSONToken y -> encodeJSONToken y | |
| 6290 | + | |
| 6291 | +jsonToken : Jdec.Decoder JSONToken | |
| 6292 | +jsonToken = | |
| 6293 | + Jdec.succeed JSONToken | |
| 6294 | + | |
| 6295 | +encodeJSONToken : JSONToken -> Jenc.Value | |
| 6296 | +encodeJSONToken x = | |
| 6297 | + Jenc.object | |
| 6298 | + [ | |
| 6299 | + ] | |
| 6300 | + | |
| 6301 | +unionJSONWriter : Jdec.Decoder UnionJSONWriter | |
| 6302 | +unionJSONWriter = | |
| 6303 | + Jdec.oneOf | |
| 6304 | + [ Jdec.map DoubleInUnionJSONWriter Jdec.float | |
| 6305 | + , Jdec.map JSONWriterInUnionJSONWriter jsonWriter | |
| 6306 | + ] | |
| 6307 | + | |
| 6308 | +encodeUnionJSONWriter : UnionJSONWriter -> Jenc.Value | |
| 6309 | +encodeUnionJSONWriter x = case x of | |
| 6310 | + DoubleInUnionJSONWriter y -> Jenc.float y | |
| 6311 | + JSONWriterInUnionJSONWriter y -> encodeJSONWriter y | |
| 6312 | + | |
| 6313 | +jsonWriter : Jdec.Decoder JSONWriter | |
| 6314 | +jsonWriter = | |
| 6315 | + Jdec.succeed JSONWriter | |
| 6316 | + | |
| 6317 | +encodeJSONWriter : JSONWriter -> Jenc.Value | |
| 6318 | +encodeJSONWriter x = | |
| 6319 | + Jenc.object | |
| 6320 | + [ | |
| 6321 | + ] | |
| 6322 | + | |
| 6323 | +unionLambda : Jdec.Decoder UnionLambda | |
| 6324 | +unionLambda = | |
| 6325 | + Jdec.oneOf | |
| 6326 | + [ Jdec.map DoubleInUnionLambda Jdec.float | |
| 6327 | + , Jdec.map LambdaInUnionLambda lambda | |
| 6328 | + ] | |
| 6329 | + | |
| 6330 | +encodeUnionLambda : UnionLambda -> Jenc.Value | |
| 6331 | +encodeUnionLambda x = case x of | |
| 6332 | + DoubleInUnionLambda y -> Jenc.float y | |
| 6333 | + LambdaInUnionLambda y -> encodeLambda y | |
| 6334 | + | |
| 6335 | +lambda : Jdec.Decoder Lambda | |
| 6336 | +lambda = | |
| 6337 | + Jdec.succeed Lambda | |
| 6338 | + | |
| 6339 | +encodeLambda : Lambda -> Jenc.Value | |
| 6340 | +encodeLambda x = | |
| 6341 | + Jenc.object | |
| 6342 | + [ | |
| 6343 | + ] | |
| 6344 | + | |
| 6345 | +unionLazy : Jdec.Decoder UnionLazy | |
| 6346 | +unionLazy = | |
| 6347 | + Jdec.oneOf | |
| 6348 | + [ Jdec.map DoubleInUnionLazy Jdec.float | |
| 6349 | + , Jdec.map LazyInUnionLazy lazy | |
| 6350 | + ] | |
| 6351 | + | |
| 6352 | +encodeUnionLazy : UnionLazy -> Jenc.Value | |
| 6353 | +encodeUnionLazy x = case x of | |
| 6354 | + DoubleInUnionLazy y -> Jenc.float y | |
| 6355 | + LazyInUnionLazy y -> encodeLazy y | |
| 6356 | + | |
| 6357 | +lazy : Jdec.Decoder Lazy | |
| 6358 | +lazy = | |
| 6359 | + Jdec.succeed Lazy | |
| 6360 | + | |
| 6361 | +encodeLazy : Lazy -> Jenc.Value | |
| 6362 | +encodeLazy x = | |
| 6363 | + Jenc.object | |
| 6364 | + [ | |
| 6365 | + ] | |
| 6366 | + | |
| 6367 | +unionLeft : Jdec.Decoder UnionLeft | |
| 6368 | +unionLeft = | |
| 6369 | + Jdec.oneOf | |
| 6370 | + [ Jdec.map DoubleInUnionLeft Jdec.float | |
| 6371 | + , Jdec.map LeftInUnionLeft left | |
| 6372 | + ] | |
| 6373 | + | |
| 6374 | +encodeUnionLeft : UnionLeft -> Jenc.Value | |
| 6375 | +encodeUnionLeft x = case x of | |
| 6376 | + DoubleInUnionLeft y -> Jenc.float y | |
| 6377 | + LeftInUnionLeft y -> encodeLeft y | |
| 6378 | + | |
| 6379 | +left : Jdec.Decoder Left | |
| 6380 | +left = | |
| 6381 | + Jdec.succeed Left | |
| 6382 | + | |
| 6383 | +encodeLeft : Left -> Jenc.Value | |
| 6384 | +encodeLeft x = | |
| 6385 | + Jenc.object | |
| 6386 | + [ | |
| 6387 | + ] | |
| 6388 | + | |
| 6389 | +unionList : Jdec.Decoder UnionList | |
| 6390 | +unionList = | |
| 6391 | + Jdec.oneOf | |
| 6392 | + [ Jdec.map DoubleInUnionList Jdec.float | |
| 6393 | + , Jdec.map ListClassInUnionList listClass | |
| 6394 | + ] | |
| 6395 | + | |
| 6396 | +encodeUnionList : UnionList -> Jenc.Value | |
| 6397 | +encodeUnionList x = case x of | |
| 6398 | + DoubleInUnionList y -> Jenc.float y | |
| 6399 | + ListClassInUnionList y -> encodeListClass y | |
| 6400 | + | |
| 6401 | +listClass : Jdec.Decoder ListClass | |
| 6402 | +listClass = | |
| 6403 | + Jdec.succeed ListClass | |
| 6404 | + | |
| 6405 | +encodeListClass : ListClass -> Jenc.Value | |
| 6406 | +encodeListClass x = | |
| 6407 | + Jenc.object | |
| 6408 | + [ | |
| 6409 | + ] | |
| 6410 | + | |
| 6411 | +unionLock : Jdec.Decoder UnionLock | |
| 6412 | +unionLock = | |
| 6413 | + Jdec.oneOf | |
| 6414 | + [ Jdec.map DoubleInUnionLock Jdec.float | |
| 6415 | + , Jdec.map LockInUnionLock lock | |
| 6416 | + ] | |
| 6417 | + | |
| 6418 | +encodeUnionLock : UnionLock -> Jenc.Value | |
| 6419 | +encodeUnionLock x = case x of | |
| 6420 | + DoubleInUnionLock y -> Jenc.float y | |
| 6421 | + LockInUnionLock y -> encodeLock y | |
| 6422 | + | |
| 6423 | +lock : Jdec.Decoder Lock | |
| 6424 | +lock = | |
| 6425 | + Jdec.succeed Lock | |
| 6426 | + | |
| 6427 | +encodeLock : Lock -> Jenc.Value | |
| 6428 | +encodeLock x = | |
| 6429 | + Jenc.object | |
| 6430 | + [ | |
| 6431 | + ] | |
| 6432 | + | |
| 6433 | +unionLong : Jdec.Decoder UnionLong | |
| 6434 | +unionLong = | |
| 6435 | + Jdec.oneOf | |
| 6436 | + [ Jdec.map DoubleInUnionLong Jdec.float | |
| 6437 | + , Jdec.map LongInUnionLong long | |
| 6438 | + ] | |
| 6439 | + | |
| 6440 | +encodeUnionLong : UnionLong -> Jenc.Value | |
| 6441 | +encodeUnionLong x = case x of | |
| 6442 | + DoubleInUnionLong y -> Jenc.float y | |
| 6443 | + LongInUnionLong y -> encodeLong y | |
| 6444 | + | |
| 6445 | +long : Jdec.Decoder Long | |
| 6446 | +long = | |
| 6447 | + Jdec.succeed Long | |
| 6448 | + | |
| 6449 | +encodeLong : Long -> Jenc.Value | |
| 6450 | +encodeLong x = | |
| 6451 | + Jenc.object | |
| 6452 | + [ | |
| 6453 | + ] | |
| 6454 | + | |
| 6455 | +unionMap : Jdec.Decoder UnionMap | |
| 6456 | +unionMap = | |
| 6457 | + Jdec.oneOf | |
| 6458 | + [ Jdec.map DoubleInUnionMap Jdec.float | |
| 6459 | + , Jdec.map MapInUnionMap map | |
| 6460 | + ] | |
| 6461 | + | |
| 6462 | +encodeUnionMap : UnionMap -> Jenc.Value | |
| 6463 | +encodeUnionMap x = case x of | |
| 6464 | + DoubleInUnionMap y -> Jenc.float y | |
| 6465 | + MapInUnionMap y -> encodeMap y | |
| 6466 | + | |
| 6467 | +map : Jdec.Decoder Map | |
| 6468 | +map = | |
| 6469 | + Jdec.succeed Map | |
| 6470 | + | |
| 6471 | +encodeMap : Map -> Jenc.Value | |
| 6472 | +encodeMap x = | |
| 6473 | + Jenc.object | |
| 6474 | + [ | |
| 6475 | + ] | |
| 6476 | + | |
| 6477 | +unionMetadataPropertyHandling : Jdec.Decoder UnionMetadataPropertyHandling | |
| 6478 | +unionMetadataPropertyHandling = | |
| 6479 | + Jdec.oneOf | |
| 6480 | + [ Jdec.map DoubleInUnionMetadataPropertyHandling Jdec.float | |
| 6481 | + , Jdec.map MetadataPropertyHandlingInUnionMetadataPropertyHandling metadataPropertyHandling | |
| 6482 | + ] | |
| 6483 | + | |
| 6484 | +encodeUnionMetadataPropertyHandling : UnionMetadataPropertyHandling -> Jenc.Value | |
| 6485 | +encodeUnionMetadataPropertyHandling x = case x of | |
| 6486 | + DoubleInUnionMetadataPropertyHandling y -> Jenc.float y | |
| 6487 | + MetadataPropertyHandlingInUnionMetadataPropertyHandling y -> encodeMetadataPropertyHandling y | |
| 6488 | + | |
| 6489 | +metadataPropertyHandling : Jdec.Decoder MetadataPropertyHandling | |
| 6490 | +metadataPropertyHandling = | |
| 6491 | + Jdec.succeed MetadataPropertyHandling | |
| 6492 | + | |
| 6493 | +encodeMetadataPropertyHandling : MetadataPropertyHandling -> Jenc.Value | |
| 6494 | +encodeMetadataPropertyHandling x = | |
| 6495 | + Jenc.object | |
| 6496 | + [ | |
| 6497 | + ] | |
| 6498 | + | |
| 6499 | +unionMutable : Jdec.Decoder UnionMutable | |
| 6500 | +unionMutable = | |
| 6501 | + Jdec.oneOf | |
| 6502 | + [ Jdec.map DoubleInUnionMutable Jdec.float | |
| 6503 | + , Jdec.map MutableInUnionMutable mutable | |
| 6504 | + ] | |
| 6505 | + | |
| 6506 | +encodeUnionMutable : UnionMutable -> Jenc.Value | |
| 6507 | +encodeUnionMutable x = case x of | |
| 6508 | + DoubleInUnionMutable y -> Jenc.float y | |
| 6509 | + MutableInUnionMutable y -> encodeMutable y | |
| 6510 | + | |
| 6511 | +mutable : Jdec.Decoder Mutable | |
| 6512 | +mutable = | |
| 6513 | + Jdec.succeed Mutable | |
| 6514 | + | |
| 6515 | +encodeMutable : Mutable -> Jenc.Value | |
| 6516 | +encodeMutable x = | |
| 6517 | + Jenc.object | |
| 6518 | + [ | |
| 6519 | + ] | |
| 6520 | + | |
| 6521 | +unionMutating : Jdec.Decoder UnionMutating | |
| 6522 | +unionMutating = | |
| 6523 | + Jdec.oneOf | |
| 6524 | + [ Jdec.map DoubleInUnionMutating Jdec.float | |
| 6525 | + , Jdec.map MutatingInUnionMutating mutating | |
| 6526 | + ] | |
| 6527 | + | |
| 6528 | +encodeUnionMutating : UnionMutating -> Jenc.Value | |
| 6529 | +encodeUnionMutating x = case x of | |
| 6530 | + DoubleInUnionMutating y -> Jenc.float y | |
| 6531 | + MutatingInUnionMutating y -> encodeMutating y | |
| 6532 | + | |
| 6533 | +mutating : Jdec.Decoder Mutating | |
| 6534 | +mutating = | |
| 6535 | + Jdec.succeed Mutating | |
| 6536 | + | |
| 6537 | +encodeMutating : Mutating -> Jenc.Value | |
| 6538 | +encodeMutating x = | |
| 6539 | + Jenc.object | |
| 6540 | + [ | |
| 6541 | + ] | |
| 6542 | + | |
| 6543 | +unionNamespace : Jdec.Decoder UnionNamespace | |
| 6544 | +unionNamespace = | |
| 6545 | + Jdec.oneOf | |
| 6546 | + [ Jdec.map DoubleInUnionNamespace Jdec.float | |
| 6547 | + , Jdec.map NamespaceInUnionNamespace namespace | |
| 6548 | + ] | |
| 6549 | + | |
| 6550 | +encodeUnionNamespace : UnionNamespace -> Jenc.Value | |
| 6551 | +encodeUnionNamespace x = case x of | |
| 6552 | + DoubleInUnionNamespace y -> Jenc.float y | |
| 6553 | + NamespaceInUnionNamespace y -> encodeNamespace y | |
| 6554 | + | |
| 6555 | +namespace : Jdec.Decoder Namespace | |
| 6556 | +namespace = | |
| 6557 | + Jdec.succeed Namespace | |
| 6558 | + | |
| 6559 | +encodeNamespace : Namespace -> Jenc.Value | |
| 6560 | +encodeNamespace x = | |
| 6561 | + Jenc.object | |
| 6562 | + [ | |
| 6563 | + ] | |
| 6564 | + | |
| 6565 | +unionNative : Jdec.Decoder UnionNative | |
| 6566 | +unionNative = | |
| 6567 | + Jdec.oneOf | |
| 6568 | + [ Jdec.map DoubleInUnionNative Jdec.float | |
| 6569 | + , Jdec.map NativeInUnionNative native | |
| 6570 | + ] | |
| 6571 | + | |
| 6572 | +encodeUnionNative : UnionNative -> Jenc.Value | |
| 6573 | +encodeUnionNative x = case x of | |
| 6574 | + DoubleInUnionNative y -> Jenc.float y | |
| 6575 | + NativeInUnionNative y -> encodeNative y | |
| 6576 | + | |
| 6577 | +native : Jdec.Decoder Native | |
| 6578 | +native = | |
| 6579 | + Jdec.succeed Native | |
| 6580 | + | |
| 6581 | +encodeNative : Native -> Jenc.Value | |
| 6582 | +encodeNative x = | |
| 6583 | + Jenc.object | |
| 6584 | + [ | |
| 6585 | + ] | |
| 6586 | + | |
| 6587 | +unionNew : Jdec.Decoder UnionNew | |
| 6588 | +unionNew = | |
| 6589 | + Jdec.oneOf | |
| 6590 | + [ Jdec.map DoubleInUnionNew Jdec.float | |
| 6591 | + , Jdec.map NewInUnionNew new | |
| 6592 | + ] | |
| 6593 | + | |
| 6594 | +encodeUnionNew : UnionNew -> Jenc.Value | |
| 6595 | +encodeUnionNew x = case x of | |
| 6596 | + DoubleInUnionNew y -> Jenc.float y | |
| 6597 | + NewInUnionNew y -> encodeNew y | |
| 6598 | + | |
| 6599 | +new : Jdec.Decoder New | |
| 6600 | +new = | |
| 6601 | + Jdec.succeed New | |
| 6602 | + | |
| 6603 | +encodeNew : New -> Jenc.Value | |
| 6604 | +encodeNew x = | |
| 6605 | + Jenc.object | |
| 6606 | + [ | |
| 6607 | + ] | |
| 6608 | + | |
| 6609 | +unionNewtonsoft : Jdec.Decoder UnionNewtonsoft | |
| 6610 | +unionNewtonsoft = | |
| 6611 | + Jdec.oneOf | |
| 6612 | + [ Jdec.map DoubleInUnionNewtonsoft Jdec.float | |
| 6613 | + , Jdec.map NewtonsoftInUnionNewtonsoft newtonsoft | |
| 6614 | + ] | |
| 6615 | + | |
| 6616 | +encodeUnionNewtonsoft : UnionNewtonsoft -> Jenc.Value | |
| 6617 | +encodeUnionNewtonsoft x = case x of | |
| 6618 | + DoubleInUnionNewtonsoft y -> Jenc.float y | |
| 6619 | + NewtonsoftInUnionNewtonsoft y -> encodeNewtonsoft y | |
| 6620 | + | |
| 6621 | +newtonsoft : Jdec.Decoder Newtonsoft | |
| 6622 | +newtonsoft = | |
| 6623 | + Jdec.succeed Newtonsoft | |
| 6624 | + | |
| 6625 | +encodeNewtonsoft : Newtonsoft -> Jenc.Value | |
| 6626 | +encodeNewtonsoft x = | |
| 6627 | + Jenc.object | |
| 6628 | + [ | |
| 6629 | + ] | |
| 6630 | + | |
| 6631 | +unionNil : Jdec.Decoder UnionNil | |
| 6632 | +unionNil = | |
| 6633 | + Jdec.oneOf | |
| 6634 | + [ Jdec.map DoubleInUnionNil Jdec.float | |
| 6635 | + , Jdec.map NilInUnionNil nil | |
| 6636 | + ] | |
| 6637 | + | |
| 6638 | +encodeUnionNil : UnionNil -> Jenc.Value | |
| 6639 | +encodeUnionNil x = case x of | |
| 6640 | + DoubleInUnionNil y -> Jenc.float y | |
| 6641 | + NilInUnionNil y -> encodeNil y | |
| 6642 | + | |
| 6643 | +nil : Jdec.Decoder Nil | |
| 6644 | +nil = | |
| 6645 | + Jdec.succeed Nil | |
| 6646 | + | |
| 6647 | +encodeNil : Nil -> Jenc.Value | |
| 6648 | +encodeNil x = | |
| 6649 | + Jenc.object | |
| 6650 | + [ | |
| 6651 | + ] | |
| 6652 | + | |
| 6653 | +unionNO : Jdec.Decoder UnionNO | |
| 6654 | +unionNO = | |
| 6655 | + Jdec.oneOf | |
| 6656 | + [ Jdec.map DoubleInUnionNO Jdec.float | |
| 6657 | + , Jdec.map NoInUnionNO no | |
| 6658 | + ] | |
| 6659 | + | |
| 6660 | +encodeUnionNO : UnionNO -> Jenc.Value | |
| 6661 | +encodeUnionNO x = case x of | |
| 6662 | + DoubleInUnionNO y -> Jenc.float y | |
| 6663 | + NoInUnionNO y -> encodeNo y | |
| 6664 | + | |
| 6665 | +no : Jdec.Decoder No | |
| 6666 | +no = | |
| 6667 | + Jdec.succeed No | |
| 6668 | + | |
| 6669 | +encodeNo : No -> Jenc.Value | |
| 6670 | +encodeNo x = | |
| 6671 | + Jenc.object | |
| 6672 | + [ | |
| 6673 | + ] | |
| 6674 | + | |
| 6675 | +unionNoexcept : Jdec.Decoder UnionNoexcept | |
| 6676 | +unionNoexcept = | |
| 6677 | + Jdec.oneOf | |
| 6678 | + [ Jdec.map DoubleInUnionNoexcept Jdec.float | |
| 6679 | + , Jdec.map NoexceptInUnionNoexcept noexcept | |
| 6680 | + ] | |
| 6681 | + | |
| 6682 | +encodeUnionNoexcept : UnionNoexcept -> Jenc.Value | |
| 6683 | +encodeUnionNoexcept x = case x of | |
| 6684 | + DoubleInUnionNoexcept y -> Jenc.float y | |
| 6685 | + NoexceptInUnionNoexcept y -> encodeNoexcept y | |
| 6686 | + | |
| 6687 | +noexcept : Jdec.Decoder Noexcept | |
| 6688 | +noexcept = | |
| 6689 | + Jdec.succeed Noexcept | |
| 6690 | + | |
| 6691 | +encodeNoexcept : Noexcept -> Jenc.Value | |
| 6692 | +encodeNoexcept x = | |
| 6693 | + Jenc.object | |
| 6694 | + [ | |
| 6695 | + ] | |
| 6696 | + | |
| 6697 | +unionNonatomic : Jdec.Decoder UnionNonatomic | |
| 6698 | +unionNonatomic = | |
| 6699 | + Jdec.oneOf | |
| 6700 | + [ Jdec.map DoubleInUnionNonatomic Jdec.float | |
| 6701 | + , Jdec.map NonatomicInUnionNonatomic nonatomic | |
| 6702 | + ] | |
| 6703 | + | |
| 6704 | +encodeUnionNonatomic : UnionNonatomic -> Jenc.Value | |
| 6705 | +encodeUnionNonatomic x = case x of | |
| 6706 | + DoubleInUnionNonatomic y -> Jenc.float y | |
| 6707 | + NonatomicInUnionNonatomic y -> encodeNonatomic y | |
| 6708 | + | |
| 6709 | +nonatomic : Jdec.Decoder Nonatomic | |
| 6710 | +nonatomic = | |
| 6711 | + Jdec.succeed Nonatomic | |
| 6712 | + | |
| 6713 | +encodeNonatomic : Nonatomic -> Jenc.Value | |
| 6714 | +encodeNonatomic x = | |
| 6715 | + Jenc.object | |
| 6716 | + [ | |
| 6717 | + ] | |
| 6718 | + | |
| 6719 | +unionNone : Jdec.Decoder UnionNone | |
| 6720 | +unionNone = | |
| 6721 | + Jdec.oneOf | |
| 6722 | + [ Jdec.map DoubleInUnionNone Jdec.float | |
| 6723 | + , Jdec.map NoneInUnionNone none | |
| 6724 | + ] | |
| 6725 | + | |
| 6726 | +encodeUnionNone : UnionNone -> Jenc.Value | |
| 6727 | +encodeUnionNone x = case x of | |
| 6728 | + DoubleInUnionNone y -> Jenc.float y | |
| 6729 | + NoneInUnionNone y -> encodeNone y | |
| 6730 | + | |
| 6731 | +none : Jdec.Decoder None | |
| 6732 | +none = | |
| 6733 | + Jdec.succeed None | |
| 6734 | + | |
| 6735 | +encodeNone : None -> Jenc.Value | |
| 6736 | +encodeNone x = | |
| 6737 | + Jenc.object | |
| 6738 | + [ | |
| 6739 | + ] | |
| 6740 | + | |
| 6741 | +unionNonlocal : Jdec.Decoder UnionNonlocal | |
| 6742 | +unionNonlocal = | |
| 6743 | + Jdec.oneOf | |
| 6744 | + [ Jdec.map DoubleInUnionNonlocal Jdec.float | |
| 6745 | + , Jdec.map NonlocalInUnionNonlocal nonlocal | |
| 6746 | + ] | |
| 6747 | + | |
| 6748 | +encodeUnionNonlocal : UnionNonlocal -> Jenc.Value | |
| 6749 | +encodeUnionNonlocal x = case x of | |
| 6750 | + DoubleInUnionNonlocal y -> Jenc.float y | |
| 6751 | + NonlocalInUnionNonlocal y -> encodeNonlocal y | |
| 6752 | + | |
| 6753 | +nonlocal : Jdec.Decoder Nonlocal | |
| 6754 | +nonlocal = | |
| 6755 | + Jdec.succeed Nonlocal | |
| 6756 | + | |
| 6757 | +encodeNonlocal : Nonlocal -> Jenc.Value | |
| 6758 | +encodeNonlocal x = | |
| 6759 | + Jenc.object | |
| 6760 | + [ | |
| 6761 | + ] | |
| 6762 | + | |
| 6763 | +unionNonmutating : Jdec.Decoder UnionNonmutating | |
| 6764 | +unionNonmutating = | |
| 6765 | + Jdec.oneOf | |
| 6766 | + [ Jdec.map DoubleInUnionNonmutating Jdec.float | |
| 6767 | + , Jdec.map NonmutatingInUnionNonmutating nonmutating | |
| 6768 | + ] | |
| 6769 | + | |
| 6770 | +encodeUnionNonmutating : UnionNonmutating -> Jenc.Value | |
| 6771 | +encodeUnionNonmutating x = case x of | |
| 6772 | + DoubleInUnionNonmutating y -> Jenc.float y | |
| 6773 | + NonmutatingInUnionNonmutating y -> encodeNonmutating y | |
| 6774 | + | |
| 6775 | +nonmutating : Jdec.Decoder Nonmutating | |
| 6776 | +nonmutating = | |
| 6777 | + Jdec.succeed Nonmutating | |
| 6778 | + | |
| 6779 | +encodeNonmutating : Nonmutating -> Jenc.Value | |
| 6780 | +encodeNonmutating x = | |
| 6781 | + Jenc.object | |
| 6782 | + [ | |
| 6783 | + ] | |
| 6784 | + | |
| 6785 | +unionNot : Jdec.Decoder UnionNot | |
| 6786 | +unionNot = | |
| 6787 | + Jdec.oneOf | |
| 6788 | + [ Jdec.map DoubleInUnionNot Jdec.float | |
| 6789 | + , Jdec.map NotInUnionNot not | |
| 6790 | + ] | |
| 6791 | + | |
| 6792 | +encodeUnionNot : UnionNot -> Jenc.Value | |
| 6793 | +encodeUnionNot x = case x of | |
| 6794 | + DoubleInUnionNot y -> Jenc.float y | |
| 6795 | + NotInUnionNot y -> encodeNot y | |
| 6796 | + | |
| 6797 | +not : Jdec.Decoder Not | |
| 6798 | +not = | |
| 6799 | + Jdec.succeed Not | |
| 6800 | + | |
| 6801 | +encodeNot : Not -> Jenc.Value | |
| 6802 | +encodeNot x = | |
| 6803 | + Jenc.object | |
| 6804 | + [ | |
| 6805 | + ] | |
| 6806 | + | |
| 6807 | +unionNotEq : Jdec.Decoder UnionNotEq | |
| 6808 | +unionNotEq = | |
| 6809 | + Jdec.oneOf | |
| 6810 | + [ Jdec.map DoubleInUnionNotEq Jdec.float | |
| 6811 | + , Jdec.map NotEqInUnionNotEq notEq | |
| 6812 | + ] | |
| 6813 | + | |
| 6814 | +encodeUnionNotEq : UnionNotEq -> Jenc.Value | |
| 6815 | +encodeUnionNotEq x = case x of | |
| 6816 | + DoubleInUnionNotEq y -> Jenc.float y | |
| 6817 | + NotEqInUnionNotEq y -> encodeNotEq y | |
| 6818 | + | |
| 6819 | +notEq : Jdec.Decoder NotEq | |
| 6820 | +notEq = | |
| 6821 | + Jdec.succeed NotEq | |
| 6822 | + | |
| 6823 | +encodeNotEq : NotEq -> Jenc.Value | |
| 6824 | +encodeNotEq x = | |
| 6825 | + Jenc.object | |
| 6826 | + [ | |
| 6827 | + ] | |
| 6828 | + | |
| 6829 | +unionNSString : Jdec.Decoder UnionNSString | |
| 6830 | +unionNSString = | |
| 6831 | + Jdec.oneOf | |
| 6832 | + [ Jdec.map DoubleInUnionNSString Jdec.float | |
| 6833 | + , Jdec.map NSStringInUnionNSString nsString | |
| 6834 | + ] | |
| 6835 | + | |
| 6836 | +encodeUnionNSString : UnionNSString -> Jenc.Value | |
| 6837 | +encodeUnionNSString x = case x of | |
| 6838 | + DoubleInUnionNSString y -> Jenc.float y | |
| 6839 | + NSStringInUnionNSString y -> encodeNSString y | |
| 6840 | + | |
| 6841 | +nsString : Jdec.Decoder NSString | |
| 6842 | +nsString = | |
| 6843 | + Jdec.succeed NSString | |
| 6844 | + | |
| 6845 | +encodeNSString : NSString -> Jenc.Value | |
| 6846 | +encodeNSString x = | |
| 6847 | + Jenc.object | |
| 6848 | + [ | |
| 6849 | + ] | |
| 6850 | + | |
| 6851 | +unionNULL : Jdec.Decoder UnionNULL | |
| 6852 | +unionNULL = | |
| 6853 | + Jdec.oneOf | |
| 6854 | + [ Jdec.map DoubleInUnionNULL Jdec.float | |
| 6855 | + , Jdec.map NullInUnionNULL null | |
| 6856 | + ] | |
| 6857 | + | |
| 6858 | +encodeUnionNULL : UnionNULL -> Jenc.Value | |
| 6859 | +encodeUnionNULL x = case x of | |
| 6860 | + DoubleInUnionNULL y -> Jenc.float y | |
| 6861 | + NullInUnionNULL y -> encodeNull y | |
| 6862 | + | |
| 6863 | +null : Jdec.Decoder Null | |
| 6864 | +null = | |
| 6865 | + Jdec.succeed Null | |
| 6866 | + | |
| 6867 | +encodeNull : Null -> Jenc.Value | |
| 6868 | +encodeNull x = | |
| 6869 | + Jenc.object | |
| 6870 | + [ | |
| 6871 | + ] | |
| 6872 | + | |
| 6873 | +unionNullptr : Jdec.Decoder UnionNullptr | |
| 6874 | +unionNullptr = | |
| 6875 | + Jdec.oneOf | |
| 6876 | + [ Jdec.map DoubleInUnionNullptr Jdec.float | |
| 6877 | + , Jdec.map NullptrInUnionNullptr nullptr | |
| 6878 | + ] | |
| 6879 | + | |
| 6880 | +encodeUnionNullptr : UnionNullptr -> Jenc.Value | |
| 6881 | +encodeUnionNullptr x = case x of | |
| 6882 | + DoubleInUnionNullptr y -> Jenc.float y | |
| 6883 | + NullptrInUnionNullptr y -> encodeNullptr y | |
| 6884 | + | |
| 6885 | +nullptr : Jdec.Decoder Nullptr | |
| 6886 | +nullptr = | |
| 6887 | + Jdec.succeed Nullptr | |
| 6888 | + | |
| 6889 | +encodeNullptr : Nullptr -> Jenc.Value | |
| 6890 | +encodeNullptr x = | |
| 6891 | + Jenc.object | |
| 6892 | + [ | |
| 6893 | + ] | |
| 6894 | + | |
| 6895 | +unionNumber : Jdec.Decoder UnionNumber | |
| 6896 | +unionNumber = | |
| 6897 | + Jdec.oneOf | |
| 6898 | + [ Jdec.map DoubleInUnionNumber Jdec.float | |
| 6899 | + , Jdec.map NumberInUnionNumber number | |
| 6900 | + ] | |
| 6901 | + | |
| 6902 | +encodeUnionNumber : UnionNumber -> Jenc.Value | |
| 6903 | +encodeUnionNumber x = case x of | |
| 6904 | + DoubleInUnionNumber y -> Jenc.float y | |
| 6905 | + NumberInUnionNumber y -> encodeNumber y | |
| 6906 | + | |
| 6907 | +number : Jdec.Decoder Number | |
| 6908 | +number = | |
| 6909 | + Jdec.succeed Number | |
| 6910 | + | |
| 6911 | +encodeNumber : Number -> Jenc.Value | |
| 6912 | +encodeNumber x = | |
| 6913 | + Jenc.object | |
| 6914 | + [ | |
| 6915 | + ] | |
| 6916 | + | |
| 6917 | +unionObject : Jdec.Decoder UnionObject | |
| 6918 | +unionObject = | |
| 6919 | + Jdec.oneOf | |
| 6920 | + [ Jdec.map DoubleInUnionObject Jdec.float | |
| 6921 | + , Jdec.map ObjectInUnionObject object | |
| 6922 | + ] | |
| 6923 | + | |
| 6924 | +encodeUnionObject : UnionObject -> Jenc.Value | |
| 6925 | +encodeUnionObject x = case x of | |
| 6926 | + DoubleInUnionObject y -> Jenc.float y | |
| 6927 | + ObjectInUnionObject y -> encodeObject y | |
| 6928 | + | |
| 6929 | +object : Jdec.Decoder Object | |
| 6930 | +object = | |
| 6931 | + Jdec.succeed Object | |
| 6932 | + | |
| 6933 | +encodeObject : Object -> Jenc.Value | |
| 6934 | +encodeObject x = | |
| 6935 | + Jenc.object | |
| 6936 | + [ | |
| 6937 | + ] | |
| 6938 | + | |
| 6939 | +unionOneway : Jdec.Decoder UnionOneway | |
| 6940 | +unionOneway = | |
| 6941 | + Jdec.oneOf | |
| 6942 | + [ Jdec.map DoubleInUnionOneway Jdec.float | |
| 6943 | + , Jdec.map OnewayInUnionOneway oneway | |
| 6944 | + ] | |
| 6945 | + | |
| 6946 | +encodeUnionOneway : UnionOneway -> Jenc.Value | |
| 6947 | +encodeUnionOneway x = case x of | |
| 6948 | + DoubleInUnionOneway y -> Jenc.float y | |
| 6949 | + OnewayInUnionOneway y -> encodeOneway y | |
| 6950 | + | |
| 6951 | +oneway : Jdec.Decoder Oneway | |
| 6952 | +oneway = | |
| 6953 | + Jdec.succeed Oneway | |
| 6954 | + | |
| 6955 | +encodeOneway : Oneway -> Jenc.Value | |
| 6956 | +encodeOneway x = | |
| 6957 | + Jenc.object | |
| 6958 | + [ | |
| 6959 | + ] | |
| 6960 | + | |
| 6961 | +unionOpen : Jdec.Decoder UnionOpen | |
| 6962 | +unionOpen = | |
| 6963 | + Jdec.oneOf | |
| 6964 | + [ Jdec.map DoubleInUnionOpen Jdec.float | |
| 6965 | + , Jdec.map OpenInUnionOpen open | |
| 6966 | + ] | |
| 6967 | + | |
| 6968 | +encodeUnionOpen : UnionOpen -> Jenc.Value | |
| 6969 | +encodeUnionOpen x = case x of | |
| 6970 | + DoubleInUnionOpen y -> Jenc.float y | |
| 6971 | + OpenInUnionOpen y -> encodeOpen y | |
| 6972 | + | |
| 6973 | +open : Jdec.Decoder Open | |
| 6974 | +open = | |
| 6975 | + Jdec.succeed Open | |
| 6976 | + | |
| 6977 | +encodeOpen : Open -> Jenc.Value | |
| 6978 | +encodeOpen x = | |
| 6979 | + Jenc.object | |
| 6980 | + [ | |
| 6981 | + ] | |
| 6982 | + | |
| 6983 | +unionOperator : Jdec.Decoder UnionOperator | |
| 6984 | +unionOperator = | |
| 6985 | + Jdec.oneOf | |
| 6986 | + [ Jdec.map DoubleInUnionOperator Jdec.float | |
| 6987 | + , Jdec.map OperatorInUnionOperator operator | |
| 6988 | + ] | |
| 6989 | + | |
| 6990 | +encodeUnionOperator : UnionOperator -> Jenc.Value | |
| 6991 | +encodeUnionOperator x = case x of | |
| 6992 | + DoubleInUnionOperator y -> Jenc.float y | |
| 6993 | + OperatorInUnionOperator y -> encodeOperator y | |
| 6994 | + | |
| 6995 | +operator : Jdec.Decoder Operator | |
| 6996 | +operator = | |
| 6997 | + Jdec.succeed Operator | |
| 6998 | + | |
| 6999 | +encodeOperator : Operator -> Jenc.Value | |
| 7000 | +encodeOperator x = | |
| 7001 | + Jenc.object | |
| 7002 | + [ | |
| 7003 | + ] | |
| 7004 | + | |
| 7005 | +unionOptional : Jdec.Decoder UnionOptional | |
| 7006 | +unionOptional = | |
| 7007 | + Jdec.oneOf | |
| 7008 | + [ Jdec.map DoubleInUnionOptional Jdec.float | |
| 7009 | + , Jdec.map OptionalInUnionOptional optional | |
| 7010 | + ] | |
| 7011 | + | |
| 7012 | +encodeUnionOptional : UnionOptional -> Jenc.Value | |
| 7013 | +encodeUnionOptional x = case x of | |
| 7014 | + DoubleInUnionOptional y -> Jenc.float y | |
| 7015 | + OptionalInUnionOptional y -> encodeOptional y | |
| 7016 | + | |
| 7017 | +optional : Jdec.Decoder Optional | |
| 7018 | +optional = | |
| 7019 | + Jdec.succeed Optional | |
| 7020 | + | |
| 7021 | +encodeOptional : Optional -> Jenc.Value | |
| 7022 | +encodeOptional x = | |
| 7023 | + Jenc.object | |
| 7024 | + [ | |
| 7025 | + ] | |
| 7026 | + | |
| 7027 | +unionOr : Jdec.Decoder UnionOr | |
| 7028 | +unionOr = | |
| 7029 | + Jdec.oneOf | |
| 7030 | + [ Jdec.map DoubleInUnionOr Jdec.float | |
| 7031 | + , Jdec.map OrInUnionOr or | |
| 7032 | + ] | |
| 7033 | + | |
| 7034 | +encodeUnionOr : UnionOr -> Jenc.Value | |
| 7035 | +encodeUnionOr x = case x of | |
| 7036 | + DoubleInUnionOr y -> Jenc.float y | |
| 7037 | + OrInUnionOr y -> encodeOr y | |
| 7038 | + | |
| 7039 | +or : Jdec.Decoder Or | |
| 7040 | +or = | |
| 7041 | + Jdec.succeed Or | |
| 7042 | + | |
| 7043 | +encodeOr : Or -> Jenc.Value | |
| 7044 | +encodeOr x = | |
| 7045 | + Jenc.object | |
| 7046 | + [ | |
| 7047 | + ] | |
| 7048 | + | |
| 7049 | +unionOrEq : Jdec.Decoder UnionOrEq | |
| 7050 | +unionOrEq = | |
| 7051 | + Jdec.oneOf | |
| 7052 | + [ Jdec.map DoubleInUnionOrEq Jdec.float | |
| 7053 | + , Jdec.map OrEqInUnionOrEq orEq | |
| 7054 | + ] | |
| 7055 | + | |
| 7056 | +encodeUnionOrEq : UnionOrEq -> Jenc.Value | |
| 7057 | +encodeUnionOrEq x = case x of | |
| 7058 | + DoubleInUnionOrEq y -> Jenc.float y | |
| 7059 | + OrEqInUnionOrEq y -> encodeOrEq y | |
| 7060 | + | |
| 7061 | +orEq : Jdec.Decoder OrEq | |
| 7062 | +orEq = | |
| 7063 | + Jdec.succeed OrEq | |
| 7064 | + | |
| 7065 | +encodeOrEq : OrEq -> Jenc.Value | |
| 7066 | +encodeOrEq x = | |
| 7067 | + Jenc.object | |
| 7068 | + [ | |
| 7069 | + ] | |
| 7070 | + | |
| 7071 | +unionOut : Jdec.Decoder UnionOut | |
| 7072 | +unionOut = | |
| 7073 | + Jdec.oneOf | |
| 7074 | + [ Jdec.map DoubleInUnionOut Jdec.float | |
| 7075 | + , Jdec.map OutInUnionOut out | |
| 7076 | + ] | |
| 7077 | + | |
| 7078 | +encodeUnionOut : UnionOut -> Jenc.Value | |
| 7079 | +encodeUnionOut x = case x of | |
| 7080 | + DoubleInUnionOut y -> Jenc.float y | |
| 7081 | + OutInUnionOut y -> encodeOut y | |
| 7082 | + | |
| 7083 | +out : Jdec.Decoder Out | |
| 7084 | +out = | |
| 7085 | + Jdec.succeed Out | |
| 7086 | + | |
| 7087 | +encodeOut : Out -> Jenc.Value | |
| 7088 | +encodeOut x = | |
| 7089 | + Jenc.object | |
| 7090 | + [ | |
| 7091 | + ] | |
| 7092 | + | |
| 7093 | +unionOverride : Jdec.Decoder UnionOverride | |
| 7094 | +unionOverride = | |
| 7095 | + Jdec.oneOf | |
| 7096 | + [ Jdec.map DoubleInUnionOverride Jdec.float | |
| 7097 | + , Jdec.map OverrideInUnionOverride override | |
| 7098 | + ] | |
| 7099 | + | |
| 7100 | +encodeUnionOverride : UnionOverride -> Jenc.Value | |
| 7101 | +encodeUnionOverride x = case x of | |
| 7102 | + DoubleInUnionOverride y -> Jenc.float y | |
| 7103 | + OverrideInUnionOverride y -> encodeOverride y | |
| 7104 | + | |
| 7105 | +override : Jdec.Decoder Override | |
| 7106 | +override = | |
| 7107 | + Jdec.succeed Override | |
| 7108 | + | |
| 7109 | +encodeOverride : Override -> Jenc.Value | |
| 7110 | +encodeOverride x = | |
| 7111 | + Jenc.object | |
| 7112 | + [ | |
| 7113 | + ] | |
| 7114 | + | |
| 7115 | +unionPackage : Jdec.Decoder UnionPackage | |
| 7116 | +unionPackage = | |
| 7117 | + Jdec.oneOf | |
| 7118 | + [ Jdec.map DoubleInUnionPackage Jdec.float | |
| 7119 | + , Jdec.map PackageInUnionPackage package | |
| 7120 | + ] | |
| 7121 | + | |
| 7122 | +encodeUnionPackage : UnionPackage -> Jenc.Value | |
| 7123 | +encodeUnionPackage x = case x of | |
| 7124 | + DoubleInUnionPackage y -> Jenc.float y | |
| 7125 | + PackageInUnionPackage y -> encodePackage y | |
| 7126 | + | |
| 7127 | +package : Jdec.Decoder Package | |
| 7128 | +package = | |
| 7129 | + Jdec.succeed Package | |
| 7130 | + | |
| 7131 | +encodePackage : Package -> Jenc.Value | |
| 7132 | +encodePackage x = | |
| 7133 | + Jenc.object | |
| 7134 | + [ | |
| 7135 | + ] | |
| 7136 | + | |
| 7137 | +unionParams : Jdec.Decoder UnionParams | |
| 7138 | +unionParams = | |
| 7139 | + Jdec.oneOf | |
| 7140 | + [ Jdec.map DoubleInUnionParams Jdec.float | |
| 7141 | + , Jdec.map ParamsInUnionParams params | |
| 7142 | + ] | |
| 7143 | + | |
| 7144 | +encodeUnionParams : UnionParams -> Jenc.Value | |
| 7145 | +encodeUnionParams x = case x of | |
| 7146 | + DoubleInUnionParams y -> Jenc.float y | |
| 7147 | + ParamsInUnionParams y -> encodeParams y | |
| 7148 | + | |
| 7149 | +params : Jdec.Decoder Params | |
| 7150 | +params = | |
| 7151 | + Jdec.succeed Params | |
| 7152 | + | |
| 7153 | +encodeParams : Params -> Jenc.Value | |
| 7154 | +encodeParams x = | |
| 7155 | + Jenc.object | |
| 7156 | + [ | |
| 7157 | + ] | |
| 7158 | + | |
| 7159 | +unionPass : Jdec.Decoder UnionPass | |
| 7160 | +unionPass = | |
| 7161 | + Jdec.oneOf | |
| 7162 | + [ Jdec.map DoubleInUnionPass Jdec.float | |
| 7163 | + , Jdec.map PassInUnionPass pass | |
| 7164 | + ] | |
| 7165 | + | |
| 7166 | +encodeUnionPass : UnionPass -> Jenc.Value | |
| 7167 | +encodeUnionPass x = case x of | |
| 7168 | + DoubleInUnionPass y -> Jenc.float y | |
| 7169 | + PassInUnionPass y -> encodePass y | |
| 7170 | + | |
| 7171 | +pass : Jdec.Decoder Pass | |
| 7172 | +pass = | |
| 7173 | + Jdec.succeed Pass | |
| 7174 | + | |
| 7175 | +encodePass : Pass -> Jenc.Value | |
| 7176 | +encodePass x = | |
| 7177 | + Jenc.object | |
| 7178 | + [ | |
| 7179 | + ] | |
| 7180 | + | |
| 7181 | +unionPostfix : Jdec.Decoder UnionPostfix | |
| 7182 | +unionPostfix = | |
| 7183 | + Jdec.oneOf | |
| 7184 | + [ Jdec.map DoubleInUnionPostfix Jdec.float | |
| 7185 | + , Jdec.map PostfixInUnionPostfix postfix | |
| 7186 | + ] | |
| 7187 | + | |
| 7188 | +encodeUnionPostfix : UnionPostfix -> Jenc.Value | |
| 7189 | +encodeUnionPostfix x = case x of | |
| 7190 | + DoubleInUnionPostfix y -> Jenc.float y | |
| 7191 | + PostfixInUnionPostfix y -> encodePostfix y | |
| 7192 | + | |
| 7193 | +postfix : Jdec.Decoder Postfix | |
| 7194 | +postfix = | |
| 7195 | + Jdec.succeed Postfix | |
| 7196 | + | |
| 7197 | +encodePostfix : Postfix -> Jenc.Value | |
| 7198 | +encodePostfix x = | |
| 7199 | + Jenc.object | |
| 7200 | + [ | |
| 7201 | + ] | |
| 7202 | + | |
| 7203 | +unionPrecedence : Jdec.Decoder UnionPrecedence | |
| 7204 | +unionPrecedence = | |
| 7205 | + Jdec.oneOf | |
| 7206 | + [ Jdec.map DoubleInUnionPrecedence Jdec.float | |
| 7207 | + , Jdec.map PrecedenceInUnionPrecedence precedence | |
| 7208 | + ] | |
| 7209 | + | |
| 7210 | +encodeUnionPrecedence : UnionPrecedence -> Jenc.Value | |
| 7211 | +encodeUnionPrecedence x = case x of | |
| 7212 | + DoubleInUnionPrecedence y -> Jenc.float y | |
| 7213 | + PrecedenceInUnionPrecedence y -> encodePrecedence y | |
| 7214 | + | |
| 7215 | +precedence : Jdec.Decoder Precedence | |
| 7216 | +precedence = | |
| 7217 | + Jdec.succeed Precedence | |
| 7218 | + | |
| 7219 | +encodePrecedence : Precedence -> Jenc.Value | |
| 7220 | +encodePrecedence x = | |
| 7221 | + Jenc.object | |
| 7222 | + [ | |
| 7223 | + ] | |
| 7224 | + | |
| 7225 | +unionPrefix : Jdec.Decoder UnionPrefix | |
| 7226 | +unionPrefix = | |
| 7227 | + Jdec.oneOf | |
| 7228 | + [ Jdec.map DoubleInUnionPrefix Jdec.float | |
| 7229 | + , Jdec.map PrefixInUnionPrefix prefix | |
| 7230 | + ] | |
| 7231 | + | |
| 7232 | +encodeUnionPrefix : UnionPrefix -> Jenc.Value | |
| 7233 | +encodeUnionPrefix x = case x of | |
| 7234 | + DoubleInUnionPrefix y -> Jenc.float y | |
| 7235 | + PrefixInUnionPrefix y -> encodePrefix y | |
| 7236 | + | |
| 7237 | +prefix : Jdec.Decoder Prefix | |
| 7238 | +prefix = | |
| 7239 | + Jdec.succeed Prefix | |
| 7240 | + | |
| 7241 | +encodePrefix : Prefix -> Jenc.Value | |
| 7242 | +encodePrefix x = | |
| 7243 | + Jenc.object | |
| 7244 | + [ | |
| 7245 | + ] | |
| 7246 | + | |
| 7247 | +unionPrint : Jdec.Decoder UnionPrint | |
| 7248 | +unionPrint = | |
| 7249 | + Jdec.oneOf | |
| 7250 | + [ Jdec.map DoubleInUnionPrint Jdec.float | |
| 7251 | + , Jdec.map PrintInUnionPrint print | |
| 7252 | + ] | |
| 7253 | + | |
| 7254 | +encodeUnionPrint : UnionPrint -> Jenc.Value | |
| 7255 | +encodeUnionPrint x = case x of | |
| 7256 | + DoubleInUnionPrint y -> Jenc.float y | |
| 7257 | + PrintInUnionPrint y -> encodePrint y | |
| 7258 | + | |
| 7259 | +print : Jdec.Decoder Print | |
| 7260 | +print = | |
| 7261 | + Jdec.succeed Print | |
| 7262 | + | |
| 7263 | +encodePrint : Print -> Jenc.Value | |
| 7264 | +encodePrint x = | |
| 7265 | + Jenc.object | |
| 7266 | + [ | |
| 7267 | + ] | |
| 7268 | + | |
| 7269 | +unionPrintf : Jdec.Decoder UnionPrintf | |
| 7270 | +unionPrintf = | |
| 7271 | + Jdec.oneOf | |
| 7272 | + [ Jdec.map DoubleInUnionPrintf Jdec.float | |
| 7273 | + , Jdec.map PrintfInUnionPrintf printf | |
| 7274 | + ] | |
| 7275 | + | |
| 7276 | +encodeUnionPrintf : UnionPrintf -> Jenc.Value | |
| 7277 | +encodeUnionPrintf x = case x of | |
| 7278 | + DoubleInUnionPrintf y -> Jenc.float y | |
| 7279 | + PrintfInUnionPrintf y -> encodePrintf y | |
| 7280 | + | |
| 7281 | +printf : Jdec.Decoder Printf | |
| 7282 | +printf = | |
| 7283 | + Jdec.succeed Printf | |
| 7284 | + | |
| 7285 | +encodePrintf : Printf -> Jenc.Value | |
| 7286 | +encodePrintf x = | |
| 7287 | + Jenc.object | |
| 7288 | + [ | |
| 7289 | + ] | |
| 7290 | + | |
| 7291 | +unionPrivate : Jdec.Decoder UnionPrivate | |
| 7292 | +unionPrivate = | |
| 7293 | + Jdec.oneOf | |
| 7294 | + [ Jdec.map DoubleInUnionPrivate Jdec.float | |
| 7295 | + , Jdec.map PrivateInUnionPrivate private | |
| 7296 | + ] | |
| 7297 | + | |
| 7298 | +encodeUnionPrivate : UnionPrivate -> Jenc.Value | |
| 7299 | +encodeUnionPrivate x = case x of | |
| 7300 | + DoubleInUnionPrivate y -> Jenc.float y | |
| 7301 | + PrivateInUnionPrivate y -> encodePrivate y | |
| 7302 | + | |
| 7303 | +private : Jdec.Decoder Private | |
| 7304 | +private = | |
| 7305 | + Jdec.succeed Private | |
| 7306 | + | |
| 7307 | +encodePrivate : Private -> Jenc.Value | |
| 7308 | +encodePrivate x = | |
| 7309 | + Jenc.object | |
| 7310 | + [ | |
| 7311 | + ] | |
| 7312 | + | |
| 7313 | +unionProtected : Jdec.Decoder UnionProtected | |
| 7314 | +unionProtected = | |
| 7315 | + Jdec.oneOf | |
| 7316 | + [ Jdec.map DoubleInUnionProtected Jdec.float | |
| 7317 | + , Jdec.map ProtectedInUnionProtected protected | |
| 7318 | + ] | |
| 7319 | + | |
| 7320 | +encodeUnionProtected : UnionProtected -> Jenc.Value | |
| 7321 | +encodeUnionProtected x = case x of | |
| 7322 | + DoubleInUnionProtected y -> Jenc.float y | |
| 7323 | + ProtectedInUnionProtected y -> encodeProtected y | |
| 7324 | + | |
| 7325 | +protected : Jdec.Decoder Protected | |
| 7326 | +protected = | |
| 7327 | + Jdec.succeed Protected | |
| 7328 | + | |
| 7329 | +encodeProtected : Protected -> Jenc.Value | |
| 7330 | +encodeProtected x = | |
| 7331 | + Jenc.object | |
| 7332 | + [ | |
| 7333 | + ] | |
| 7334 | + | |
| 7335 | +unionProtocol : Jdec.Decoder UnionProtocol | |
| 7336 | +unionProtocol = | |
| 7337 | + Jdec.oneOf | |
| 7338 | + [ Jdec.map DoubleInUnionProtocol Jdec.float | |
| 7339 | + , Jdec.map ProtocolInUnionProtocol protocol | |
| 7340 | + ] | |
| 7341 | + | |
| 7342 | +encodeUnionProtocol : UnionProtocol -> Jenc.Value | |
| 7343 | +encodeUnionProtocol x = case x of | |
| 7344 | + DoubleInUnionProtocol y -> Jenc.float y | |
| 7345 | + ProtocolInUnionProtocol y -> encodeProtocol y | |
| 7346 | + | |
| 7347 | +protocol : Jdec.Decoder Protocol | |
| 7348 | +protocol = | |
| 7349 | + Jdec.succeed Protocol | |
| 7350 | + | |
| 7351 | +encodeProtocol : Protocol -> Jenc.Value | |
| 7352 | +encodeProtocol x = | |
| 7353 | + Jenc.object | |
| 7354 | + [ | |
| 7355 | + ] | |
| 7356 | + | |
| 7357 | +unionPublic : Jdec.Decoder UnionPublic | |
| 7358 | +unionPublic = | |
| 7359 | + Jdec.oneOf | |
| 7360 | + [ Jdec.map DoubleInUnionPublic Jdec.float | |
| 7361 | + , Jdec.map PublicInUnionPublic public | |
| 7362 | + ] | |
| 7363 | + | |
| 7364 | +encodeUnionPublic : UnionPublic -> Jenc.Value | |
| 7365 | +encodeUnionPublic x = case x of | |
| 7366 | + DoubleInUnionPublic y -> Jenc.float y | |
| 7367 | + PublicInUnionPublic y -> encodePublic y | |
| 7368 | + | |
| 7369 | +public : Jdec.Decoder Public | |
| 7370 | +public = | |
| 7371 | + Jdec.succeed Public | |
| 7372 | + | |
| 7373 | +encodePublic : Public -> Jenc.Value | |
| 7374 | +encodePublic x = | |
| 7375 | + Jenc.object | |
| 7376 | + [ | |
| 7377 | + ] | |
| 7378 | + | |
| 7379 | +unionBoolUnion : Jdec.Decoder UnionBoolUnion | |
| 7380 | +unionBoolUnion = | |
| 7381 | + Jdec.oneOf | |
| 7382 | + [ Jdec.map DoubleInUnionBoolUnion Jdec.float | |
| 7383 | + , Jdec.map UnionBoolBoolInUnionBoolUnion unionBoolBool | |
| 7384 | + ] | |
| 7385 | + | |
| 7386 | +encodeUnionBoolUnion : UnionBoolUnion -> Jenc.Value | |
| 7387 | +encodeUnionBoolUnion x = case x of | |
| 7388 | + DoubleInUnionBoolUnion y -> Jenc.float y | |
| 7389 | + UnionBoolBoolInUnionBoolUnion y -> encodeUnionBoolBool y | |
| 7390 | + | |
| 7391 | +unionBoolBool : Jdec.Decoder UnionBoolBool | |
| 7392 | +unionBoolBool = | |
| 7393 | + Jdec.succeed UnionBoolBool | |
| 7394 | + | |
| 7395 | +encodeUnionBoolBool : UnionBoolBool -> Jenc.Value | |
| 7396 | +encodeUnionBoolBool x = | |
| 7397 | + Jenc.object | |
| 7398 | + [ | |
| 7399 | + ] | |
| 7400 | + | |
| 7401 | +unionTypeUnion : Jdec.Decoder UnionTypeUnion | |
| 7402 | +unionTypeUnion = | |
| 7403 | + Jdec.oneOf | |
| 7404 | + [ Jdec.map DoubleInUnionTypeUnion Jdec.float | |
| 7405 | + , Jdec.map TypeClassInUnionTypeUnion typeClass | |
| 7406 | + ] | |
| 7407 | + | |
| 7408 | +encodeUnionTypeUnion : UnionTypeUnion -> Jenc.Value | |
| 7409 | +encodeUnionTypeUnion x = case x of | |
| 7410 | + DoubleInUnionTypeUnion y -> Jenc.float y | |
| 7411 | + TypeClassInUnionTypeUnion y -> encodeTypeClass y | |
| 7412 | + | |
| 7413 | +typeClass : Jdec.Decoder TypeClass | |
| 7414 | +typeClass = | |
| 7415 | + Jdec.succeed TypeClass | |
| 7416 | + | |
| 7417 | +encodeTypeClass : TypeClass -> Jenc.Value | |
| 7418 | +encodeTypeClass x = | |
| 7419 | + Jenc.object | |
| 7420 | + [ | |
| 7421 | + ] | |
| 7422 | + | |
| 7423 | +unionAnyUnion : Jdec.Decoder UnionAnyUnion | |
| 7424 | +unionAnyUnion = | |
| 7425 | + Jdec.oneOf | |
| 7426 | + [ Jdec.map DoubleInUnionAnyUnion Jdec.float | |
| 7427 | + , Jdec.map AnyClassInUnionAnyUnion anyClass | |
| 7428 | + ] | |
| 7429 | + | |
| 7430 | +encodeUnionAnyUnion : UnionAnyUnion -> Jenc.Value | |
| 7431 | +encodeUnionAnyUnion x = case x of | |
| 7432 | + DoubleInUnionAnyUnion y -> Jenc.float y | |
| 7433 | + AnyClassInUnionAnyUnion y -> encodeAnyClass y | |
| 7434 | + | |
| 7435 | +anyClass : Jdec.Decoder AnyClass | |
| 7436 | +anyClass = | |
| 7437 | + Jdec.succeed AnyClass | |
| 7438 | + | |
| 7439 | +encodeAnyClass : AnyClass -> Jenc.Value | |
| 7440 | +encodeAnyClass x = | |
| 7441 | + Jenc.object | |
| 7442 | + [ | |
| 7443 | + ] | |
| 7444 | + | |
| 7445 | +unionAs : Jdec.Decoder UnionAs | |
| 7446 | +unionAs = | |
| 7447 | + Jdec.oneOf | |
| 7448 | + [ Jdec.map DoubleInUnionAs Jdec.float | |
| 7449 | + , Jdec.map AsInUnionAs purpleAs | |
| 7450 | + ] | |
| 7451 | + | |
| 7452 | +encodeUnionAs : UnionAs -> Jenc.Value | |
| 7453 | +encodeUnionAs x = case x of | |
| 7454 | + DoubleInUnionAs y -> Jenc.float y | |
| 7455 | + AsInUnionAs y -> encodeAs y | |
| 7456 | + | |
| 7457 | +purpleAs : Jdec.Decoder As | |
| 7458 | +purpleAs = | |
| 7459 | + Jdec.succeed As | |
| 7460 | + | |
| 7461 | +encodeAs : As -> Jenc.Value | |
| 7462 | +encodeAs x = | |
| 7463 | + Jenc.object | |
| 7464 | + [ | |
| 7465 | + ] | |
| 7466 | + | |
| 7467 | +unionBOOL : Jdec.Decoder UnionBOOL | |
| 7468 | +unionBOOL = | |
| 7469 | + Jdec.oneOf | |
| 7470 | + [ Jdec.map DoubleInUnionBOOL Jdec.float | |
| 7471 | + , Jdec.map BoolInUnionBOOL purpleBool | |
| 7472 | + ] | |
| 7473 | + | |
| 7474 | +encodeUnionBOOL : UnionBOOL -> Jenc.Value | |
| 7475 | +encodeUnionBOOL x = case x of | |
| 7476 | + DoubleInUnionBOOL y -> Jenc.float y | |
| 7477 | + BoolInUnionBOOL y -> encodeBool y | |
| 7478 | + | |
| 7479 | +purpleBool : Jdec.Decoder Bool | |
| 7480 | +purpleBool = | |
| 7481 | + Jdec.succeed Bool | |
| 7482 | + | |
| 7483 | +encodeBool : Bool -> Jenc.Value | |
| 7484 | +encodeBool x = | |
| 7485 | + Jenc.object | |
| 7486 | + [ | |
| 7487 | + ] | |
| 7488 | + | |
| 7489 | +unionBool : Jdec.Decoder UnionBool | |
| 7490 | +unionBool = | |
| 7491 | + Jdec.oneOf | |
| 7492 | + [ Jdec.map DoubleInUnionBool Jdec.float | |
| 7493 | + , Jdec.map BoolClassInUnionBool boolClass | |
| 7494 | + ] | |
| 7495 | + | |
| 7496 | +encodeUnionBool : UnionBool -> Jenc.Value | |
| 7497 | +encodeUnionBool x = case x of | |
| 7498 | + DoubleInUnionBool y -> Jenc.float y | |
| 7499 | + BoolClassInUnionBool y -> encodeBoolClass y | |
| 7500 | + | |
| 7501 | +boolClass : Jdec.Decoder BoolClass | |
| 7502 | +boolClass = | |
| 7503 | + Jdec.succeed BoolClass | |
| 7504 | + | |
| 7505 | +encodeBoolClass : BoolClass -> Jenc.Value | |
| 7506 | +encodeBoolClass x = | |
| 7507 | + Jenc.object | |
| 7508 | + [ | |
| 7509 | + ] | |
| 7510 | + | |
| 7511 | +unionCase : Jdec.Decoder UnionCase | |
| 7512 | +unionCase = | |
| 7513 | + Jdec.oneOf | |
| 7514 | + [ Jdec.map DoubleInUnionCase Jdec.float | |
| 7515 | + , Jdec.map CaseInUnionCase purpleCase | |
| 7516 | + ] | |
| 7517 | + | |
| 7518 | +encodeUnionCase : UnionCase -> Jenc.Value | |
| 7519 | +encodeUnionCase x = case x of | |
| 7520 | + DoubleInUnionCase y -> Jenc.float y | |
| 7521 | + CaseInUnionCase y -> encodeCase y | |
| 7522 | + | |
| 7523 | +purpleCase : Jdec.Decoder Case | |
| 7524 | +purpleCase = | |
| 7525 | + Jdec.succeed Case | |
| 7526 | + | |
| 7527 | +encodeCase : Case -> Jenc.Value | |
| 7528 | +encodeCase x = | |
| 7529 | + Jenc.object | |
| 7530 | + [ | |
| 7531 | + ] | |
| 7532 | + | |
| 7533 | +unionClassUnion : Jdec.Decoder UnionClassUnion | |
| 7534 | +unionClassUnion = | |
| 7535 | + Jdec.oneOf | |
| 7536 | + [ Jdec.map DoubleInUnionClassUnion Jdec.float | |
| 7537 | + , Jdec.map ClassClassInUnionClassUnion classClass | |
| 7538 | + ] | |
| 7539 | + | |
| 7540 | +encodeUnionClassUnion : UnionClassUnion -> Jenc.Value | |
| 7541 | +encodeUnionClassUnion x = case x of | |
| 7542 | + DoubleInUnionClassUnion y -> Jenc.float y | |
| 7543 | + ClassClassInUnionClassUnion y -> encodeClassClass y | |
| 7544 | + | |
| 7545 | +classClass : Jdec.Decoder ClassClass | |
| 7546 | +classClass = | |
| 7547 | + Jdec.succeed ClassClass | |
| 7548 | + | |
| 7549 | +encodeClassClass : ClassClass -> Jenc.Value | |
| 7550 | +encodeClassClass x = | |
| 7551 | + Jenc.object | |
| 7552 | + [ | |
| 7553 | + ] | |
| 7554 | + | |
| 7555 | +unionElse : Jdec.Decoder UnionElse | |
| 7556 | +unionElse = | |
| 7557 | + Jdec.oneOf | |
| 7558 | + [ Jdec.map DoubleInUnionElse Jdec.float | |
| 7559 | + , Jdec.map ElseInUnionElse purpleElse | |
| 7560 | + ] | |
| 7561 | + | |
| 7562 | +encodeUnionElse : UnionElse -> Jenc.Value | |
| 7563 | +encodeUnionElse x = case x of | |
| 7564 | + DoubleInUnionElse y -> Jenc.float y | |
| 7565 | + ElseInUnionElse y -> encodeElse y | |
| 7566 | + | |
| 7567 | +purpleElse : Jdec.Decoder Else | |
| 7568 | +purpleElse = | |
| 7569 | + Jdec.succeed Else | |
| 7570 | + | |
| 7571 | +encodeElse : Else -> Jenc.Value | |
| 7572 | +encodeElse x = | |
| 7573 | + Jenc.object | |
| 7574 | + [ | |
| 7575 | + ] | |
| 7576 | + | |
| 7577 | +unionExposing : Jdec.Decoder UnionExposing | |
| 7578 | +unionExposing = | |
| 7579 | + Jdec.oneOf | |
| 7580 | + [ Jdec.map DoubleInUnionExposing Jdec.float | |
| 7581 | + , Jdec.map ExposingInUnionExposing purpleExposing | |
| 7582 | + ] | |
| 7583 | + | |
| 7584 | +encodeUnionExposing : UnionExposing -> Jenc.Value | |
| 7585 | +encodeUnionExposing x = case x of | |
| 7586 | + DoubleInUnionExposing y -> Jenc.float y | |
| 7587 | + ExposingInUnionExposing y -> encodeExposing y | |
| 7588 | + | |
| 7589 | +purpleExposing : Jdec.Decoder Exposing | |
| 7590 | +purpleExposing = | |
| 7591 | + Jdec.succeed Exposing | |
| 7592 | + | |
| 7593 | +encodeExposing : Exposing -> Jenc.Value | |
| 7594 | +encodeExposing x = | |
| 7595 | + Jenc.object | |
| 7596 | + [ | |
| 7597 | + ] | |
| 7598 | + | |
| 7599 | +unionFalseUnion : Jdec.Decoder UnionFalseUnion | |
| 7600 | +unionFalseUnion = | |
| 7601 | + Jdec.oneOf | |
| 7602 | + [ Jdec.map DoubleInUnionFalseUnion Jdec.float | |
| 7603 | + , Jdec.map UnionFalseFalseInUnionFalseUnion unionFalseFalse | |
| 7604 | + ] | |
| 7605 | + | |
| 7606 | +encodeUnionFalseUnion : UnionFalseUnion -> Jenc.Value | |
| 7607 | +encodeUnionFalseUnion x = case x of | |
| 7608 | + DoubleInUnionFalseUnion y -> Jenc.float y | |
| 7609 | + UnionFalseFalseInUnionFalseUnion y -> encodeUnionFalseFalse y | |
| 7610 | + | |
| 7611 | +unionFalseFalse : Jdec.Decoder UnionFalseFalse | |
| 7612 | +unionFalseFalse = | |
| 7613 | + Jdec.succeed UnionFalseFalse | |
| 7614 | + | |
| 7615 | +encodeUnionFalseFalse : UnionFalseFalse -> Jenc.Value | |
| 7616 | +encodeUnionFalseFalse x = | |
| 7617 | + Jenc.object | |
| 7618 | + [ | |
| 7619 | + ] | |
| 7620 | + | |
| 7621 | +unionFloat : Jdec.Decoder UnionFloat | |
| 7622 | +unionFloat = | |
| 7623 | + Jdec.oneOf | |
| 7624 | + [ Jdec.map DoubleInUnionFloat Jdec.float | |
| 7625 | + , Jdec.map FloatClassInUnionFloat floatClass | |
| 7626 | + ] | |
| 7627 | + | |
| 7628 | +encodeUnionFloat : UnionFloat -> Jenc.Value | |
| 7629 | +encodeUnionFloat x = case x of | |
| 7630 | + DoubleInUnionFloat y -> Jenc.float y | |
| 7631 | + FloatClassInUnionFloat y -> encodeFloatClass y | |
| 7632 | + | |
| 7633 | +floatClass : Jdec.Decoder FloatClass | |
| 7634 | +floatClass = | |
| 7635 | + Jdec.succeed FloatClass | |
| 7636 | + | |
| 7637 | +encodeFloatClass : FloatClass -> Jenc.Value | |
| 7638 | +encodeFloatClass x = | |
| 7639 | + Jenc.object | |
| 7640 | + [ | |
| 7641 | + ] | |
| 7642 | + | |
| 7643 | +unionIf : Jdec.Decoder UnionIf | |
| 7644 | +unionIf = | |
| 7645 | + Jdec.oneOf | |
| 7646 | + [ Jdec.map DoubleInUnionIf Jdec.float | |
| 7647 | + , Jdec.map IfInUnionIf purpleIf | |
| 7648 | + ] | |
| 7649 | + | |
| 7650 | +encodeUnionIf : UnionIf -> Jenc.Value | |
| 7651 | +encodeUnionIf x = case x of | |
| 7652 | + DoubleInUnionIf y -> Jenc.float y | |
| 7653 | + IfInUnionIf y -> encodeIf y | |
| 7654 | + | |
| 7655 | +purpleIf : Jdec.Decoder If | |
| 7656 | +purpleIf = | |
| 7657 | + Jdec.succeed If | |
| 7658 | + | |
| 7659 | +encodeIf : If -> Jenc.Value | |
| 7660 | +encodeIf x = | |
| 7661 | + Jenc.object | |
| 7662 | + [ | |
| 7663 | + ] | |
| 7664 | + | |
| 7665 | +unionImport : Jdec.Decoder UnionImport | |
| 7666 | +unionImport = | |
| 7667 | + Jdec.oneOf | |
| 7668 | + [ Jdec.map DoubleInUnionImport Jdec.float | |
| 7669 | + , Jdec.map ImportInUnionImport purpleImport | |
| 7670 | + ] | |
| 7671 | + | |
| 7672 | +encodeUnionImport : UnionImport -> Jenc.Value | |
| 7673 | +encodeUnionImport x = case x of | |
| 7674 | + DoubleInUnionImport y -> Jenc.float y | |
| 7675 | + ImportInUnionImport y -> encodeImport y | |
| 7676 | + | |
| 7677 | +purpleImport : Jdec.Decoder Import | |
| 7678 | +purpleImport = | |
| 7679 | + Jdec.succeed Import | |
| 7680 | + | |
| 7681 | +encodeImport : Import -> Jenc.Value | |
| 7682 | +encodeImport x = | |
| 7683 | + Jenc.object | |
| 7684 | + [ | |
| 7685 | + ] | |
| 7686 | + | |
| 7687 | +unionIn : Jdec.Decoder UnionIn | |
| 7688 | +unionIn = | |
| 7689 | + Jdec.oneOf | |
| 7690 | + [ Jdec.map DoubleInUnionIn Jdec.float | |
| 7691 | + , Jdec.map InInUnionIn purpleIn | |
| 7692 | + ] | |
| 7693 | + | |
| 7694 | +encodeUnionIn : UnionIn -> Jenc.Value | |
| 7695 | +encodeUnionIn x = case x of | |
| 7696 | + DoubleInUnionIn y -> Jenc.float y | |
| 7697 | + InInUnionIn y -> encodeIn y | |
| 7698 | + | |
| 7699 | +purpleIn : Jdec.Decoder In | |
| 7700 | +purpleIn = | |
| 7701 | + Jdec.succeed In | |
| 7702 | + | |
| 7703 | +encodeIn : In -> Jenc.Value | |
| 7704 | +encodeIn x = | |
| 7705 | + Jenc.object | |
| 7706 | + [ | |
| 7707 | + ] | |
| 7708 | + | |
| 7709 | +unionInfix : Jdec.Decoder UnionInfix | |
| 7710 | +unionInfix = | |
| 7711 | + Jdec.oneOf | |
| 7712 | + [ Jdec.map DoubleInUnionInfix Jdec.float | |
| 7713 | + , Jdec.map InfixInUnionInfix purpleInfix | |
| 7714 | + ] | |
| 7715 | + | |
| 7716 | +encodeUnionInfix : UnionInfix -> Jenc.Value | |
| 7717 | +encodeUnionInfix x = case x of | |
| 7718 | + DoubleInUnionInfix y -> Jenc.float y | |
| 7719 | + InfixInUnionInfix y -> encodeInfix y | |
| 7720 | + | |
| 7721 | +purpleInfix : Jdec.Decoder Infix | |
| 7722 | +purpleInfix = | |
| 7723 | + Jdec.succeed Infix | |
| 7724 | + | |
| 7725 | +encodeInfix : Infix -> Jenc.Value | |
| 7726 | +encodeInfix x = | |
| 7727 | + Jenc.object | |
| 7728 | + [ | |
| 7729 | + ] | |
| 7730 | + | |
| 7731 | +unionInt : Jdec.Decoder UnionInt | |
| 7732 | +unionInt = | |
| 7733 | + Jdec.oneOf | |
| 7734 | + [ Jdec.map DoubleInUnionInt Jdec.float | |
| 7735 | + , Jdec.map IntClassInUnionInt intClass | |
| 7736 | + ] | |
| 7737 | + | |
| 7738 | +encodeUnionInt : UnionInt -> Jenc.Value | |
| 7739 | +encodeUnionInt x = case x of | |
| 7740 | + DoubleInUnionInt y -> Jenc.float y | |
| 7741 | + IntClassInUnionInt y -> encodeIntClass y | |
| 7742 | + | |
| 7743 | +intClass : Jdec.Decoder IntClass | |
| 7744 | +intClass = | |
| 7745 | + Jdec.succeed IntClass | |
| 7746 | + | |
| 7747 | +encodeIntClass : IntClass -> Jenc.Value | |
| 7748 | +encodeIntClass x = | |
| 7749 | + Jenc.object | |
| 7750 | + [ | |
| 7751 | + ] | |
| 7752 | + | |
| 7753 | +unionLet : Jdec.Decoder UnionLet | |
| 7754 | +unionLet = | |
| 7755 | + Jdec.oneOf | |
| 7756 | + [ Jdec.map DoubleInUnionLet Jdec.float | |
| 7757 | + , Jdec.map LetInUnionLet purpleLet | |
| 7758 | + ] | |
| 7759 | + | |
| 7760 | +encodeUnionLet : UnionLet -> Jenc.Value | |
| 7761 | +encodeUnionLet x = case x of | |
| 7762 | + DoubleInUnionLet y -> Jenc.float y | |
| 7763 | + LetInUnionLet y -> encodeLet y | |
| 7764 | + | |
| 7765 | +purpleLet : Jdec.Decoder Let | |
| 7766 | +purpleLet = | |
| 7767 | + Jdec.succeed Let | |
| 7768 | + | |
| 7769 | +encodeLet : Let -> Jenc.Value | |
| 7770 | +encodeLet x = | |
| 7771 | + Jenc.object | |
| 7772 | + [ | |
| 7773 | + ] | |
| 7774 | + | |
| 7775 | +unionModule : Jdec.Decoder UnionModule | |
| 7776 | +unionModule = | |
| 7777 | + Jdec.oneOf | |
| 7778 | + [ Jdec.map DoubleInUnionModule Jdec.float | |
| 7779 | + , Jdec.map ModuleInUnionModule purpleModule | |
| 7780 | + ] | |
| 7781 | + | |
| 7782 | +encodeUnionModule : UnionModule -> Jenc.Value | |
| 7783 | +encodeUnionModule x = case x of | |
| 7784 | + DoubleInUnionModule y -> Jenc.float y | |
| 7785 | + ModuleInUnionModule y -> encodeModule y | |
| 7786 | + | |
| 7787 | +purpleModule : Jdec.Decoder Module | |
| 7788 | +purpleModule = | |
| 7789 | + Jdec.succeed Module | |
| 7790 | + | |
| 7791 | +encodeModule : Module -> Jenc.Value | |
| 7792 | +encodeModule x = | |
| 7793 | + Jenc.object | |
| 7794 | + [ | |
| 7795 | + ] | |
| 7796 | + | |
| 7797 | +unionNoneUnion : Jdec.Decoder UnionNoneUnion | |
| 7798 | +unionNoneUnion = | |
| 7799 | + Jdec.oneOf | |
| 7800 | + [ Jdec.map DoubleInUnionNoneUnion Jdec.float | |
| 7801 | + , Jdec.map NoneClassInUnionNoneUnion noneClass | |
| 7802 | + ] | |
| 7803 | + | |
| 7804 | +encodeUnionNoneUnion : UnionNoneUnion -> Jenc.Value | |
| 7805 | +encodeUnionNoneUnion x = case x of | |
| 7806 | + DoubleInUnionNoneUnion y -> Jenc.float y | |
| 7807 | + NoneClassInUnionNoneUnion y -> encodeNoneClass y | |
| 7808 | + | |
| 7809 | +noneClass : Jdec.Decoder NoneClass | |
| 7810 | +noneClass = | |
| 7811 | + Jdec.succeed NoneClass | |
| 7812 | + | |
| 7813 | +encodeNoneClass : NoneClass -> Jenc.Value | |
| 7814 | +encodeNoneClass x = | |
| 7815 | + Jenc.object | |
| 7816 | + [ | |
| 7817 | + ] | |
| 7818 | + | |
| 7819 | +unionNull : Jdec.Decoder UnionNull | |
| 7820 | +unionNull = | |
| 7821 | + Jdec.oneOf | |
| 7822 | + [ Jdec.map DoubleInUnionNull Jdec.float | |
| 7823 | + , Jdec.map NullClassInUnionNull nullClass | |
| 7824 | + ] | |
| 7825 | + | |
| 7826 | +encodeUnionNull : UnionNull -> Jenc.Value | |
| 7827 | +encodeUnionNull x = case x of | |
| 7828 | + DoubleInUnionNull y -> Jenc.float y | |
| 7829 | + NullClassInUnionNull y -> encodeNullClass y | |
| 7830 | + | |
| 7831 | +nullClass : Jdec.Decoder NullClass | |
| 7832 | +nullClass = | |
| 7833 | + Jdec.succeed NullClass | |
| 7834 | + | |
| 7835 | +encodeNullClass : NullClass -> Jenc.Value | |
| 7836 | +encodeNullClass x = | |
| 7837 | + Jenc.object | |
| 7838 | + [ | |
| 7839 | + ] | |
| 7840 | + | |
| 7841 | +unionOf : Jdec.Decoder UnionOf | |
| 7842 | +unionOf = | |
| 7843 | + Jdec.oneOf | |
| 7844 | + [ Jdec.map DoubleInUnionOf Jdec.float | |
| 7845 | + , Jdec.map OfInUnionOf purpleOf | |
| 7846 | + ] | |
| 7847 | + | |
| 7848 | +encodeUnionOf : UnionOf -> Jenc.Value | |
| 7849 | +encodeUnionOf x = case x of | |
| 7850 | + DoubleInUnionOf y -> Jenc.float y | |
| 7851 | + OfInUnionOf y -> encodeOf y | |
| 7852 | + | |
| 7853 | +purpleOf : Jdec.Decoder Of | |
| 7854 | +purpleOf = | |
| 7855 | + Jdec.succeed Of | |
| 7856 | + | |
| 7857 | +encodeOf : Of -> Jenc.Value | |
| 7858 | +encodeOf x = | |
| 7859 | + Jenc.object | |
| 7860 | + [ | |
| 7861 | + ] | |
| 7862 | + | |
| 7863 | +unionPort : Jdec.Decoder UnionPort | |
| 7864 | +unionPort = | |
| 7865 | + Jdec.oneOf | |
| 7866 | + [ Jdec.map DoubleInUnionPort Jdec.float | |
| 7867 | + , Jdec.map PortInUnionPort purplePort | |
| 7868 | + ] | |
| 7869 | + | |
| 7870 | +encodeUnionPort : UnionPort -> Jenc.Value | |
| 7871 | +encodeUnionPort x = case x of | |
| 7872 | + DoubleInUnionPort y -> Jenc.float y | |
| 7873 | + PortInUnionPort y -> encodePort y | |
| 7874 | + | |
| 7875 | +purplePort : Jdec.Decoder Port | |
| 7876 | +purplePort = | |
| 7877 | + Jdec.succeed Port | |
| 7878 | + | |
| 7879 | +encodePort : Port -> Jenc.Value | |
| 7880 | +encodePort x = | |
| 7881 | + Jenc.object | |
| 7882 | + [ | |
| 7883 | + ] | |
| 7884 | + | |
| 7885 | +unionProtocolUnion : Jdec.Decoder UnionProtocolUnion | |
| 7886 | +unionProtocolUnion = | |
| 7887 | + Jdec.oneOf | |
| 7888 | + [ Jdec.map DoubleInUnionProtocolUnion Jdec.float | |
| 7889 | + , Jdec.map ProtocolClassInUnionProtocolUnion protocolClass | |
| 7890 | + ] | |
| 7891 | + | |
| 7892 | +encodeUnionProtocolUnion : UnionProtocolUnion -> Jenc.Value | |
| 7893 | +encodeUnionProtocolUnion x = case x of | |
| 7894 | + DoubleInUnionProtocolUnion y -> Jenc.float y | |
| 7895 | + ProtocolClassInUnionProtocolUnion y -> encodeProtocolClass y | |
| 7896 | + | |
| 7897 | +protocolClass : Jdec.Decoder ProtocolClass | |
| 7898 | +protocolClass = | |
| 7899 | + Jdec.succeed ProtocolClass | |
| 7900 | + | |
| 7901 | +encodeProtocolClass : ProtocolClass -> Jenc.Value | |
| 7902 | +encodeProtocolClass x = | |
| 7903 | + Jenc.object | |
| 7904 | + [ | |
| 7905 | + ] | |
| 7906 | + | |
| 7907 | +unionSelfUnion : Jdec.Decoder UnionSelfUnion | |
| 7908 | +unionSelfUnion = | |
| 7909 | + Jdec.oneOf | |
| 7910 | + [ Jdec.map DoubleInUnionSelfUnion Jdec.float | |
| 7911 | + , Jdec.map SelfClassInUnionSelfUnion selfClass | |
| 7912 | + ] | |
| 7913 | + | |
| 7914 | +encodeUnionSelfUnion : UnionSelfUnion -> Jenc.Value | |
| 7915 | +encodeUnionSelfUnion x = case x of | |
| 7916 | + DoubleInUnionSelfUnion y -> Jenc.float y | |
| 7917 | + SelfClassInUnionSelfUnion y -> encodeSelfClass y | |
| 7918 | + | |
| 7919 | +selfClass : Jdec.Decoder SelfClass | |
| 7920 | +selfClass = | |
| 7921 | + Jdec.succeed SelfClass | |
| 7922 | + | |
| 7923 | +encodeSelfClass : SelfClass -> Jenc.Value | |
| 7924 | +encodeSelfClass x = | |
| 7925 | + Jenc.object | |
| 7926 | + [ | |
| 7927 | + ] | |
| 7928 | + | |
| 7929 | +unionString : Jdec.Decoder UnionString | |
| 7930 | +unionString = | |
| 7931 | + Jdec.oneOf | |
| 7932 | + [ Jdec.map DoubleInUnionString Jdec.float | |
| 7933 | + , Jdec.map StringClassInUnionString stringClass | |
| 7934 | + ] | |
| 7935 | + | |
| 7936 | +encodeUnionString : UnionString -> Jenc.Value | |
| 7937 | +encodeUnionString x = case x of | |
| 7938 | + DoubleInUnionString y -> Jenc.float y | |
| 7939 | + StringClassInUnionString y -> encodeStringClass y | |
| 7940 | + | |
| 7941 | +stringClass : Jdec.Decoder StringClass | |
| 7942 | +stringClass = | |
| 7943 | + Jdec.succeed StringClass | |
| 7944 | + | |
| 7945 | +encodeStringClass : StringClass -> Jenc.Value | |
| 7946 | +encodeStringClass x = | |
| 7947 | + Jenc.object | |
| 7948 | + [ | |
| 7949 | + ] | |
| 7950 | + | |
| 7951 | +unionThen : Jdec.Decoder UnionThen | |
| 7952 | +unionThen = | |
| 7953 | + Jdec.oneOf | |
| 7954 | + [ Jdec.map DoubleInUnionThen Jdec.float | |
| 7955 | + , Jdec.map ThenInUnionThen purpleThen | |
| 7956 | + ] | |
| 7957 | + | |
| 7958 | +encodeUnionThen : UnionThen -> Jenc.Value | |
| 7959 | +encodeUnionThen x = case x of | |
| 7960 | + DoubleInUnionThen y -> Jenc.float y | |
| 7961 | + ThenInUnionThen y -> encodeThen y | |
| 7962 | + | |
| 7963 | +purpleThen : Jdec.Decoder Then | |
| 7964 | +purpleThen = | |
| 7965 | + Jdec.succeed Then | |
| 7966 | + | |
| 7967 | +encodeThen : Then -> Jenc.Value | |
| 7968 | +encodeThen x = | |
| 7969 | + Jenc.object | |
| 7970 | + [ | |
| 7971 | + ] | |
| 7972 | + | |
| 7973 | +unionTrueUnion : Jdec.Decoder UnionTrueUnion | |
| 7974 | +unionTrueUnion = | |
| 7975 | + Jdec.oneOf | |
| 7976 | + [ Jdec.map DoubleInUnionTrueUnion Jdec.float | |
| 7977 | + , Jdec.map UnionTrueTrueInUnionTrueUnion unionTrueTrue | |
| 7978 | + ] | |
| 7979 | + | |
| 7980 | +encodeUnionTrueUnion : UnionTrueUnion -> Jenc.Value | |
| 7981 | +encodeUnionTrueUnion x = case x of | |
| 7982 | + DoubleInUnionTrueUnion y -> Jenc.float y | |
| 7983 | + UnionTrueTrueInUnionTrueUnion y -> encodeUnionTrueTrue y | |
| 7984 | + | |
| 7985 | +unionTrueTrue : Jdec.Decoder UnionTrueTrue | |
| 7986 | +unionTrueTrue = | |
| 7987 | + Jdec.succeed UnionTrueTrue | |
| 7988 | + | |
| 7989 | +encodeUnionTrueTrue : UnionTrueTrue -> Jenc.Value | |
| 7990 | +encodeUnionTrueTrue x = | |
| 7991 | + Jenc.object | |
| 7992 | + [ | |
| 7993 | + ] | |
| 7994 | + | |
| 7995 | +unionType : Jdec.Decoder UnionType | |
| 7996 | +unionType = | |
| 7997 | + Jdec.oneOf | |
| 7998 | + [ Jdec.map DoubleInUnionType Jdec.float | |
| 7999 | + , Jdec.map TypeInUnionType purpleType | |
| 8000 | + ] | |
| 8001 | + | |
| 8002 | +encodeUnionType : UnionType -> Jenc.Value | |
| 8003 | +encodeUnionType x = case x of | |
| 8004 | + DoubleInUnionType y -> Jenc.float y | |
| 8005 | + TypeInUnionType y -> encodeType y | |
| 8006 | + | |
| 8007 | +purpleType : Jdec.Decoder Type | |
| 8008 | +purpleType = | |
| 8009 | + Jdec.succeed Type | |
| 8010 | + | |
| 8011 | +encodeType : Type -> Jenc.Value | |
| 8012 | +encodeType x = | |
| 8013 | + Jenc.object | |
| 8014 | + [ | |
| 8015 | + ] | |
| 8016 | + | |
| 8017 | +unionWhere : Jdec.Decoder UnionWhere | |
| 8018 | +unionWhere = | |
| 8019 | + Jdec.oneOf | |
| 8020 | + [ Jdec.map DoubleInUnionWhere Jdec.float | |
| 8021 | + , Jdec.map WhereInUnionWhere purpleWhere | |
| 8022 | + ] | |
| 8023 | + | |
| 8024 | +encodeUnionWhere : UnionWhere -> Jenc.Value | |
| 8025 | +encodeUnionWhere x = case x of | |
| 8026 | + DoubleInUnionWhere y -> Jenc.float y | |
| 8027 | + WhereInUnionWhere y -> encodeWhere y | |
| 8028 | + | |
| 8029 | +purpleWhere : Jdec.Decoder Where | |
| 8030 | +purpleWhere = | |
| 8031 | + Jdec.succeed Where | |
| 8032 | + | |
| 8033 | +encodeWhere : Where -> Jenc.Value | |
| 8034 | +encodeWhere x = | |
| 8035 | + Jenc.object | |
| 8036 | + [ | |
| 8037 | + ] | |
| 8038 | + | |
| 8039 | +unionQuicktype : Jdec.Decoder UnionQuicktype | |
| 8040 | +unionQuicktype = | |
| 8041 | + Jdec.oneOf | |
| 8042 | + [ Jdec.map DoubleInUnionQuicktype Jdec.float | |
| 8043 | + , Jdec.map QuicktypeInUnionQuicktype quicktype | |
| 8044 | + ] | |
| 8045 | + | |
| 8046 | +encodeUnionQuicktype : UnionQuicktype -> Jenc.Value | |
| 8047 | +encodeUnionQuicktype x = case x of | |
| 8048 | + DoubleInUnionQuicktype y -> Jenc.float y | |
| 8049 | + QuicktypeInUnionQuicktype y -> encodeQuicktype y | |
| 8050 | + | |
| 8051 | +quicktype : Jdec.Decoder Quicktype | |
| 8052 | +quicktype = | |
| 8053 | + Jdec.succeed Quicktype | |
| 8054 | + | |
| 8055 | +encodeQuicktype : Quicktype -> Jenc.Value | |
| 8056 | +encodeQuicktype x = | |
| 8057 | + Jenc.object | |
| 8058 | + [ | |
| 8059 | + ] | |
| 8060 | + | |
| 8061 | +unionRaise : Jdec.Decoder UnionRaise | |
| 8062 | +unionRaise = | |
| 8063 | + Jdec.oneOf | |
| 8064 | + [ Jdec.map DoubleInUnionRaise Jdec.float | |
| 8065 | + , Jdec.map RaiseInUnionRaise raise | |
| 8066 | + ] | |
| 8067 | + | |
| 8068 | +encodeUnionRaise : UnionRaise -> Jenc.Value | |
| 8069 | +encodeUnionRaise x = case x of | |
| 8070 | + DoubleInUnionRaise y -> Jenc.float y | |
| 8071 | + RaiseInUnionRaise y -> encodeRaise y | |
| 8072 | + | |
| 8073 | +raise : Jdec.Decoder Raise | |
| 8074 | +raise = | |
| 8075 | + Jdec.succeed Raise | |
| 8076 | + | |
| 8077 | +encodeRaise : Raise -> Jenc.Value | |
| 8078 | +encodeRaise x = | |
| 8079 | + Jenc.object | |
| 8080 | + [ | |
| 8081 | + ] | |
| 8082 | + | |
| 8083 | +unionRange : Jdec.Decoder UnionRange | |
| 8084 | +unionRange = | |
| 8085 | + Jdec.oneOf | |
| 8086 | + [ Jdec.map DoubleInUnionRange Jdec.float | |
| 8087 | + , Jdec.map RangeInUnionRange range | |
| 8088 | + ] | |
| 8089 | + | |
| 8090 | +encodeUnionRange : UnionRange -> Jenc.Value | |
| 8091 | +encodeUnionRange x = case x of | |
| 8092 | + DoubleInUnionRange y -> Jenc.float y | |
| 8093 | + RangeInUnionRange y -> encodeRange y | |
| 8094 | + | |
| 8095 | +range : Jdec.Decoder Range | |
| 8096 | +range = | |
| 8097 | + Jdec.succeed Range | |
| 8098 | + | |
| 8099 | +encodeRange : Range -> Jenc.Value | |
| 8100 | +encodeRange x = | |
| 8101 | + Jenc.object | |
| 8102 | + [ | |
| 8103 | + ] | |
| 8104 | + | |
| 8105 | +unionReadonly : Jdec.Decoder UnionReadonly | |
| 8106 | +unionReadonly = | |
| 8107 | + Jdec.oneOf | |
| 8108 | + [ Jdec.map DoubleInUnionReadonly Jdec.float | |
| 8109 | + , Jdec.map ReadonlyInUnionReadonly readonly | |
| 8110 | + ] | |
| 8111 | + | |
| 8112 | +encodeUnionReadonly : UnionReadonly -> Jenc.Value | |
| 8113 | +encodeUnionReadonly x = case x of | |
| 8114 | + DoubleInUnionReadonly y -> Jenc.float y | |
| 8115 | + ReadonlyInUnionReadonly y -> encodeReadonly y | |
| 8116 | + | |
| 8117 | +readonly : Jdec.Decoder Readonly | |
| 8118 | +readonly = | |
| 8119 | + Jdec.succeed Readonly | |
| 8120 | + | |
| 8121 | +encodeReadonly : Readonly -> Jenc.Value | |
| 8122 | +encodeReadonly x = | |
| 8123 | + Jenc.object | |
| 8124 | + [ | |
| 8125 | + ] | |
| 8126 | + | |
| 8127 | +unionRef : Jdec.Decoder UnionRef | |
| 8128 | +unionRef = | |
| 8129 | + Jdec.oneOf | |
| 8130 | + [ Jdec.map DoubleInUnionRef Jdec.float | |
| 8131 | + , Jdec.map RefInUnionRef ref | |
| 8132 | + ] | |
| 8133 | + | |
| 8134 | +encodeUnionRef : UnionRef -> Jenc.Value | |
| 8135 | +encodeUnionRef x = case x of | |
| 8136 | + DoubleInUnionRef y -> Jenc.float y | |
| 8137 | + RefInUnionRef y -> encodeRef y | |
| 8138 | + | |
| 8139 | +ref : Jdec.Decoder Ref | |
| 8140 | +ref = | |
| 8141 | + Jdec.succeed Ref | |
| 8142 | + | |
| 8143 | +encodeRef : Ref -> Jenc.Value | |
| 8144 | +encodeRef x = | |
| 8145 | + Jenc.object | |
| 8146 | + [ | |
| 8147 | + ] | |
| 8148 | + | |
| 8149 | +unionRegister : Jdec.Decoder UnionRegister | |
| 8150 | +unionRegister = | |
| 8151 | + Jdec.oneOf | |
| 8152 | + [ Jdec.map DoubleInUnionRegister Jdec.float | |
| 8153 | + , Jdec.map RegisterInUnionRegister register | |
| 8154 | + ] | |
| 8155 | + | |
| 8156 | +encodeUnionRegister : UnionRegister -> Jenc.Value | |
| 8157 | +encodeUnionRegister x = case x of | |
| 8158 | + DoubleInUnionRegister y -> Jenc.float y | |
| 8159 | + RegisterInUnionRegister y -> encodeRegister y | |
| 8160 | + | |
| 8161 | +register : Jdec.Decoder Register | |
| 8162 | +register = | |
| 8163 | + Jdec.succeed Register | |
| 8164 | + | |
| 8165 | +encodeRegister : Register -> Jenc.Value | |
| 8166 | +encodeRegister x = | |
| 8167 | + Jenc.object | |
| 8168 | + [ | |
| 8169 | + ] | |
| 8170 | + | |
| 8171 | +unionReinterpretCast : Jdec.Decoder UnionReinterpretCast | |
| 8172 | +unionReinterpretCast = | |
| 8173 | + Jdec.oneOf | |
| 8174 | + [ Jdec.map DoubleInUnionReinterpretCast Jdec.float | |
| 8175 | + , Jdec.map ReinterpretCastInUnionReinterpretCast reinterpretCast | |
| 8176 | + ] | |
| 8177 | + | |
| 8178 | +encodeUnionReinterpretCast : UnionReinterpretCast -> Jenc.Value | |
| 8179 | +encodeUnionReinterpretCast x = case x of | |
| 8180 | + DoubleInUnionReinterpretCast y -> Jenc.float y | |
| 8181 | + ReinterpretCastInUnionReinterpretCast y -> encodeReinterpretCast y | |
| 8182 | + | |
| 8183 | +reinterpretCast : Jdec.Decoder ReinterpretCast | |
| 8184 | +reinterpretCast = | |
| 8185 | + Jdec.succeed ReinterpretCast | |
| 8186 | + | |
| 8187 | +encodeReinterpretCast : ReinterpretCast -> Jenc.Value | |
| 8188 | +encodeReinterpretCast x = | |
| 8189 | + Jenc.object | |
| 8190 | + [ | |
| 8191 | + ] | |
| 8192 | + | |
| 8193 | +unionRepeat : Jdec.Decoder UnionRepeat | |
| 8194 | +unionRepeat = | |
| 8195 | + Jdec.oneOf | |
| 8196 | + [ Jdec.map DoubleInUnionRepeat Jdec.float | |
| 8197 | + , Jdec.map RepeatInUnionRepeat repeat | |
| 8198 | + ] | |
| 8199 | + | |
| 8200 | +encodeUnionRepeat : UnionRepeat -> Jenc.Value | |
| 8201 | +encodeUnionRepeat x = case x of | |
| 8202 | + DoubleInUnionRepeat y -> Jenc.float y | |
| 8203 | + RepeatInUnionRepeat y -> encodeRepeat y | |
| 8204 | + | |
| 8205 | +repeat : Jdec.Decoder Repeat | |
| 8206 | +repeat = | |
| 8207 | + Jdec.succeed Repeat | |
| 8208 | + | |
| 8209 | +encodeRepeat : Repeat -> Jenc.Value | |
| 8210 | +encodeRepeat x = | |
| 8211 | + Jenc.object | |
| 8212 | + [ | |
| 8213 | + ] | |
| 8214 | + | |
| 8215 | +unionRequire : Jdec.Decoder UnionRequire | |
| 8216 | +unionRequire = | |
| 8217 | + Jdec.oneOf | |
| 8218 | + [ Jdec.map DoubleInUnionRequire Jdec.float | |
| 8219 | + , Jdec.map RequireInUnionRequire require | |
| 8220 | + ] | |
| 8221 | + | |
| 8222 | +encodeUnionRequire : UnionRequire -> Jenc.Value | |
| 8223 | +encodeUnionRequire x = case x of | |
| 8224 | + DoubleInUnionRequire y -> Jenc.float y | |
| 8225 | + RequireInUnionRequire y -> encodeRequire y | |
| 8226 | + | |
| 8227 | +require : Jdec.Decoder Require | |
| 8228 | +require = | |
| 8229 | + Jdec.succeed Require | |
| 8230 | + | |
| 8231 | +encodeRequire : Require -> Jenc.Value | |
| 8232 | +encodeRequire x = | |
| 8233 | + Jenc.object | |
| 8234 | + [ | |
| 8235 | + ] | |
| 8236 | + | |
| 8237 | +unionRequired : Jdec.Decoder UnionRequired | |
| 8238 | +unionRequired = | |
| 8239 | + Jdec.oneOf | |
| 8240 | + [ Jdec.map DoubleInUnionRequired Jdec.float | |
| 8241 | + , Jdec.map RequiredInUnionRequired required | |
| 8242 | + ] | |
| 8243 | + | |
| 8244 | +encodeUnionRequired : UnionRequired -> Jenc.Value | |
| 8245 | +encodeUnionRequired x = case x of | |
| 8246 | + DoubleInUnionRequired y -> Jenc.float y | |
| 8247 | + RequiredInUnionRequired y -> encodeRequired y | |
| 8248 | + | |
| 8249 | +required : Jdec.Decoder Required | |
| 8250 | +required = | |
| 8251 | + Jdec.succeed Required | |
| 8252 | + | |
| 8253 | +encodeRequired : Required -> Jenc.Value | |
| 8254 | +encodeRequired x = | |
| 8255 | + Jenc.object | |
| 8256 | + [ | |
| 8257 | + ] | |
| 8258 | + | |
| 8259 | +unionRequires : Jdec.Decoder UnionRequires | |
| 8260 | +unionRequires = | |
| 8261 | + Jdec.oneOf | |
| 8262 | + [ Jdec.map DoubleInUnionRequires Jdec.float | |
| 8263 | + , Jdec.map RequiresInUnionRequires requires | |
| 8264 | + ] | |
| 8265 | + | |
| 8266 | +encodeUnionRequires : UnionRequires -> Jenc.Value | |
| 8267 | +encodeUnionRequires x = case x of | |
| 8268 | + DoubleInUnionRequires y -> Jenc.float y | |
| 8269 | + RequiresInUnionRequires y -> encodeRequires y | |
| 8270 | + | |
| 8271 | +requires : Jdec.Decoder Requires | |
| 8272 | +requires = | |
| 8273 | + Jdec.succeed Requires | |
| 8274 | + | |
| 8275 | +encodeRequires : Requires -> Jenc.Value | |
| 8276 | +encodeRequires x = | |
| 8277 | + Jenc.object | |
| 8278 | + [ | |
| 8279 | + ] | |
| 8280 | + | |
| 8281 | +unionRestrict : Jdec.Decoder UnionRestrict | |
| 8282 | +unionRestrict = | |
| 8283 | + Jdec.oneOf | |
| 8284 | + [ Jdec.map DoubleInUnionRestrict Jdec.float | |
| 8285 | + , Jdec.map RestrictInUnionRestrict restrict | |
| 8286 | + ] | |
| 8287 | + | |
| 8288 | +encodeUnionRestrict : UnionRestrict -> Jenc.Value | |
| 8289 | +encodeUnionRestrict x = case x of | |
| 8290 | + DoubleInUnionRestrict y -> Jenc.float y | |
| 8291 | + RestrictInUnionRestrict y -> encodeRestrict y | |
| 8292 | + | |
| 8293 | +restrict : Jdec.Decoder Restrict | |
| 8294 | +restrict = | |
| 8295 | + Jdec.succeed Restrict | |
| 8296 | + | |
| 8297 | +encodeRestrict : Restrict -> Jenc.Value | |
| 8298 | +encodeRestrict x = | |
| 8299 | + Jenc.object | |
| 8300 | + [ | |
| 8301 | + ] | |
| 8302 | + | |
| 8303 | +unionRetain : Jdec.Decoder UnionRetain | |
| 8304 | +unionRetain = | |
| 8305 | + Jdec.oneOf | |
| 8306 | + [ Jdec.map DoubleInUnionRetain Jdec.float | |
| 8307 | + , Jdec.map RetainInUnionRetain retain | |
| 8308 | + ] | |
| 8309 | + | |
| 8310 | +encodeUnionRetain : UnionRetain -> Jenc.Value | |
| 8311 | +encodeUnionRetain x = case x of | |
| 8312 | + DoubleInUnionRetain y -> Jenc.float y | |
| 8313 | + RetainInUnionRetain y -> encodeRetain y | |
| 8314 | + | |
| 8315 | +retain : Jdec.Decoder Retain | |
| 8316 | +retain = | |
| 8317 | + Jdec.succeed Retain | |
| 8318 | + | |
| 8319 | +encodeRetain : Retain -> Jenc.Value | |
| 8320 | +encodeRetain x = | |
| 8321 | + Jenc.object | |
| 8322 | + [ | |
| 8323 | + ] | |
| 8324 | + | |
| 8325 | +unionRethrows : Jdec.Decoder UnionRethrows | |
| 8326 | +unionRethrows = | |
| 8327 | + Jdec.oneOf | |
| 8328 | + [ Jdec.map DoubleInUnionRethrows Jdec.float | |
| 8329 | + , Jdec.map RethrowsInUnionRethrows rethrows | |
| 8330 | + ] | |
| 8331 | + | |
| 8332 | +encodeUnionRethrows : UnionRethrows -> Jenc.Value | |
| 8333 | +encodeUnionRethrows x = case x of | |
| 8334 | + DoubleInUnionRethrows y -> Jenc.float y | |
| 8335 | + RethrowsInUnionRethrows y -> encodeRethrows y | |
| 8336 | + | |
| 8337 | +rethrows : Jdec.Decoder Rethrows | |
| 8338 | +rethrows = | |
| 8339 | + Jdec.succeed Rethrows | |
| 8340 | + | |
| 8341 | +encodeRethrows : Rethrows -> Jenc.Value | |
| 8342 | +encodeRethrows x = | |
| 8343 | + Jenc.object | |
| 8344 | + [ | |
| 8345 | + ] | |
| 8346 | + | |
| 8347 | +unionReturn : Jdec.Decoder UnionReturn | |
| 8348 | +unionReturn = | |
| 8349 | + Jdec.oneOf | |
| 8350 | + [ Jdec.map DoubleInUnionReturn Jdec.float | |
| 8351 | + , Jdec.map ReturnInUnionReturn return | |
| 8352 | + ] | |
| 8353 | + | |
| 8354 | +encodeUnionReturn : UnionReturn -> Jenc.Value | |
| 8355 | +encodeUnionReturn x = case x of | |
| 8356 | + DoubleInUnionReturn y -> Jenc.float y | |
| 8357 | + ReturnInUnionReturn y -> encodeReturn y | |
| 8358 | + | |
| 8359 | +return : Jdec.Decoder Return | |
| 8360 | +return = | |
| 8361 | + Jdec.succeed Return | |
| 8362 | + | |
| 8363 | +encodeReturn : Return -> Jenc.Value | |
| 8364 | +encodeReturn x = | |
| 8365 | + Jenc.object | |
| 8366 | + [ | |
| 8367 | + ] | |
| 8368 | + | |
| 8369 | +unionRight : Jdec.Decoder UnionRight | |
| 8370 | +unionRight = | |
| 8371 | + Jdec.oneOf | |
| 8372 | + [ Jdec.map DoubleInUnionRight Jdec.float | |
| 8373 | + , Jdec.map RightInUnionRight right | |
| 8374 | + ] | |
| 8375 | + | |
| 8376 | +encodeUnionRight : UnionRight -> Jenc.Value | |
| 8377 | +encodeUnionRight x = case x of | |
| 8378 | + DoubleInUnionRight y -> Jenc.float y | |
| 8379 | + RightInUnionRight y -> encodeRight y | |
| 8380 | + | |
| 8381 | +right : Jdec.Decoder Right | |
| 8382 | +right = | |
| 8383 | + Jdec.succeed Right | |
| 8384 | + | |
| 8385 | +encodeRight : Right -> Jenc.Value | |
| 8386 | +encodeRight x = | |
| 8387 | + Jenc.object | |
| 8388 | + [ | |
| 8389 | + ] | |
| 8390 | + | |
| 8391 | +unionSbyte : Jdec.Decoder UnionSbyte | |
| 8392 | +unionSbyte = | |
| 8393 | + Jdec.oneOf | |
| 8394 | + [ Jdec.map DoubleInUnionSbyte Jdec.float | |
| 8395 | + , Jdec.map SbyteInUnionSbyte sbyte | |
| 8396 | + ] | |
| 8397 | + | |
| 8398 | +encodeUnionSbyte : UnionSbyte -> Jenc.Value | |
| 8399 | +encodeUnionSbyte x = case x of | |
| 8400 | + DoubleInUnionSbyte y -> Jenc.float y | |
| 8401 | + SbyteInUnionSbyte y -> encodeSbyte y | |
| 8402 | + | |
| 8403 | +sbyte : Jdec.Decoder Sbyte | |
| 8404 | +sbyte = | |
| 8405 | + Jdec.succeed Sbyte | |
| 8406 | + | |
| 8407 | +encodeSbyte : Sbyte -> Jenc.Value | |
| 8408 | +encodeSbyte x = | |
| 8409 | + Jenc.object | |
| 8410 | + [ | |
| 8411 | + ] | |
| 8412 | + | |
| 8413 | +unionSealed : Jdec.Decoder UnionSealed | |
| 8414 | +unionSealed = | |
| 8415 | + Jdec.oneOf | |
| 8416 | + [ Jdec.map DoubleInUnionSealed Jdec.float | |
| 8417 | + , Jdec.map SealedInUnionSealed sealed | |
| 8418 | + ] | |
| 8419 | + | |
| 8420 | +encodeUnionSealed : UnionSealed -> Jenc.Value | |
| 8421 | +encodeUnionSealed x = case x of | |
| 8422 | + DoubleInUnionSealed y -> Jenc.float y | |
| 8423 | + SealedInUnionSealed y -> encodeSealed y | |
| 8424 | + | |
| 8425 | +sealed : Jdec.Decoder Sealed | |
| 8426 | +sealed = | |
| 8427 | + Jdec.succeed Sealed | |
| 8428 | + | |
| 8429 | +encodeSealed : Sealed -> Jenc.Value | |
| 8430 | +encodeSealed x = | |
| 8431 | + Jenc.object | |
| 8432 | + [ | |
| 8433 | + ] | |
| 8434 | + | |
| 8435 | +unionSEL : Jdec.Decoder UnionSEL | |
| 8436 | +unionSEL = | |
| 8437 | + Jdec.oneOf | |
| 8438 | + [ Jdec.map DoubleInUnionSEL Jdec.float | |
| 8439 | + , Jdec.map SelInUnionSEL sel | |
| 8440 | + ] | |
| 8441 | + | |
| 8442 | +encodeUnionSEL : UnionSEL -> Jenc.Value | |
| 8443 | +encodeUnionSEL x = case x of | |
| 8444 | + DoubleInUnionSEL y -> Jenc.float y | |
| 8445 | + SelInUnionSEL y -> encodeSel y | |
| 8446 | + | |
| 8447 | +sel : Jdec.Decoder Sel | |
| 8448 | +sel = | |
| 8449 | + Jdec.succeed Sel | |
| 8450 | + | |
| 8451 | +encodeSel : Sel -> Jenc.Value | |
| 8452 | +encodeSel x = | |
| 8453 | + Jenc.object | |
| 8454 | + [ | |
| 8455 | + ] | |
| 8456 | + | |
| 8457 | +unionSelect : Jdec.Decoder UnionSelect | |
| 8458 | +unionSelect = | |
| 8459 | + Jdec.oneOf | |
| 8460 | + [ Jdec.map DoubleInUnionSelect Jdec.float | |
| 8461 | + , Jdec.map SelectInUnionSelect select | |
| 8462 | + ] | |
| 8463 | + | |
| 8464 | +encodeUnionSelect : UnionSelect -> Jenc.Value | |
| 8465 | +encodeUnionSelect x = case x of | |
| 8466 | + DoubleInUnionSelect y -> Jenc.float y | |
| 8467 | + SelectInUnionSelect y -> encodeSelect y | |
| 8468 | + | |
| 8469 | +select : Jdec.Decoder Select | |
| 8470 | +select = | |
| 8471 | + Jdec.succeed Select | |
| 8472 | + | |
| 8473 | +encodeSelect : Select -> Jenc.Value | |
| 8474 | +encodeSelect x = | |
| 8475 | + Jenc.object | |
| 8476 | + [ | |
| 8477 | + ] | |
| 8478 | + | |
| 8479 | +unionSelf : Jdec.Decoder UnionSelf | |
| 8480 | +unionSelf = | |
| 8481 | + Jdec.oneOf | |
| 8482 | + [ Jdec.map DoubleInUnionSelf Jdec.float | |
| 8483 | + , Jdec.map SelfInUnionSelf self | |
| 8484 | + ] | |
| 8485 | + | |
| 8486 | +encodeUnionSelf : UnionSelf -> Jenc.Value | |
| 8487 | +encodeUnionSelf x = case x of | |
| 8488 | + DoubleInUnionSelf y -> Jenc.float y | |
| 8489 | + SelfInUnionSelf y -> encodeSelf y | |
| 8490 | + | |
| 8491 | +self : Jdec.Decoder Self | |
| 8492 | +self = | |
| 8493 | + Jdec.succeed Self | |
| 8494 | + | |
| 8495 | +encodeSelf : Self -> Jenc.Value | |
| 8496 | +encodeSelf x = | |
| 8497 | + Jenc.object | |
| 8498 | + [ | |
| 8499 | + ] | |
| 8500 | + | |
| 8501 | +unionSerialize : Jdec.Decoder UnionSerialize | |
| 8502 | +unionSerialize = | |
| 8503 | + Jdec.oneOf | |
| 8504 | + [ Jdec.map DoubleInUnionSerialize Jdec.float | |
| 8505 | + , Jdec.map SerializeInUnionSerialize serialize | |
| 8506 | + ] | |
| 8507 | + | |
| 8508 | +encodeUnionSerialize : UnionSerialize -> Jenc.Value | |
| 8509 | +encodeUnionSerialize x = case x of | |
| 8510 | + DoubleInUnionSerialize y -> Jenc.float y | |
| 8511 | + SerializeInUnionSerialize y -> encodeSerialize y | |
| 8512 | + | |
| 8513 | +serialize : Jdec.Decoder Serialize | |
| 8514 | +serialize = | |
| 8515 | + Jdec.succeed Serialize | |
| 8516 | + | |
| 8517 | +encodeSerialize : Serialize -> Jenc.Value | |
| 8518 | +encodeSerialize x = | |
| 8519 | + Jenc.object | |
| 8520 | + [ | |
| 8521 | + ] | |
| 8522 | + | |
| 8523 | +unionSet : Jdec.Decoder UnionSet | |
| 8524 | +unionSet = | |
| 8525 | + Jdec.oneOf | |
| 8526 | + [ Jdec.map DoubleInUnionSet Jdec.float | |
| 8527 | + , Jdec.map SetInUnionSet set | |
| 8528 | + ] | |
| 8529 | + | |
| 8530 | +encodeUnionSet : UnionSet -> Jenc.Value | |
| 8531 | +encodeUnionSet x = case x of | |
| 8532 | + DoubleInUnionSet y -> Jenc.float y | |
| 8533 | + SetInUnionSet y -> encodeSet y | |
| 8534 | + | |
| 8535 | +set : Jdec.Decoder Set | |
| 8536 | +set = | |
| 8537 | + Jdec.succeed Set | |
| 8538 | + | |
| 8539 | +encodeSet : Set -> Jenc.Value | |
| 8540 | +encodeSet x = | |
| 8541 | + Jenc.object | |
| 8542 | + [ | |
| 8543 | + ] | |
| 8544 | + | |
| 8545 | +unionShort : Jdec.Decoder UnionShort | |
| 8546 | +unionShort = | |
| 8547 | + Jdec.oneOf | |
| 8548 | + [ Jdec.map DoubleInUnionShort Jdec.float | |
| 8549 | + , Jdec.map ShortInUnionShort short | |
| 8550 | + ] | |
| 8551 | + | |
| 8552 | +encodeUnionShort : UnionShort -> Jenc.Value | |
| 8553 | +encodeUnionShort x = case x of | |
| 8554 | + DoubleInUnionShort y -> Jenc.float y | |
| 8555 | + ShortInUnionShort y -> encodeShort y | |
| 8556 | + | |
| 8557 | +short : Jdec.Decoder Short | |
| 8558 | +short = | |
| 8559 | + Jdec.succeed Short | |
| 8560 | + | |
| 8561 | +encodeShort : Short -> Jenc.Value | |
| 8562 | +encodeShort x = | |
| 8563 | + Jenc.object | |
| 8564 | + [ | |
| 8565 | + ] | |
| 8566 | + | |
| 8567 | +unionSigned : Jdec.Decoder UnionSigned | |
| 8568 | +unionSigned = | |
| 8569 | + Jdec.oneOf | |
| 8570 | + [ Jdec.map DoubleInUnionSigned Jdec.float | |
| 8571 | + , Jdec.map SignedInUnionSigned signed | |
| 8572 | + ] | |
| 8573 | + | |
| 8574 | +encodeUnionSigned : UnionSigned -> Jenc.Value | |
| 8575 | +encodeUnionSigned x = case x of | |
| 8576 | + DoubleInUnionSigned y -> Jenc.float y | |
| 8577 | + SignedInUnionSigned y -> encodeSigned y | |
| 8578 | + | |
| 8579 | +signed : Jdec.Decoder Signed | |
| 8580 | +signed = | |
| 8581 | + Jdec.succeed Signed | |
| 8582 | + | |
| 8583 | +encodeSigned : Signed -> Jenc.Value | |
| 8584 | +encodeSigned x = | |
| 8585 | + Jenc.object | |
| 8586 | + [ | |
| 8587 | + ] | |
| 8588 | + | |
| 8589 | +unionSizeof : Jdec.Decoder UnionSizeof | |
| 8590 | +unionSizeof = | |
| 8591 | + Jdec.oneOf | |
| 8592 | + [ Jdec.map DoubleInUnionSizeof Jdec.float | |
| 8593 | + , Jdec.map SizeofInUnionSizeof sizeof | |
| 8594 | + ] | |
| 8595 | + | |
| 8596 | +encodeUnionSizeof : UnionSizeof -> Jenc.Value | |
| 8597 | +encodeUnionSizeof x = case x of | |
| 8598 | + DoubleInUnionSizeof y -> Jenc.float y | |
| 8599 | + SizeofInUnionSizeof y -> encodeSizeof y | |
| 8600 | + | |
| 8601 | +sizeof : Jdec.Decoder Sizeof | |
| 8602 | +sizeof = | |
| 8603 | + Jdec.succeed Sizeof | |
| 8604 | + | |
| 8605 | +encodeSizeof : Sizeof -> Jenc.Value | |
| 8606 | +encodeSizeof x = | |
| 8607 | + Jenc.object | |
| 8608 | + [ | |
| 8609 | + ] | |
| 8610 | + | |
| 8611 | +unionStackalloc : Jdec.Decoder UnionStackalloc | |
| 8612 | +unionStackalloc = | |
| 8613 | + Jdec.oneOf | |
| 8614 | + [ Jdec.map DoubleInUnionStackalloc Jdec.float | |
| 8615 | + , Jdec.map StackallocInUnionStackalloc stackalloc | |
| 8616 | + ] | |
| 8617 | + | |
| 8618 | +encodeUnionStackalloc : UnionStackalloc -> Jenc.Value | |
| 8619 | +encodeUnionStackalloc x = case x of | |
| 8620 | + DoubleInUnionStackalloc y -> Jenc.float y | |
| 8621 | + StackallocInUnionStackalloc y -> encodeStackalloc y | |
| 8622 | + | |
| 8623 | +stackalloc : Jdec.Decoder Stackalloc | |
| 8624 | +stackalloc = | |
| 8625 | + Jdec.succeed Stackalloc | |
| 8626 | + | |
| 8627 | +encodeStackalloc : Stackalloc -> Jenc.Value | |
| 8628 | +encodeStackalloc x = | |
| 8629 | + Jenc.object | |
| 8630 | + [ | |
| 8631 | + ] | |
| 8632 | + | |
| 8633 | +unionStatic : Jdec.Decoder UnionStatic | |
| 8634 | +unionStatic = | |
| 8635 | + Jdec.oneOf | |
| 8636 | + [ Jdec.map DoubleInUnionStatic Jdec.float | |
| 8637 | + , Jdec.map StaticInUnionStatic static | |
| 8638 | + ] | |
| 8639 | + | |
| 8640 | +encodeUnionStatic : UnionStatic -> Jenc.Value | |
| 8641 | +encodeUnionStatic x = case x of | |
| 8642 | + DoubleInUnionStatic y -> Jenc.float y | |
| 8643 | + StaticInUnionStatic y -> encodeStatic y | |
| 8644 | + | |
| 8645 | +static : Jdec.Decoder Static | |
| 8646 | +static = | |
| 8647 | + Jdec.succeed Static | |
| 8648 | + | |
| 8649 | +encodeStatic : Static -> Jenc.Value | |
| 8650 | +encodeStatic x = | |
| 8651 | + Jenc.object | |
| 8652 | + [ | |
| 8653 | + ] | |
| 8654 | + | |
| 8655 | +unionStaticAssert : Jdec.Decoder UnionStaticAssert | |
| 8656 | +unionStaticAssert = | |
| 8657 | + Jdec.oneOf | |
| 8658 | + [ Jdec.map DoubleInUnionStaticAssert Jdec.float | |
| 8659 | + , Jdec.map StaticAssertInUnionStaticAssert staticAssert | |
| 8660 | + ] | |
| 8661 | + | |
| 8662 | +encodeUnionStaticAssert : UnionStaticAssert -> Jenc.Value | |
| 8663 | +encodeUnionStaticAssert x = case x of | |
| 8664 | + DoubleInUnionStaticAssert y -> Jenc.float y | |
| 8665 | + StaticAssertInUnionStaticAssert y -> encodeStaticAssert y | |
| 8666 | + | |
| 8667 | +staticAssert : Jdec.Decoder StaticAssert | |
| 8668 | +staticAssert = | |
| 8669 | + Jdec.succeed StaticAssert | |
| 8670 | + | |
| 8671 | +encodeStaticAssert : StaticAssert -> Jenc.Value | |
| 8672 | +encodeStaticAssert x = | |
| 8673 | + Jenc.object | |
| 8674 | + [ | |
| 8675 | + ] | |
| 8676 | + | |
| 8677 | +unionStaticCast : Jdec.Decoder UnionStaticCast | |
| 8678 | +unionStaticCast = | |
| 8679 | + Jdec.oneOf | |
| 8680 | + [ Jdec.map DoubleInUnionStaticCast Jdec.float | |
| 8681 | + , Jdec.map StaticCastInUnionStaticCast staticCast | |
| 8682 | + ] | |
| 8683 | + | |
| 8684 | +encodeUnionStaticCast : UnionStaticCast -> Jenc.Value | |
| 8685 | +encodeUnionStaticCast x = case x of | |
| 8686 | + DoubleInUnionStaticCast y -> Jenc.float y | |
| 8687 | + StaticCastInUnionStaticCast y -> encodeStaticCast y | |
| 8688 | + | |
| 8689 | +staticCast : Jdec.Decoder StaticCast | |
| 8690 | +staticCast = | |
| 8691 | + Jdec.succeed StaticCast | |
| 8692 | + | |
| 8693 | +encodeStaticCast : StaticCast -> Jenc.Value | |
| 8694 | +encodeStaticCast x = | |
| 8695 | + Jenc.object | |
| 8696 | + [ | |
| 8697 | + ] | |
| 8698 | + | |
| 8699 | +unionStrictfp : Jdec.Decoder UnionStrictfp | |
| 8700 | +unionStrictfp = | |
| 8701 | + Jdec.oneOf | |
| 8702 | + [ Jdec.map DoubleInUnionStrictfp Jdec.float | |
| 8703 | + , Jdec.map StrictfpInUnionStrictfp strictfp | |
| 8704 | + ] | |
| 8705 | + | |
| 8706 | +encodeUnionStrictfp : UnionStrictfp -> Jenc.Value | |
| 8707 | +encodeUnionStrictfp x = case x of | |
| 8708 | + DoubleInUnionStrictfp y -> Jenc.float y | |
| 8709 | + StrictfpInUnionStrictfp y -> encodeStrictfp y | |
| 8710 | + | |
| 8711 | +strictfp : Jdec.Decoder Strictfp | |
| 8712 | +strictfp = | |
| 8713 | + Jdec.succeed Strictfp | |
| 8714 | + | |
| 8715 | +encodeStrictfp : Strictfp -> Jenc.Value | |
| 8716 | +encodeStrictfp x = | |
| 8717 | + Jenc.object | |
| 8718 | + [ | |
| 8719 | + ] | |
| 8720 | + | |
| 8721 | +unionStruct : Jdec.Decoder UnionStruct | |
| 8722 | +unionStruct = | |
| 8723 | + Jdec.oneOf | |
| 8724 | + [ Jdec.map DoubleInUnionStruct Jdec.float | |
| 8725 | + , Jdec.map StructInUnionStruct struct | |
| 8726 | + ] | |
| 8727 | + | |
| 8728 | +encodeUnionStruct : UnionStruct -> Jenc.Value | |
| 8729 | +encodeUnionStruct x = case x of | |
| 8730 | + DoubleInUnionStruct y -> Jenc.float y | |
| 8731 | + StructInUnionStruct y -> encodeStruct y | |
| 8732 | + | |
| 8733 | +struct : Jdec.Decoder Struct | |
| 8734 | +struct = | |
| 8735 | + Jdec.succeed Struct | |
| 8736 | + | |
| 8737 | +encodeStruct : Struct -> Jenc.Value | |
| 8738 | +encodeStruct x = | |
| 8739 | + Jenc.object | |
| 8740 | + [ | |
| 8741 | + ] | |
| 8742 | + | |
| 8743 | +unionSubscript : Jdec.Decoder UnionSubscript | |
| 8744 | +unionSubscript = | |
| 8745 | + Jdec.oneOf | |
| 8746 | + [ Jdec.map DoubleInUnionSubscript Jdec.float | |
| 8747 | + , Jdec.map SubscriptInUnionSubscript subscript | |
| 8748 | + ] | |
| 8749 | + | |
| 8750 | +encodeUnionSubscript : UnionSubscript -> Jenc.Value | |
| 8751 | +encodeUnionSubscript x = case x of | |
| 8752 | + DoubleInUnionSubscript y -> Jenc.float y | |
| 8753 | + SubscriptInUnionSubscript y -> encodeSubscript y | |
| 8754 | + | |
| 8755 | +subscript : Jdec.Decoder Subscript | |
| 8756 | +subscript = | |
| 8757 | + Jdec.succeed Subscript | |
| 8758 | + | |
| 8759 | +encodeSubscript : Subscript -> Jenc.Value | |
| 8760 | +encodeSubscript x = | |
| 8761 | + Jenc.object | |
| 8762 | + [ | |
| 8763 | + ] | |
| 8764 | + | |
| 8765 | +unionSuper : Jdec.Decoder UnionSuper | |
| 8766 | +unionSuper = | |
| 8767 | + Jdec.oneOf | |
| 8768 | + [ Jdec.map DoubleInUnionSuper Jdec.float | |
| 8769 | + , Jdec.map SuperInUnionSuper super | |
| 8770 | + ] | |
| 8771 | + | |
| 8772 | +encodeUnionSuper : UnionSuper -> Jenc.Value | |
| 8773 | +encodeUnionSuper x = case x of | |
| 8774 | + DoubleInUnionSuper y -> Jenc.float y | |
| 8775 | + SuperInUnionSuper y -> encodeSuper y | |
| 8776 | + | |
| 8777 | +super : Jdec.Decoder Super | |
| 8778 | +super = | |
| 8779 | + Jdec.succeed Super | |
| 8780 | + | |
| 8781 | +encodeSuper : Super -> Jenc.Value | |
| 8782 | +encodeSuper x = | |
| 8783 | + Jenc.object | |
| 8784 | + [ | |
| 8785 | + ] | |
| 8786 | + | |
| 8787 | +unionSwitch : Jdec.Decoder UnionSwitch | |
| 8788 | +unionSwitch = | |
| 8789 | + Jdec.oneOf | |
| 8790 | + [ Jdec.map DoubleInUnionSwitch Jdec.float | |
| 8791 | + , Jdec.map SwitchInUnionSwitch switch | |
| 8792 | + ] | |
| 8793 | + | |
| 8794 | +encodeUnionSwitch : UnionSwitch -> Jenc.Value | |
| 8795 | +encodeUnionSwitch x = case x of | |
| 8796 | + DoubleInUnionSwitch y -> Jenc.float y | |
| 8797 | + SwitchInUnionSwitch y -> encodeSwitch y | |
| 8798 | + | |
| 8799 | +switch : Jdec.Decoder Switch | |
| 8800 | +switch = | |
| 8801 | + Jdec.succeed Switch | |
| 8802 | + | |
| 8803 | +encodeSwitch : Switch -> Jenc.Value | |
| 8804 | +encodeSwitch x = | |
| 8805 | + Jenc.object | |
| 8806 | + [ | |
| 8807 | + ] | |
| 8808 | + | |
| 8809 | +unionSymbol : Jdec.Decoder UnionSymbol | |
| 8810 | +unionSymbol = | |
| 8811 | + Jdec.oneOf | |
| 8812 | + [ Jdec.map DoubleInUnionSymbol Jdec.float | |
| 8813 | + , Jdec.map SymbolInUnionSymbol symbol | |
| 8814 | + ] | |
| 8815 | + | |
| 8816 | +encodeUnionSymbol : UnionSymbol -> Jenc.Value | |
| 8817 | +encodeUnionSymbol x = case x of | |
| 8818 | + DoubleInUnionSymbol y -> Jenc.float y | |
| 8819 | + SymbolInUnionSymbol y -> encodeSymbol y | |
| 8820 | + | |
| 8821 | +symbol : Jdec.Decoder Symbol | |
| 8822 | +symbol = | |
| 8823 | + Jdec.succeed Symbol | |
| 8824 | + | |
| 8825 | +encodeSymbol : Symbol -> Jenc.Value | |
| 8826 | +encodeSymbol x = | |
| 8827 | + Jenc.object | |
| 8828 | + [ | |
| 8829 | + ] | |
| 8830 | + | |
| 8831 | +unionSynchronized : Jdec.Decoder UnionSynchronized | |
| 8832 | +unionSynchronized = | |
| 8833 | + Jdec.oneOf | |
| 8834 | + [ Jdec.map DoubleInUnionSynchronized Jdec.float | |
| 8835 | + , Jdec.map SynchronizedInUnionSynchronized synchronized | |
| 8836 | + ] | |
| 8837 | + | |
| 8838 | +encodeUnionSynchronized : UnionSynchronized -> Jenc.Value | |
| 8839 | +encodeUnionSynchronized x = case x of | |
| 8840 | + DoubleInUnionSynchronized y -> Jenc.float y | |
| 8841 | + SynchronizedInUnionSynchronized y -> encodeSynchronized y | |
| 8842 | + | |
| 8843 | +synchronized : Jdec.Decoder Synchronized | |
| 8844 | +synchronized = | |
| 8845 | + Jdec.succeed Synchronized | |
| 8846 | + | |
| 8847 | +encodeSynchronized : Synchronized -> Jenc.Value | |
| 8848 | +encodeSynchronized x = | |
| 8849 | + Jenc.object | |
| 8850 | + [ | |
| 8851 | + ] | |
| 8852 | + | |
| 8853 | +unionSystem : Jdec.Decoder UnionSystem | |
| 8854 | +unionSystem = | |
| 8855 | + Jdec.oneOf | |
| 8856 | + [ Jdec.map DoubleInUnionSystem Jdec.float | |
| 8857 | + , Jdec.map SystemInUnionSystem system | |
| 8858 | + ] | |
| 8859 | + | |
| 8860 | +encodeUnionSystem : UnionSystem -> Jenc.Value | |
| 8861 | +encodeUnionSystem x = case x of | |
| 8862 | + DoubleInUnionSystem y -> Jenc.float y | |
| 8863 | + SystemInUnionSystem y -> encodeSystem y | |
| 8864 | + | |
| 8865 | +system : Jdec.Decoder System | |
| 8866 | +system = | |
| 8867 | + Jdec.succeed System | |
| 8868 | + | |
| 8869 | +encodeSystem : System -> Jenc.Value | |
| 8870 | +encodeSystem x = | |
| 8871 | + Jenc.object | |
| 8872 | + [ | |
| 8873 | + ] | |
| 8874 | + | |
| 8875 | +unionTemplate : Jdec.Decoder UnionTemplate | |
| 8876 | +unionTemplate = | |
| 8877 | + Jdec.oneOf | |
| 8878 | + [ Jdec.map DoubleInUnionTemplate Jdec.float | |
| 8879 | + , Jdec.map TemplateInUnionTemplate template | |
| 8880 | + ] | |
| 8881 | + | |
| 8882 | +encodeUnionTemplate : UnionTemplate -> Jenc.Value | |
| 8883 | +encodeUnionTemplate x = case x of | |
| 8884 | + DoubleInUnionTemplate y -> Jenc.float y | |
| 8885 | + TemplateInUnionTemplate y -> encodeTemplate y | |
| 8886 | + | |
| 8887 | +template : Jdec.Decoder Template | |
| 8888 | +template = | |
| 8889 | + Jdec.succeed Template | |
| 8890 | + | |
| 8891 | +encodeTemplate : Template -> Jenc.Value | |
| 8892 | +encodeTemplate x = | |
| 8893 | + Jenc.object | |
| 8894 | + [ | |
| 8895 | + ] | |
| 8896 | + | |
| 8897 | +unionThis : Jdec.Decoder UnionThis | |
| 8898 | +unionThis = | |
| 8899 | + Jdec.oneOf | |
| 8900 | + [ Jdec.map DoubleInUnionThis Jdec.float | |
| 8901 | + , Jdec.map ThisInUnionThis this | |
| 8902 | + ] | |
| 8903 | + | |
| 8904 | +encodeUnionThis : UnionThis -> Jenc.Value | |
| 8905 | +encodeUnionThis x = case x of | |
| 8906 | + DoubleInUnionThis y -> Jenc.float y | |
| 8907 | + ThisInUnionThis y -> encodeThis y | |
| 8908 | + | |
| 8909 | +this : Jdec.Decoder This | |
| 8910 | +this = | |
| 8911 | + Jdec.succeed This | |
| 8912 | + | |
| 8913 | +encodeThis : This -> Jenc.Value | |
| 8914 | +encodeThis x = | |
| 8915 | + Jenc.object | |
| 8916 | + [ | |
| 8917 | + ] | |
| 8918 | + | |
| 8919 | +unionThreadLocal : Jdec.Decoder UnionThreadLocal | |
| 8920 | +unionThreadLocal = | |
| 8921 | + Jdec.oneOf | |
| 8922 | + [ Jdec.map DoubleInUnionThreadLocal Jdec.float | |
| 8923 | + , Jdec.map ThreadLocalInUnionThreadLocal threadLocal | |
| 8924 | + ] | |
| 8925 | + | |
| 8926 | +encodeUnionThreadLocal : UnionThreadLocal -> Jenc.Value | |
| 8927 | +encodeUnionThreadLocal x = case x of | |
| 8928 | + DoubleInUnionThreadLocal y -> Jenc.float y | |
| 8929 | + ThreadLocalInUnionThreadLocal y -> encodeThreadLocal y | |
| 8930 | + | |
| 8931 | +threadLocal : Jdec.Decoder ThreadLocal | |
| 8932 | +threadLocal = | |
| 8933 | + Jdec.succeed ThreadLocal | |
| 8934 | + | |
| 8935 | +encodeThreadLocal : ThreadLocal -> Jenc.Value | |
| 8936 | +encodeThreadLocal x = | |
| 8937 | + Jenc.object | |
| 8938 | + [ | |
| 8939 | + ] | |
| 8940 | + | |
| 8941 | +unionThrow : Jdec.Decoder UnionThrow | |
| 8942 | +unionThrow = | |
| 8943 | + Jdec.oneOf | |
| 8944 | + [ Jdec.map DoubleInUnionThrow Jdec.float | |
| 8945 | + , Jdec.map ThrowInUnionThrow throw | |
| 8946 | + ] | |
| 8947 | + | |
| 8948 | +encodeUnionThrow : UnionThrow -> Jenc.Value | |
| 8949 | +encodeUnionThrow x = case x of | |
| 8950 | + DoubleInUnionThrow y -> Jenc.float y | |
| 8951 | + ThrowInUnionThrow y -> encodeThrow y | |
| 8952 | + | |
| 8953 | +throw : Jdec.Decoder Throw | |
| 8954 | +throw = | |
| 8955 | + Jdec.succeed Throw | |
| 8956 | + | |
| 8957 | +encodeThrow : Throw -> Jenc.Value | |
| 8958 | +encodeThrow x = | |
| 8959 | + Jenc.object | |
| 8960 | + [ | |
| 8961 | + ] | |
| 8962 | + | |
| 8963 | +unionThrows : Jdec.Decoder UnionThrows | |
| 8964 | +unionThrows = | |
| 8965 | + Jdec.oneOf | |
| 8966 | + [ Jdec.map DoubleInUnionThrows Jdec.float | |
| 8967 | + , Jdec.map ThrowsInUnionThrows throws | |
| 8968 | + ] | |
| 8969 | + | |
| 8970 | +encodeUnionThrows : UnionThrows -> Jenc.Value | |
| 8971 | +encodeUnionThrows x = case x of | |
| 8972 | + DoubleInUnionThrows y -> Jenc.float y | |
| 8973 | + ThrowsInUnionThrows y -> encodeThrows y | |
| 8974 | + | |
| 8975 | +throws : Jdec.Decoder Throws | |
| 8976 | +throws = | |
| 8977 | + Jdec.succeed Throws | |
| 8978 | + | |
| 8979 | +encodeThrows : Throws -> Jenc.Value | |
| 8980 | +encodeThrows x = | |
| 8981 | + Jenc.object | |
| 8982 | + [ | |
| 8983 | + ] | |
| 8984 | + | |
| 8985 | +unionToJSON : Jdec.Decoder UnionToJSON | |
| 8986 | +unionToJSON = | |
| 8987 | + Jdec.oneOf | |
| 8988 | + [ Jdec.map DoubleInUnionToJSON Jdec.float | |
| 8989 | + , Jdec.map ToJSONInUnionToJSON toJSON | |
| 8990 | + ] | |
| 8991 | + | |
| 8992 | +encodeUnionToJSON : UnionToJSON -> Jenc.Value | |
| 8993 | +encodeUnionToJSON x = case x of | |
| 8994 | + DoubleInUnionToJSON y -> Jenc.float y | |
| 8995 | + ToJSONInUnionToJSON y -> encodeToJSON y | |
| 8996 | + | |
| 8997 | +toJSON : Jdec.Decoder ToJSON | |
| 8998 | +toJSON = | |
| 8999 | + Jdec.succeed ToJSON | |
| 9000 | + | |
| 9001 | +encodeToJSON : ToJSON -> Jenc.Value | |
| 9002 | +encodeToJSON x = | |
| 9003 | + Jenc.object | |
| 9004 | + [ | |
| 9005 | + ] | |
| 9006 | + | |
| 9007 | +unionTopLevel : Jdec.Decoder UnionTopLevel | |
| 9008 | +unionTopLevel = | |
| 9009 | + Jdec.oneOf | |
| 9010 | + [ Jdec.map DoubleInUnionTopLevel Jdec.float | |
| 9011 | + , Jdec.map TopLevelInUnionTopLevel topLevel | |
| 9012 | + ] | |
| 9013 | + | |
| 9014 | +encodeUnionTopLevel : UnionTopLevel -> Jenc.Value | |
| 9015 | +encodeUnionTopLevel x = case x of | |
| 9016 | + DoubleInUnionTopLevel y -> Jenc.float y | |
| 9017 | + TopLevelInUnionTopLevel y -> encodeTopLevel y | |
| 9018 | + | |
| 9019 | +topLevel : Jdec.Decoder TopLevel | |
| 9020 | +topLevel = | |
| 9021 | + Jdec.succeed TopLevel | |
| 9022 | + | |
| 9023 | +encodeTopLevel : TopLevel -> Jenc.Value | |
| 9024 | +encodeTopLevel x = | |
| 9025 | + Jenc.object | |
| 9026 | + [ | |
| 9027 | + ] | |
| 9028 | + | |
| 9029 | +unionTransient : Jdec.Decoder UnionTransient | |
| 9030 | +unionTransient = | |
| 9031 | + Jdec.oneOf | |
| 9032 | + [ Jdec.map DoubleInUnionTransient Jdec.float | |
| 9033 | + , Jdec.map TransientInUnionTransient transient | |
| 9034 | + ] | |
| 9035 | + | |
| 9036 | +encodeUnionTransient : UnionTransient -> Jenc.Value | |
| 9037 | +encodeUnionTransient x = case x of | |
| 9038 | + DoubleInUnionTransient y -> Jenc.float y | |
| 9039 | + TransientInUnionTransient y -> encodeTransient y | |
| 9040 | + | |
| 9041 | +transient : Jdec.Decoder Transient | |
| 9042 | +transient = | |
| 9043 | + Jdec.succeed Transient | |
| 9044 | + | |
| 9045 | +encodeTransient : Transient -> Jenc.Value | |
| 9046 | +encodeTransient x = | |
| 9047 | + Jenc.object | |
| 9048 | + [ | |
| 9049 | + ] | |
| 9050 | + | |
| 9051 | +unionTrue : Jdec.Decoder UnionTrue | |
| 9052 | +unionTrue = | |
| 9053 | + Jdec.oneOf | |
| 9054 | + [ Jdec.map DoubleInUnionTrue Jdec.float | |
| 9055 | + , Jdec.map TrueClassInUnionTrue trueClass | |
| 9056 | + ] | |
| 9057 | + | |
| 9058 | +encodeUnionTrue : UnionTrue -> Jenc.Value | |
| 9059 | +encodeUnionTrue x = case x of | |
| 9060 | + DoubleInUnionTrue y -> Jenc.float y | |
| 9061 | + TrueClassInUnionTrue y -> encodeTrueClass y | |
| 9062 | + | |
| 9063 | +trueClass : Jdec.Decoder TrueClass | |
| 9064 | +trueClass = | |
| 9065 | + Jdec.succeed TrueClass | |
| 9066 | + | |
| 9067 | +encodeTrueClass : TrueClass -> Jenc.Value | |
| 9068 | +encodeTrueClass x = | |
| 9069 | + Jenc.object | |
| 9070 | + [ | |
| 9071 | + ] | |
| 9072 | + | |
| 9073 | +unionTry : Jdec.Decoder UnionTry | |
| 9074 | +unionTry = | |
| 9075 | + Jdec.oneOf | |
| 9076 | + [ Jdec.map DoubleInUnionTry Jdec.float | |
| 9077 | + , Jdec.map TryInUnionTry try | |
| 9078 | + ] | |
| 9079 | + | |
| 9080 | +encodeUnionTry : UnionTry -> Jenc.Value | |
| 9081 | +encodeUnionTry x = case x of | |
| 9082 | + DoubleInUnionTry y -> Jenc.float y | |
| 9083 | + TryInUnionTry y -> encodeTry y | |
| 9084 | + | |
| 9085 | +try : Jdec.Decoder Try | |
| 9086 | +try = | |
| 9087 | + Jdec.succeed Try | |
| 9088 | + | |
| 9089 | +encodeTry : Try -> Jenc.Value | |
| 9090 | +encodeTry x = | |
| 9091 | + Jenc.object | |
| 9092 | + [ | |
| 9093 | + ] | |
| 9094 | + | |
| 9095 | +unionTypealias : Jdec.Decoder UnionTypealias | |
| 9096 | +unionTypealias = | |
| 9097 | + Jdec.oneOf | |
| 9098 | + [ Jdec.map DoubleInUnionTypealias Jdec.float | |
| 9099 | + , Jdec.map TypealiasInUnionTypealias typealias | |
| 9100 | + ] | |
| 9101 | + | |
| 9102 | +encodeUnionTypealias : UnionTypealias -> Jenc.Value | |
| 9103 | +encodeUnionTypealias x = case x of | |
| 9104 | + DoubleInUnionTypealias y -> Jenc.float y | |
| 9105 | + TypealiasInUnionTypealias y -> encodeTypealias y | |
| 9106 | + | |
| 9107 | +typealias : Jdec.Decoder Typealias | |
| 9108 | +typealias = | |
| 9109 | + Jdec.succeed Typealias | |
| 9110 | + | |
| 9111 | +encodeTypealias : Typealias -> Jenc.Value | |
| 9112 | +encodeTypealias x = | |
| 9113 | + Jenc.object | |
| 9114 | + [ | |
| 9115 | + ] | |
| 9116 | + | |
| 9117 | +unionTypedef : Jdec.Decoder UnionTypedef | |
| 9118 | +unionTypedef = | |
| 9119 | + Jdec.oneOf | |
| 9120 | + [ Jdec.map DoubleInUnionTypedef Jdec.float | |
| 9121 | + , Jdec.map TypedefInUnionTypedef typedef | |
| 9122 | + ] | |
| 9123 | + | |
| 9124 | +encodeUnionTypedef : UnionTypedef -> Jenc.Value | |
| 9125 | +encodeUnionTypedef x = case x of | |
| 9126 | + DoubleInUnionTypedef y -> Jenc.float y | |
| 9127 | + TypedefInUnionTypedef y -> encodeTypedef y | |
| 9128 | + | |
| 9129 | +typedef : Jdec.Decoder Typedef | |
| 9130 | +typedef = | |
| 9131 | + Jdec.succeed Typedef | |
| 9132 | + | |
| 9133 | +encodeTypedef : Typedef -> Jenc.Value | |
| 9134 | +encodeTypedef x = | |
| 9135 | + Jenc.object | |
| 9136 | + [ | |
| 9137 | + ] | |
| 9138 | + | |
| 9139 | +unionTypeid : Jdec.Decoder UnionTypeid | |
| 9140 | +unionTypeid = | |
| 9141 | + Jdec.oneOf | |
| 9142 | + [ Jdec.map DoubleInUnionTypeid Jdec.float | |
| 9143 | + , Jdec.map TypeidInUnionTypeid typeid | |
| 9144 | + ] | |
| 9145 | + | |
| 9146 | +encodeUnionTypeid : UnionTypeid -> Jenc.Value | |
| 9147 | +encodeUnionTypeid x = case x of | |
| 9148 | + DoubleInUnionTypeid y -> Jenc.float y | |
| 9149 | + TypeidInUnionTypeid y -> encodeTypeid y | |
| 9150 | + | |
| 9151 | +typeid : Jdec.Decoder Typeid | |
| 9152 | +typeid = | |
| 9153 | + Jdec.succeed Typeid | |
| 9154 | + | |
| 9155 | +encodeTypeid : Typeid -> Jenc.Value | |
| 9156 | +encodeTypeid x = | |
| 9157 | + Jenc.object | |
| 9158 | + [ | |
| 9159 | + ] | |
| 9160 | + | |
| 9161 | +unionTypename : Jdec.Decoder UnionTypename | |
| 9162 | +unionTypename = | |
| 9163 | + Jdec.oneOf | |
| 9164 | + [ Jdec.map DoubleInUnionTypename Jdec.float | |
| 9165 | + , Jdec.map TypenameInUnionTypename typename | |
| 9166 | + ] | |
| 9167 | + | |
| 9168 | +encodeUnionTypename : UnionTypename -> Jenc.Value | |
| 9169 | +encodeUnionTypename x = case x of | |
| 9170 | + DoubleInUnionTypename y -> Jenc.float y | |
| 9171 | + TypenameInUnionTypename y -> encodeTypename y | |
| 9172 | + | |
| 9173 | +typename : Jdec.Decoder Typename | |
| 9174 | +typename = | |
| 9175 | + Jdec.succeed Typename | |
| 9176 | + | |
| 9177 | +encodeTypename : Typename -> Jenc.Value | |
| 9178 | +encodeTypename x = | |
| 9179 | + Jenc.object | |
| 9180 | + [ | |
| 9181 | + ] | |
| 9182 | + | |
| 9183 | +unionTypeof : Jdec.Decoder UnionTypeof | |
| 9184 | +unionTypeof = | |
| 9185 | + Jdec.oneOf | |
| 9186 | + [ Jdec.map DoubleInUnionTypeof Jdec.float | |
| 9187 | + , Jdec.map TypeofInUnionTypeof typeof | |
| 9188 | + ] | |
| 9189 | + | |
| 9190 | +encodeUnionTypeof : UnionTypeof -> Jenc.Value | |
| 9191 | +encodeUnionTypeof x = case x of | |
| 9192 | + DoubleInUnionTypeof y -> Jenc.float y | |
| 9193 | + TypeofInUnionTypeof y -> encodeTypeof y | |
| 9194 | + | |
| 9195 | +typeof : Jdec.Decoder Typeof | |
| 9196 | +typeof = | |
| 9197 | + Jdec.succeed Typeof | |
| 9198 | + | |
| 9199 | +encodeTypeof : Typeof -> Jenc.Value | |
| 9200 | +encodeTypeof x = | |
| 9201 | + Jenc.object | |
| 9202 | + [ | |
| 9203 | + ] | |
| 9204 | + | |
| 9205 | +unionUint : Jdec.Decoder UnionUint | |
| 9206 | +unionUint = | |
| 9207 | + Jdec.oneOf | |
| 9208 | + [ Jdec.map DoubleInUnionUint Jdec.float | |
| 9209 | + , Jdec.map UintInUnionUint uint | |
| 9210 | + ] | |
| 9211 | + | |
| 9212 | +encodeUnionUint : UnionUint -> Jenc.Value | |
| 9213 | +encodeUnionUint x = case x of | |
| 9214 | + DoubleInUnionUint y -> Jenc.float y | |
| 9215 | + UintInUnionUint y -> encodeUint y | |
| 9216 | + | |
| 9217 | +uint : Jdec.Decoder Uint | |
| 9218 | +uint = | |
| 9219 | + Jdec.succeed Uint | |
| 9220 | + | |
| 9221 | +encodeUint : Uint -> Jenc.Value | |
| 9222 | +encodeUint x = | |
| 9223 | + Jenc.object | |
| 9224 | + [ | |
| 9225 | + ] | |
| 9226 | + | |
| 9227 | +unionUlong : Jdec.Decoder UnionUlong | |
| 9228 | +unionUlong = | |
| 9229 | + Jdec.oneOf | |
| 9230 | + [ Jdec.map DoubleInUnionUlong Jdec.float | |
| 9231 | + , Jdec.map UlongInUnionUlong ulong | |
| 9232 | + ] | |
| 9233 | + | |
| 9234 | +encodeUnionUlong : UnionUlong -> Jenc.Value | |
| 9235 | +encodeUnionUlong x = case x of | |
| 9236 | + DoubleInUnionUlong y -> Jenc.float y | |
| 9237 | + UlongInUnionUlong y -> encodeUlong y | |
| 9238 | + | |
| 9239 | +ulong : Jdec.Decoder Ulong | |
| 9240 | +ulong = | |
| 9241 | + Jdec.succeed Ulong | |
| 9242 | + | |
| 9243 | +encodeUlong : Ulong -> Jenc.Value | |
| 9244 | +encodeUlong x = | |
| 9245 | + Jenc.object | |
| 9246 | + [ | |
| 9247 | + ] | |
| 9248 | + | |
| 9249 | +unionUnchecked : Jdec.Decoder UnionUnchecked | |
| 9250 | +unionUnchecked = | |
| 9251 | + Jdec.oneOf | |
| 9252 | + [ Jdec.map DoubleInUnionUnchecked Jdec.float | |
| 9253 | + , Jdec.map UncheckedInUnionUnchecked unchecked | |
| 9254 | + ] | |
| 9255 | + | |
| 9256 | +encodeUnionUnchecked : UnionUnchecked -> Jenc.Value | |
| 9257 | +encodeUnionUnchecked x = case x of | |
| 9258 | + DoubleInUnionUnchecked y -> Jenc.float y | |
| 9259 | + UncheckedInUnionUnchecked y -> encodeUnchecked y | |
| 9260 | + | |
| 9261 | +unchecked : Jdec.Decoder Unchecked | |
| 9262 | +unchecked = | |
| 9263 | + Jdec.succeed Unchecked | |
| 9264 | + | |
| 9265 | +encodeUnchecked : Unchecked -> Jenc.Value | |
| 9266 | +encodeUnchecked x = | |
| 9267 | + Jenc.object | |
| 9268 | + [ | |
| 9269 | + ] | |
| 9270 | + | |
| 9271 | +unionUndefined : Jdec.Decoder UnionUndefined | |
| 9272 | +unionUndefined = | |
| 9273 | + Jdec.oneOf | |
| 9274 | + [ Jdec.map DoubleInUnionUndefined Jdec.float | |
| 9275 | + , Jdec.map UndefinedInUnionUndefined undefined | |
| 9276 | + ] | |
| 9277 | + | |
| 9278 | +encodeUnionUndefined : UnionUndefined -> Jenc.Value | |
| 9279 | +encodeUnionUndefined x = case x of | |
| 9280 | + DoubleInUnionUndefined y -> Jenc.float y | |
| 9281 | + UndefinedInUnionUndefined y -> encodeUndefined y | |
| 9282 | + | |
| 9283 | +undefined : Jdec.Decoder Undefined | |
| 9284 | +undefined = | |
| 9285 | + Jdec.succeed Undefined | |
| 9286 | + | |
| 9287 | +encodeUndefined : Undefined -> Jenc.Value | |
| 9288 | +encodeUndefined x = | |
| 9289 | + Jenc.object | |
| 9290 | + [ | |
| 9291 | + ] | |
| 9292 | + | |
| 9293 | +unionUnionUnion : Jdec.Decoder UnionUnionUnion | |
| 9294 | +unionUnionUnion = | |
| 9295 | + Jdec.oneOf | |
| 9296 | + [ Jdec.map DoubleInUnionUnionUnion Jdec.float | |
| 9297 | + , Jdec.map UnionInUnionUnionUnion union | |
| 9298 | + ] | |
| 9299 | + | |
| 9300 | +encodeUnionUnionUnion : UnionUnionUnion -> Jenc.Value | |
| 9301 | +encodeUnionUnionUnion x = case x of | |
| 9302 | + DoubleInUnionUnionUnion y -> Jenc.float y | |
| 9303 | + UnionInUnionUnionUnion y -> encodeUnion y | |
| 9304 | + | |
| 9305 | +union : Jdec.Decoder Union | |
| 9306 | +union = | |
| 9307 | + Jdec.succeed Union | |
| 9308 | + | |
| 9309 | +encodeUnion : Union -> Jenc.Value | |
| 9310 | +encodeUnion x = | |
| 9311 | + Jenc.object | |
| 9312 | + [ | |
| 9313 | + ] | |
| 9314 | + | |
| 9315 | +unionUnowned : Jdec.Decoder UnionUnowned | |
| 9316 | +unionUnowned = | |
| 9317 | + Jdec.oneOf | |
| 9318 | + [ Jdec.map DoubleInUnionUnowned Jdec.float | |
| 9319 | + , Jdec.map UnownedInUnionUnowned unowned | |
| 9320 | + ] | |
| 9321 | + | |
| 9322 | +encodeUnionUnowned : UnionUnowned -> Jenc.Value | |
| 9323 | +encodeUnionUnowned x = case x of | |
| 9324 | + DoubleInUnionUnowned y -> Jenc.float y | |
| 9325 | + UnownedInUnionUnowned y -> encodeUnowned y | |
| 9326 | + | |
| 9327 | +unowned : Jdec.Decoder Unowned | |
| 9328 | +unowned = | |
| 9329 | + Jdec.succeed Unowned | |
| 9330 | + | |
| 9331 | +encodeUnowned : Unowned -> Jenc.Value | |
| 9332 | +encodeUnowned x = | |
| 9333 | + Jenc.object | |
| 9334 | + [ | |
| 9335 | + ] | |
| 9336 | + | |
| 9337 | +unionUnsafe : Jdec.Decoder UnionUnsafe | |
| 9338 | +unionUnsafe = | |
| 9339 | + Jdec.oneOf | |
| 9340 | + [ Jdec.map DoubleInUnionUnsafe Jdec.float | |
| 9341 | + , Jdec.map UnsafeInUnionUnsafe unsafe | |
| 9342 | + ] | |
| 9343 | + | |
| 9344 | +encodeUnionUnsafe : UnionUnsafe -> Jenc.Value | |
| 9345 | +encodeUnionUnsafe x = case x of | |
| 9346 | + DoubleInUnionUnsafe y -> Jenc.float y | |
| 9347 | + UnsafeInUnionUnsafe y -> encodeUnsafe y | |
| 9348 | + | |
| 9349 | +unsafe : Jdec.Decoder Unsafe | |
| 9350 | +unsafe = | |
| 9351 | + Jdec.succeed Unsafe | |
| 9352 | + | |
| 9353 | +encodeUnsafe : Unsafe -> Jenc.Value | |
| 9354 | +encodeUnsafe x = | |
| 9355 | + Jenc.object | |
| 9356 | + [ | |
| 9357 | + ] | |
| 9358 | + | |
| 9359 | +unionUnsigned : Jdec.Decoder UnionUnsigned | |
| 9360 | +unionUnsigned = | |
| 9361 | + Jdec.oneOf | |
| 9362 | + [ Jdec.map DoubleInUnionUnsigned Jdec.float | |
| 9363 | + , Jdec.map UnsignedInUnionUnsigned unsigned | |
| 9364 | + ] | |
| 9365 | + | |
| 9366 | +encodeUnionUnsigned : UnionUnsigned -> Jenc.Value | |
| 9367 | +encodeUnionUnsigned x = case x of | |
| 9368 | + DoubleInUnionUnsigned y -> Jenc.float y | |
| 9369 | + UnsignedInUnionUnsigned y -> encodeUnsigned y | |
| 9370 | + | |
| 9371 | +unsigned : Jdec.Decoder Unsigned | |
| 9372 | +unsigned = | |
| 9373 | + Jdec.succeed Unsigned | |
| 9374 | + | |
| 9375 | +encodeUnsigned : Unsigned -> Jenc.Value | |
| 9376 | +encodeUnsigned x = | |
| 9377 | + Jenc.object | |
| 9378 | + [ | |
| 9379 | + ] | |
| 9380 | + | |
| 9381 | +unionUshort : Jdec.Decoder UnionUshort | |
| 9382 | +unionUshort = | |
| 9383 | + Jdec.oneOf | |
| 9384 | + [ Jdec.map DoubleInUnionUshort Jdec.float | |
| 9385 | + , Jdec.map UshortInUnionUshort ushort | |
| 9386 | + ] | |
| 9387 | + | |
| 9388 | +encodeUnionUshort : UnionUshort -> Jenc.Value | |
| 9389 | +encodeUnionUshort x = case x of | |
| 9390 | + DoubleInUnionUshort y -> Jenc.float y | |
| 9391 | + UshortInUnionUshort y -> encodeUshort y | |
| 9392 | + | |
| 9393 | +ushort : Jdec.Decoder Ushort | |
| 9394 | +ushort = | |
| 9395 | + Jdec.succeed Ushort | |
| 9396 | + | |
| 9397 | +encodeUshort : Ushort -> Jenc.Value | |
| 9398 | +encodeUshort x = | |
| 9399 | + Jenc.object | |
| 9400 | + [ | |
| 9401 | + ] | |
| 9402 | + | |
| 9403 | +unionUsing : Jdec.Decoder UnionUsing | |
| 9404 | +unionUsing = | |
| 9405 | + Jdec.oneOf | |
| 9406 | + [ Jdec.map DoubleInUnionUsing Jdec.float | |
| 9407 | + , Jdec.map UsingInUnionUsing using | |
| 9408 | + ] | |
| 9409 | + | |
| 9410 | +encodeUnionUsing : UnionUsing -> Jenc.Value | |
| 9411 | +encodeUnionUsing x = case x of | |
| 9412 | + DoubleInUnionUsing y -> Jenc.float y | |
| 9413 | + UsingInUnionUsing y -> encodeUsing y | |
| 9414 | + | |
| 9415 | +using : Jdec.Decoder Using | |
| 9416 | +using = | |
| 9417 | + Jdec.succeed Using | |
| 9418 | + | |
| 9419 | +encodeUsing : Using -> Jenc.Value | |
| 9420 | +encodeUsing x = | |
| 9421 | + Jenc.object | |
| 9422 | + [ | |
| 9423 | + ] | |
| 9424 | + | |
| 9425 | +unionVar : Jdec.Decoder UnionVar | |
| 9426 | +unionVar = | |
| 9427 | + Jdec.oneOf | |
| 9428 | + [ Jdec.map DoubleInUnionVar Jdec.float | |
| 9429 | + , Jdec.map VarInUnionVar var | |
| 9430 | + ] | |
| 9431 | + | |
| 9432 | +encodeUnionVar : UnionVar -> Jenc.Value | |
| 9433 | +encodeUnionVar x = case x of | |
| 9434 | + DoubleInUnionVar y -> Jenc.float y | |
| 9435 | + VarInUnionVar y -> encodeVar y | |
| 9436 | + | |
| 9437 | +var : Jdec.Decoder Var | |
| 9438 | +var = | |
| 9439 | + Jdec.succeed Var | |
| 9440 | + | |
| 9441 | +encodeVar : Var -> Jenc.Value | |
| 9442 | +encodeVar x = | |
| 9443 | + Jenc.object | |
| 9444 | + [ | |
| 9445 | + ] | |
| 9446 | + | |
| 9447 | +unionVirtual : Jdec.Decoder UnionVirtual | |
| 9448 | +unionVirtual = | |
| 9449 | + Jdec.oneOf | |
| 9450 | + [ Jdec.map DoubleInUnionVirtual Jdec.float | |
| 9451 | + , Jdec.map VirtualInUnionVirtual virtual | |
| 9452 | + ] | |
| 9453 | + | |
| 9454 | +encodeUnionVirtual : UnionVirtual -> Jenc.Value | |
| 9455 | +encodeUnionVirtual x = case x of | |
| 9456 | + DoubleInUnionVirtual y -> Jenc.float y | |
| 9457 | + VirtualInUnionVirtual y -> encodeVirtual y | |
| 9458 | + | |
| 9459 | +virtual : Jdec.Decoder Virtual | |
| 9460 | +virtual = | |
| 9461 | + Jdec.succeed Virtual | |
| 9462 | + | |
| 9463 | +encodeVirtual : Virtual -> Jenc.Value | |
| 9464 | +encodeVirtual x = | |
| 9465 | + Jenc.object | |
| 9466 | + [ | |
| 9467 | + ] | |
| 9468 | + | |
| 9469 | +unionVoid : Jdec.Decoder UnionVoid | |
| 9470 | +unionVoid = | |
| 9471 | + Jdec.oneOf | |
| 9472 | + [ Jdec.map DoubleInUnionVoid Jdec.float | |
| 9473 | + , Jdec.map VoidInUnionVoid void | |
| 9474 | + ] | |
| 9475 | + | |
| 9476 | +encodeUnionVoid : UnionVoid -> Jenc.Value | |
| 9477 | +encodeUnionVoid x = case x of | |
| 9478 | + DoubleInUnionVoid y -> Jenc.float y | |
| 9479 | + VoidInUnionVoid y -> encodeVoid y | |
| 9480 | + | |
| 9481 | +void : Jdec.Decoder Void | |
| 9482 | +void = | |
| 9483 | + Jdec.succeed Void | |
| 9484 | + | |
| 9485 | +encodeVoid : Void -> Jenc.Value | |
| 9486 | +encodeVoid x = | |
| 9487 | + Jenc.object | |
| 9488 | + [ | |
| 9489 | + ] | |
| 9490 | + | |
| 9491 | +unionVolatile : Jdec.Decoder UnionVolatile | |
| 9492 | +unionVolatile = | |
| 9493 | + Jdec.oneOf | |
| 9494 | + [ Jdec.map DoubleInUnionVolatile Jdec.float | |
| 9495 | + , Jdec.map VolatileInUnionVolatile volatile | |
| 9496 | + ] | |
| 9497 | + | |
| 9498 | +encodeUnionVolatile : UnionVolatile -> Jenc.Value | |
| 9499 | +encodeUnionVolatile x = case x of | |
| 9500 | + DoubleInUnionVolatile y -> Jenc.float y | |
| 9501 | + VolatileInUnionVolatile y -> encodeVolatile y | |
| 9502 | + | |
| 9503 | +volatile : Jdec.Decoder Volatile | |
| 9504 | +volatile = | |
| 9505 | + Jdec.succeed Volatile | |
| 9506 | + | |
| 9507 | +encodeVolatile : Volatile -> Jenc.Value | |
| 9508 | +encodeVolatile x = | |
| 9509 | + Jenc.object | |
| 9510 | + [ | |
| 9511 | + ] | |
| 9512 | + | |
| 9513 | +unionWcharT : Jdec.Decoder UnionWcharT | |
| 9514 | +unionWcharT = | |
| 9515 | + Jdec.oneOf | |
| 9516 | + [ Jdec.map DoubleInUnionWcharT Jdec.float | |
| 9517 | + , Jdec.map WcharTInUnionWcharT wcharT | |
| 9518 | + ] | |
| 9519 | + | |
| 9520 | +encodeUnionWcharT : UnionWcharT -> Jenc.Value | |
| 9521 | +encodeUnionWcharT x = case x of | |
| 9522 | + DoubleInUnionWcharT y -> Jenc.float y | |
| 9523 | + WcharTInUnionWcharT y -> encodeWcharT y | |
| 9524 | + | |
| 9525 | +wcharT : Jdec.Decoder WcharT | |
| 9526 | +wcharT = | |
| 9527 | + Jdec.succeed WcharT | |
| 9528 | + | |
| 9529 | +encodeWcharT : WcharT -> Jenc.Value | |
| 9530 | +encodeWcharT x = | |
| 9531 | + Jenc.object | |
| 9532 | + [ | |
| 9533 | + ] | |
| 9534 | + | |
| 9535 | +unionWeak : Jdec.Decoder UnionWeak | |
| 9536 | +unionWeak = | |
| 9537 | + Jdec.oneOf | |
| 9538 | + [ Jdec.map DoubleInUnionWeak Jdec.float | |
| 9539 | + , Jdec.map WeakInUnionWeak weak | |
| 9540 | + ] | |
| 9541 | + | |
| 9542 | +encodeUnionWeak : UnionWeak -> Jenc.Value | |
| 9543 | +encodeUnionWeak x = case x of | |
| 9544 | + DoubleInUnionWeak y -> Jenc.float y | |
| 9545 | + WeakInUnionWeak y -> encodeWeak y | |
| 9546 | + | |
| 9547 | +weak : Jdec.Decoder Weak | |
| 9548 | +weak = | |
| 9549 | + Jdec.succeed Weak | |
| 9550 | + | |
| 9551 | +encodeWeak : Weak -> Jenc.Value | |
| 9552 | +encodeWeak x = | |
| 9553 | + Jenc.object | |
| 9554 | + [ | |
| 9555 | + ] | |
| 9556 | + | |
| 9557 | +unionWhile : Jdec.Decoder UnionWhile | |
| 9558 | +unionWhile = | |
| 9559 | + Jdec.oneOf | |
| 9560 | + [ Jdec.map DoubleInUnionWhile Jdec.float | |
| 9561 | + , Jdec.map WhileInUnionWhile while | |
| 9562 | + ] | |
| 9563 | + | |
| 9564 | +encodeUnionWhile : UnionWhile -> Jenc.Value | |
| 9565 | +encodeUnionWhile x = case x of | |
| 9566 | + DoubleInUnionWhile y -> Jenc.float y | |
| 9567 | + WhileInUnionWhile y -> encodeWhile y | |
| 9568 | + | |
| 9569 | +while : Jdec.Decoder While | |
| 9570 | +while = | |
| 9571 | + Jdec.succeed While | |
| 9572 | + | |
| 9573 | +encodeWhile : While -> Jenc.Value | |
| 9574 | +encodeWhile x = | |
| 9575 | + Jenc.object | |
| 9576 | + [ | |
| 9577 | + ] | |
| 9578 | + | |
| 9579 | +unionWillSet : Jdec.Decoder UnionWillSet | |
| 9580 | +unionWillSet = | |
| 9581 | + Jdec.oneOf | |
| 9582 | + [ Jdec.map DoubleInUnionWillSet Jdec.float | |
| 9583 | + , Jdec.map WillSetInUnionWillSet willSet | |
| 9584 | + ] | |
| 9585 | + | |
| 9586 | +encodeUnionWillSet : UnionWillSet -> Jenc.Value | |
| 9587 | +encodeUnionWillSet x = case x of | |
| 9588 | + DoubleInUnionWillSet y -> Jenc.float y | |
| 9589 | + WillSetInUnionWillSet y -> encodeWillSet y | |
| 9590 | + | |
| 9591 | +willSet : Jdec.Decoder WillSet | |
| 9592 | +willSet = | |
| 9593 | + Jdec.succeed WillSet | |
| 9594 | + | |
| 9595 | +encodeWillSet : WillSet -> Jenc.Value | |
| 9596 | +encodeWillSet x = | |
| 9597 | + Jenc.object | |
| 9598 | + [ | |
| 9599 | + ] | |
| 9600 | + | |
| 9601 | +unionWith : Jdec.Decoder UnionWith | |
| 9602 | +unionWith = | |
| 9603 | + Jdec.oneOf | |
| 9604 | + [ Jdec.map DoubleInUnionWith Jdec.float | |
| 9605 | + , Jdec.map WithInUnionWith with | |
| 9606 | + ] | |
| 9607 | + | |
| 9608 | +encodeUnionWith : UnionWith -> Jenc.Value | |
| 9609 | +encodeUnionWith x = case x of | |
| 9610 | + DoubleInUnionWith y -> Jenc.float y | |
| 9611 | + WithInUnionWith y -> encodeWith y | |
| 9612 | + | |
| 9613 | +with : Jdec.Decoder With | |
| 9614 | +with = | |
| 9615 | + Jdec.succeed With | |
| 9616 | + | |
| 9617 | +encodeWith : With -> Jenc.Value | |
| 9618 | +encodeWith x = | |
| 9619 | + Jenc.object | |
| 9620 | + [ | |
| 9621 | + ] | |
| 9622 | + | |
| 9623 | +unionXor : Jdec.Decoder UnionXor | |
| 9624 | +unionXor = | |
| 9625 | + Jdec.oneOf | |
| 9626 | + [ Jdec.map DoubleInUnionXor Jdec.float | |
| 9627 | + , Jdec.map XorInUnionXor xor | |
| 9628 | + ] | |
| 9629 | + | |
| 9630 | +encodeUnionXor : UnionXor -> Jenc.Value | |
| 9631 | +encodeUnionXor x = case x of | |
| 9632 | + DoubleInUnionXor y -> Jenc.float y | |
| 9633 | + XorInUnionXor y -> encodeXor y | |
| 9634 | + | |
| 9635 | +xor : Jdec.Decoder Xor | |
| 9636 | +xor = | |
| 9637 | + Jdec.succeed Xor | |
| 9638 | + | |
| 9639 | +encodeXor : Xor -> Jenc.Value | |
| 9640 | +encodeXor x = | |
| 9641 | + Jenc.object | |
| 9642 | + [ | |
| 9643 | + ] | |
| 9644 | + | |
| 9645 | +unionXorEq : Jdec.Decoder UnionXorEq | |
| 9646 | +unionXorEq = | |
| 9647 | + Jdec.oneOf | |
| 9648 | + [ Jdec.map DoubleInUnionXorEq Jdec.float | |
| 9649 | + , Jdec.map XorEqInUnionXorEq xorEq | |
| 9650 | + ] | |
| 9651 | + | |
| 9652 | +encodeUnionXorEq : UnionXorEq -> Jenc.Value | |
| 9653 | +encodeUnionXorEq x = case x of | |
| 9654 | + DoubleInUnionXorEq y -> Jenc.float y | |
| 9655 | + XorEqInUnionXorEq y -> encodeXorEq y | |
| 9656 | + | |
| 9657 | +xorEq : Jdec.Decoder XorEq | |
| 9658 | +xorEq = | |
| 9659 | + Jdec.succeed XorEq | |
| 9660 | + | |
| 9661 | +encodeXorEq : XorEq -> Jenc.Value | |
| 9662 | +encodeXorEq x = | |
| 9663 | + Jenc.object | |
| 9664 | + [ | |
| 9665 | + ] | |
| 9666 | + | |
| 9667 | +unionYES : Jdec.Decoder UnionYES | |
| 9668 | +unionYES = | |
| 9669 | + Jdec.oneOf | |
| 9670 | + [ Jdec.map DoubleInUnionYES Jdec.float | |
| 9671 | + , Jdec.map YesInUnionYES yes | |
| 9672 | + ] | |
| 9673 | + | |
| 9674 | +encodeUnionYES : UnionYES -> Jenc.Value | |
| 9675 | +encodeUnionYES x = case x of | |
| 9676 | + DoubleInUnionYES y -> Jenc.float y | |
| 9677 | + YesInUnionYES y -> encodeYes y | |
| 9678 | + | |
| 9679 | +yes : Jdec.Decoder Yes | |
| 9680 | +yes = | |
| 9681 | + Jdec.succeed Yes | |
| 9682 | + | |
| 9683 | +encodeYes : Yes -> Jenc.Value | |
| 9684 | +encodeYes x = | |
| 9685 | + Jenc.object | |
| 9686 | + [ | |
| 9687 | + ] | |
| 9688 | + | |
| 9689 | +unionYield : Jdec.Decoder UnionYield | |
| 9690 | +unionYield = | |
| 9691 | + Jdec.oneOf | |
| 9692 | + [ Jdec.map DoubleInUnionYield Jdec.float | |
| 9693 | + , Jdec.map YieldInUnionYield yield | |
| 9694 | + ] | |
| 9695 | + | |
| 9696 | +encodeUnionYield : UnionYield -> Jenc.Value | |
| 9697 | +encodeUnionYield x = case x of | |
| 9698 | + DoubleInUnionYield y -> Jenc.float y | |
| 9699 | + YieldInUnionYield y -> encodeYield y | |
| 9700 | + | |
| 9701 | +yield : Jdec.Decoder Yield | |
| 9702 | +yield = | |
| 9703 | + Jdec.succeed Yield | |
| 9704 | + | |
| 9705 | +encodeYield : Yield -> Jenc.Value | |
| 9706 | +encodeYield x = | |
| 9707 | + Jenc.object | |
| 9708 | + [ | |
| 9709 | + ] | |
| 9710 | + | |
| 9711 | +--- encoder helpers | |
| 9712 | + | |
| 9713 | +makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value | |
| 9714 | +makeNullableEncoder f m = | |
| 9715 | + case m of | |
| 9716 | + Just x -> f x | |
| 9717 | + Nothing -> Jenc.null |
Test case
1 generated file · +6 −0test/inputs/schema/light.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -34,6 +34,12 @@ type alias LightParams = | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | -- decoders and encoders |
| 37 | +optionalField key decoder fallback = | |
| 38 | + Jdec.dict Jdec.value | |
| 39 | + |> Jdec.andThen (\m -> | |
| 40 | + case Dict.get key m of | |
| 41 | + Nothing -> Jdec.succeed fallback | |
| 42 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 37 | 43 | |
| 38 | 44 | quickTypeToString : QuickType -> String |
| 39 | 45 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/min-max-items.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -36,6 +36,12 @@ type UnionItem | ||
| 36 | 36 | | StringInUnionItem String |
| 37 | 37 | |
| 38 | 38 | -- decoders and encoders |
| 39 | +optionalField key decoder fallback = | |
| 40 | + Jdec.dict Jdec.value | |
| 41 | + |> Jdec.andThen (\m -> | |
| 42 | + case Dict.get key m of | |
| 43 | + Nothing -> Jdec.succeed fallback | |
| 44 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 39 | 45 | |
| 40 | 46 | quickTypeToString : QuickType -> String |
| 41 | 47 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/minmax-integer.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -34,6 +34,12 @@ type alias QuickType = | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | -- decoders and encoders |
| 37 | +optionalField key decoder fallback = | |
| 38 | + Jdec.dict Jdec.value | |
| 39 | + |> Jdec.andThen (\m -> | |
| 40 | + case Dict.get key m of | |
| 41 | + Nothing -> Jdec.succeed fallback | |
| 42 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 37 | 43 | |
| 38 | 44 | quickTypeToString : QuickType -> String |
| 39 | 45 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/minmax.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -34,6 +34,12 @@ type alias QuickType = | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | -- decoders and encoders |
| 37 | +optionalField key decoder fallback = | |
| 38 | + Jdec.dict Jdec.value | |
| 39 | + |> Jdec.andThen (\m -> | |
| 40 | + case Dict.get key m of | |
| 41 | + Nothing -> Jdec.succeed fallback | |
| 42 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 37 | 43 | |
| 38 | 44 | quickTypeToString : QuickType -> String |
| 39 | 45 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/minmaxlength.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -39,6 +39,12 @@ type InUnion | ||
| 39 | 39 | | StringInInUnion String |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickTypeToString : QuickType -> String |
| 44 | 50 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/multi-type-enum.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -40,6 +40,12 @@ type FooEnum | ||
| 40 | 40 | | C |
| 41 | 41 | |
| 42 | 42 | -- decoders and encoders |
| 43 | +optionalField key decoder fallback = | |
| 44 | + Jdec.dict Jdec.value | |
| 45 | + |> Jdec.andThen (\m -> | |
| 46 | + case Dict.get key m of | |
| 47 | + Nothing -> Jdec.succeed fallback | |
| 48 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 43 | 49 | |
| 44 | 50 | quickTypeToString : QuickType -> String |
| 45 | 51 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +82 −0test/inputs/schema/nested-intersection-union.schema
Aschema-elmdefault / QuickType.elm+82 −0
| @@ -0,0 +1,82 @@ | ||
| 1 | +-- To decode the JSON data, add this file to your project, run | |
| 2 | +-- | |
| 3 | +-- elm install NoRedInk/elm-json-decode-pipeline | |
| 4 | +-- | |
| 5 | +-- add these imports | |
| 6 | +-- | |
| 7 | +-- import Json.Decode exposing (decodeString) | |
| 8 | +-- import QuickType exposing (quickType) | |
| 9 | +-- | |
| 10 | +-- and you're off to the races with | |
| 11 | +-- | |
| 12 | +-- decodeString quickType myJsonString | |
| 13 | + | |
| 14 | +module QuickType exposing | |
| 15 | + ( QuickType | |
| 16 | + , quickTypeToString | |
| 17 | + , quickType | |
| 18 | + , Item | |
| 19 | + ) | |
| 20 | + | |
| 21 | +import Json.Decode as Jdec | |
| 22 | +import Json.Decode.Pipeline as Jpipe | |
| 23 | +import Json.Encode as Jenc | |
| 24 | +import Dict exposing (Dict) | |
| 25 | + | |
| 26 | +type alias QuickType = | |
| 27 | + { input : List Item | |
| 28 | + } | |
| 29 | + | |
| 30 | +type alias Item = | |
| 31 | + { content : Maybe String | |
| 32 | + , id : Maybe String | |
| 33 | + , output : Maybe String | |
| 34 | + , summary : Maybe String | |
| 35 | + } | |
| 36 | + | |
| 37 | +-- decoders and encoders | |
| 38 | +optionalField key decoder fallback = | |
| 39 | + Jdec.dict Jdec.value | |
| 40 | + |> Jdec.andThen (\m -> | |
| 41 | + case Dict.get key m of | |
| 42 | + Nothing -> Jdec.succeed fallback | |
| 43 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 44 | + | |
| 45 | +quickTypeToString : QuickType -> String | |
| 46 | +quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | |
| 47 | + | |
| 48 | +quickType : Jdec.Decoder QuickType | |
| 49 | +quickType = | |
| 50 | + Jdec.succeed QuickType | |
| 51 | + |> Jpipe.required "input" (Jdec.list item) | |
| 52 | + | |
| 53 | +encodeQuickType : QuickType -> Jenc.Value | |
| 54 | +encodeQuickType x = | |
| 55 | + Jenc.object | |
| 56 | + [ ("input", Jenc.list encodeItem x.input) | |
| 57 | + ] | |
| 58 | + | |
| 59 | +item : Jdec.Decoder Item | |
| 60 | +item = | |
| 61 | + Jdec.succeed Item | |
| 62 | + |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing) | |
| 63 | + |> Jpipe.custom (optionalField "id" (Jdec.nullable Jdec.string) Nothing) | |
| 64 | + |> Jpipe.custom (optionalField "output" (Jdec.nullable Jdec.string) Nothing) | |
| 65 | + |> Jpipe.custom (optionalField "summary" (Jdec.nullable Jdec.string) Nothing) | |
| 66 | + | |
| 67 | +encodeItem : Item -> Jenc.Value | |
| 68 | +encodeItem x = | |
| 69 | + Jenc.object | |
| 70 | + [ ("content", makeNullableEncoder Jenc.string x.content) | |
| 71 | + , ("id", makeNullableEncoder Jenc.string x.id) | |
| 72 | + , ("output", makeNullableEncoder Jenc.string x.output) | |
| 73 | + , ("summary", makeNullableEncoder Jenc.string x.summary) | |
| 74 | + ] | |
| 75 | + | |
| 76 | +--- encoder helpers | |
| 77 | + | |
| 78 | +makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value | |
| 79 | +makeNullableEncoder f m = | |
| 80 | + case m of | |
| 81 | + Just x -> f x | |
| 82 | + Nothing -> Jenc.null |
Test case
1 generated file · +6 −0test/inputs/schema/non-standard-ref.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/nullable-optional-one-of.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -33,6 +33,12 @@ type Kind | ||
| 33 | 33 | | Two |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -40,7 +46,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 40 | 46 | quickType : Jdec.Decoder QuickType |
| 41 | 47 | quickType = |
| 42 | 48 | Jdec.succeed QuickType |
| 43 | - |> Jpipe.optional "b" (Jdec.nullable Jdec.string) Nothing | |
| 49 | + |> Jpipe.custom (optionalField "b" (Jdec.nullable Jdec.string) Nothing) | |
| 44 | 50 | |> Jpipe.required "kind" kind |
| 45 | 51 | |
| 46 | 52 | encodeQuickType : QuickType -> Jenc.Value |
Test case
1 generated file · +7 −1test/inputs/schema/object-type-required.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -36,7 +42,7 @@ quickType : Jdec.Decoder QuickType | ||
| 36 | 42 | quickType = |
| 37 | 43 | Jdec.succeed QuickType |
| 38 | 44 | |> Jpipe.required "foo" Jdec.string |
| 39 | - |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing | |
| 45 | + |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing) | |
| 40 | 46 | |
| 41 | 47 | encodeQuickType : QuickType -> Jenc.Value |
| 42 | 48 | encodeQuickType x = |
Test case
1 generated file · +7 −1test/inputs/schema/optional-any.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -36,7 +42,7 @@ quickType : Jdec.Decoder QuickType | ||
| 36 | 42 | quickType = |
| 37 | 43 | Jdec.succeed QuickType |
| 38 | 44 | |> Jpipe.required "bar" Jdec.bool |
| 39 | - |> Jpipe.optional "foo" (Jdec.nullable Jdec.value) Nothing | |
| 45 | + |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.value) Nothing) | |
| 40 | 46 | |
| 41 | 47 | encodeQuickType : QuickType -> Jenc.Value |
| 42 | 48 | encodeQuickType x = |
Test case
1 generated file · +10 −4test/inputs/schema/optional-const-ref.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -39,6 +39,12 @@ type alias Coordinate = | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | -- decoders and encoders |
| 42 | +optionalField key decoder fallback = | |
| 43 | + Jdec.dict Jdec.value | |
| 44 | + |> Jdec.andThen (\m -> | |
| 45 | + case Dict.get key m of | |
| 46 | + Nothing -> Jdec.succeed fallback | |
| 47 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 42 | 48 | |
| 43 | 49 | quickTypeToString : QuickType -> String |
| 44 | 50 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -46,13 +52,13 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 46 | 52 | quickType : Jdec.Decoder QuickType |
| 47 | 53 | quickType = |
| 48 | 54 | Jdec.succeed QuickType |
| 49 | - |> Jpipe.optional "coordinates" (Jdec.nullable (Jdec.list coordinate)) Nothing | |
| 50 | - |> Jpipe.optional "count" (Jdec.nullable Jdec.int) Nothing | |
| 51 | - |> Jpipe.optional "label" (Jdec.nullable Jdec.string) Nothing | |
| 55 | + |> Jpipe.custom (optionalField "coordinates" (Jdec.nullable (Jdec.list coordinate)) Nothing) | |
| 56 | + |> Jpipe.custom (optionalField "count" (Jdec.nullable Jdec.int) Nothing) | |
| 57 | + |> Jpipe.custom (optionalField "label" (Jdec.nullable Jdec.string) Nothing) | |
| 52 | 58 | |> Jpipe.required "requiredCoordinates" (Jdec.list coordinate) |
| 53 | 59 | |> Jpipe.required "requiredCount" Jdec.int |
| 54 | 60 | |> Jpipe.required "requiredLabel" Jdec.string |
| 55 | - |> Jpipe.optional "weight" (Jdec.nullable Jdec.float) Nothing | |
| 61 | + |> Jpipe.custom (optionalField "weight" (Jdec.nullable Jdec.float) Nothing) | |
| 56 | 62 | |
| 57 | 63 | encodeQuickType : QuickType -> Jenc.Value |
| 58 | 64 | encodeQuickType x = |
Test case
1 generated file · +10 −4test/inputs/schema/optional-constraints.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -31,6 +31,12 @@ type alias QuickType = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickTypeToString : QuickType -> String |
| 36 | 42 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -38,10 +44,10 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 38 | 44 | quickType : Jdec.Decoder QuickType |
| 39 | 45 | quickType = |
| 40 | 46 | Jdec.succeed QuickType |
| 41 | - |> Jpipe.optional "optDouble" (Jdec.nullable Jdec.float) Nothing | |
| 42 | - |> Jpipe.optional "optInt" (Jdec.nullable Jdec.int) Nothing | |
| 43 | - |> Jpipe.optional "optPattern" (Jdec.nullable Jdec.string) Nothing | |
| 44 | - |> Jpipe.optional "optString" (Jdec.nullable Jdec.string) Nothing | |
| 47 | + |> Jpipe.custom (optionalField "optDouble" (Jdec.nullable Jdec.float) Nothing) | |
| 48 | + |> Jpipe.custom (optionalField "optInt" (Jdec.nullable Jdec.int) Nothing) | |
| 49 | + |> Jpipe.custom (optionalField "optPattern" (Jdec.nullable Jdec.string) Nothing) | |
| 50 | + |> Jpipe.custom (optionalField "optString" (Jdec.nullable Jdec.string) Nothing) | |
| 45 | 51 | |> Jpipe.required "reqZeroMin" Jdec.int |
| 46 | 52 | |
| 47 | 53 | encodeQuickType : QuickType -> Jenc.Value |
Test case
1 generated file · +9 −3test/inputs/schema/optional-date-time.schema
Mschema-elmdefault / QuickType.elm+9 −3
| @@ -32,6 +32,12 @@ type alias QuickType = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -39,9 +45,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = |
| 41 | 47 | Jdec.succeed QuickType |
| 42 | - |> Jpipe.optional "optional-date" (Jdec.nullable Jdec.string) Nothing | |
| 43 | - |> Jpipe.optional "optional-date-time" (Jdec.nullable Jdec.string) Nothing | |
| 44 | - |> Jpipe.optional "optional-time" (Jdec.nullable Jdec.string) Nothing | |
| 48 | + |> Jpipe.custom (optionalField "optional-date" (Jdec.nullable Jdec.string) Nothing) | |
| 49 | + |> Jpipe.custom (optionalField "optional-date-time" (Jdec.nullable Jdec.string) Nothing) | |
| 50 | + |> Jpipe.custom (optionalField "optional-time" (Jdec.nullable Jdec.string) Nothing) | |
| 45 | 51 | |> Jpipe.required "required-date" Jdec.string |
| 46 | 52 | |> Jpipe.required "required-date-time" Jdec.string |
| 47 | 53 | |> Jpipe.required "required-time" Jdec.string |
Test case
1 generated file · +7 −1test/inputs/schema/optional-enum.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -33,6 +33,12 @@ type Shortcut | ||
| 33 | 33 | | Visible |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -41,7 +47,7 @@ quickType : Jdec.Decoder QuickType | ||
| 41 | 47 | quickType = |
| 42 | 48 | Jdec.succeed QuickType |
| 43 | 49 | |> Jpipe.required "name" Jdec.string |
| 44 | - |> Jpipe.optional "shortcut" (Jdec.nullable shortcut) Nothing | |
| 50 | + |> Jpipe.custom (optionalField "shortcut" (Jdec.nullable shortcut) Nothing) | |
| 45 | 51 | |
| 46 | 52 | encodeQuickType : QuickType -> Jenc.Value |
| 47 | 53 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/pattern.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -29,6 +29,12 @@ type alias QuickType = | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | -- decoders and encoders |
| 32 | +optionalField key decoder fallback = | |
| 33 | + Jdec.dict Jdec.value | |
| 34 | + |> Jdec.andThen (\m -> | |
| 35 | + case Dict.get key m of | |
| 36 | + Nothing -> Jdec.succeed fallback | |
| 37 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 32 | 38 | |
| 33 | 39 | quickTypeToString : QuickType -> String |
| 34 | 40 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/prefix-items.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type Open | ||
| 33 | 33 | | IntegerInOpen Int |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/ref-id-files.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +38 −32test/inputs/schema/renaming-bug.schema
Mschema-elmdefault / QuickType.elm+38 −32
| @@ -131,6 +131,12 @@ type Name | ||
| 131 | 131 | | Trolley |
| 132 | 132 | |
| 133 | 133 | -- decoders and encoders |
| 134 | +optionalField key decoder fallback = | |
| 135 | + Jdec.dict Jdec.value | |
| 136 | + |> Jdec.andThen (\m -> | |
| 137 | + case Dict.get key m of | |
| 138 | + Nothing -> Jdec.succeed fallback | |
| 139 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 134 | 140 | |
| 135 | 141 | quickTypeToString : QuickType -> String |
| 136 | 142 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -138,9 +144,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 138 | 144 | quickType : Jdec.Decoder QuickType |
| 139 | 145 | quickType = |
| 140 | 146 | Jdec.succeed QuickType |
| 141 | - |> Jpipe.optional "version" (Jdec.nullable Jdec.string) Nothing | |
| 142 | - |> Jpipe.optional "fruits" (Jdec.nullable (Jdec.list fruit)) Nothing | |
| 143 | - |> Jpipe.optional "vehicles" (Jdec.nullable (Jdec.list vehicle)) Nothing | |
| 147 | + |> Jpipe.custom (optionalField "version" (Jdec.nullable Jdec.string) Nothing) | |
| 148 | + |> Jpipe.custom (optionalField "fruits" (Jdec.nullable (Jdec.list fruit)) Nothing) | |
| 149 | + |> Jpipe.custom (optionalField "vehicles" (Jdec.nullable (Jdec.list vehicle)) Nothing) | |
| 144 | 150 | |
| 145 | 151 | encodeQuickType : QuickType -> Jenc.Value |
| 146 | 152 | encodeQuickType x = |
| @@ -153,9 +159,9 @@ encodeQuickType x = | ||
| 153 | 159 | fruit : Jdec.Decoder Fruit |
| 154 | 160 | fruit = |
| 155 | 161 | Jdec.succeed Fruit |
| 156 | - |> Jpipe.optional "apple" (Jdec.nullable Jdec.bool) Nothing | |
| 157 | - |> Jpipe.optional "berries" (Jdec.nullable (Jdec.list berry)) Nothing | |
| 158 | - |> Jpipe.optional "orange" (Jdec.nullable Jdec.bool) Nothing | |
| 162 | + |> Jpipe.custom (optionalField "apple" (Jdec.nullable Jdec.bool) Nothing) | |
| 163 | + |> Jpipe.custom (optionalField "berries" (Jdec.nullable (Jdec.list berry)) Nothing) | |
| 164 | + |> Jpipe.custom (optionalField "orange" (Jdec.nullable Jdec.bool) Nothing) | |
| 159 | 165 | |
| 160 | 166 | encodeFruit : Fruit -> Jenc.Value |
| 161 | 167 | encodeFruit x = |
| @@ -168,9 +174,9 @@ encodeFruit x = | ||
| 168 | 174 | berry : Jdec.Decoder Berry |
| 169 | 175 | berry = |
| 170 | 176 | Jdec.succeed Berry |
| 171 | - |> Jpipe.optional "color" (Jdec.nullable color) Nothing | |
| 172 | - |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing | |
| 173 | - |> Jpipe.optional "shapes" (Jdec.nullable (Jdec.list shape)) Nothing | |
| 177 | + |> Jpipe.custom (optionalField "color" (Jdec.nullable color) Nothing) | |
| 178 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing) | |
| 179 | + |> Jpipe.custom (optionalField "shapes" (Jdec.nullable (Jdec.list shape)) Nothing) | |
| 174 | 180 | |
| 175 | 181 | encodeBerry : Berry -> Jenc.Value |
| 176 | 182 | encodeBerry x = |
| @@ -183,7 +189,7 @@ encodeBerry x = | ||
| 183 | 189 | color : Jdec.Decoder Color |
| 184 | 190 | color = |
| 185 | 191 | Jdec.succeed Color |
| 186 | - |> Jpipe.optional "rgb" (Jdec.nullable Jdec.float) Nothing | |
| 192 | + |> Jpipe.custom (optionalField "rgb" (Jdec.nullable Jdec.float) Nothing) | |
| 187 | 193 | |
| 188 | 194 | encodeColor : Color -> Jenc.Value |
| 189 | 195 | encodeColor x = |
| @@ -194,8 +200,8 @@ encodeColor x = | ||
| 194 | 200 | shape : Jdec.Decoder Shape |
| 195 | 201 | shape = |
| 196 | 202 | Jdec.succeed Shape |
| 197 | - |> Jpipe.optional "geometry" (Jdec.nullable geometry) Nothing | |
| 198 | - |> Jpipe.optional "history" (Jdec.nullable history) Nothing | |
| 203 | + |> Jpipe.custom (optionalField "geometry" (Jdec.nullable geometry) Nothing) | |
| 204 | + |> Jpipe.custom (optionalField "history" (Jdec.nullable history) Nothing) | |
| 199 | 205 | |
| 200 | 206 | encodeShape : Shape -> Jenc.Value |
| 201 | 207 | encodeShape x = |
| @@ -207,8 +213,8 @@ encodeShape x = | ||
| 207 | 213 | geometry : Jdec.Decoder Geometry |
| 208 | 214 | geometry = |
| 209 | 215 | Jdec.succeed Geometry |
| 210 | - |> Jpipe.optional "rectShape" (Jdec.nullable rectShape) Nothing | |
| 211 | - |> Jpipe.optional "circularShape" (Jdec.nullable (Jdec.list circularShape)) Nothing | |
| 216 | + |> Jpipe.custom (optionalField "rectShape" (Jdec.nullable rectShape) Nothing) | |
| 217 | + |> Jpipe.custom (optionalField "circularShape" (Jdec.nullable (Jdec.list circularShape)) Nothing) | |
| 212 | 218 | |
| 213 | 219 | encodeGeometry : Geometry -> Jenc.Value |
| 214 | 220 | encodeGeometry x = |
| @@ -220,7 +226,7 @@ encodeGeometry x = | ||
| 220 | 226 | circularShape : Jdec.Decoder CircularShape |
| 221 | 227 | circularShape = |
| 222 | 228 | Jdec.succeed CircularShape |
| 223 | - |> Jpipe.optional "shapeName" (Jdec.nullable Jdec.string) Nothing | |
| 229 | + |> Jpipe.custom (optionalField "shapeName" (Jdec.nullable Jdec.string) Nothing) | |
| 224 | 230 | |
| 225 | 231 | encodeCircularShape : CircularShape -> Jenc.Value |
| 226 | 232 | encodeCircularShape x = |
| @@ -231,7 +237,7 @@ encodeCircularShape x = | ||
| 231 | 237 | rectShape : Jdec.Decoder RectShape |
| 232 | 238 | rectShape = |
| 233 | 239 | Jdec.succeed RectShape |
| 234 | - |> Jpipe.optional "parts" (Jdec.nullable (Jdec.list part)) Nothing | |
| 240 | + |> Jpipe.custom (optionalField "parts" (Jdec.nullable (Jdec.list part)) Nothing) | |
| 235 | 241 | |
| 236 | 242 | encodeRectShape : RectShape -> Jenc.Value |
| 237 | 243 | encodeRectShape x = |
| @@ -242,9 +248,9 @@ encodeRectShape x = | ||
| 242 | 248 | part : Jdec.Decoder Part |
| 243 | 249 | part = |
| 244 | 250 | Jdec.succeed Part |
| 245 | - |> Jpipe.optional "depth" (Jdec.nullable Jdec.string) Nothing | |
| 246 | - |> Jpipe.optional "length" (Jdec.nullable Jdec.string) Nothing | |
| 247 | - |> Jpipe.optional "width" (Jdec.nullable Jdec.string) Nothing | |
| 251 | + |> Jpipe.custom (optionalField "depth" (Jdec.nullable Jdec.string) Nothing) | |
| 252 | + |> Jpipe.custom (optionalField "length" (Jdec.nullable Jdec.string) Nothing) | |
| 253 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.string) Nothing) | |
| 248 | 254 | |
| 249 | 255 | encodePart : Part -> Jenc.Value |
| 250 | 256 | encodePart x = |
| @@ -257,7 +263,7 @@ encodePart x = | ||
| 257 | 263 | history : Jdec.Decoder History |
| 258 | 264 | history = |
| 259 | 265 | Jdec.succeed History |
| 260 | - |> Jpipe.optional "class" (Jdec.nullable Jdec.string) Nothing | |
| 266 | + |> Jpipe.custom (optionalField "class" (Jdec.nullable Jdec.string) Nothing) | |
| 261 | 267 | |
| 262 | 268 | encodeHistory : History -> Jenc.Value |
| 263 | 269 | encodeHistory x = |
| @@ -268,12 +274,12 @@ encodeHistory x = | ||
| 268 | 274 | vehicle : Jdec.Decoder Vehicle |
| 269 | 275 | vehicle = |
| 270 | 276 | Jdec.succeed Vehicle |
| 271 | - |> Jpipe.optional "brand" (Jdec.nullable Jdec.string) Nothing | |
| 272 | - |> Jpipe.optional "id" (Jdec.nullable Jdec.string) Nothing | |
| 273 | - |> Jpipe.optional "speed" (Jdec.nullable speed) Nothing | |
| 274 | - |> Jpipe.optional "subModule" (Jdec.nullable Jdec.bool) Nothing | |
| 275 | - |> Jpipe.optional "type" (Jdec.nullable vehicleType) Nothing | |
| 276 | - |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing | |
| 277 | + |> Jpipe.custom (optionalField "brand" (Jdec.nullable Jdec.string) Nothing) | |
| 278 | + |> Jpipe.custom (optionalField "id" (Jdec.nullable Jdec.string) Nothing) | |
| 279 | + |> Jpipe.custom (optionalField "speed" (Jdec.nullable speed) Nothing) | |
| 280 | + |> Jpipe.custom (optionalField "subModule" (Jdec.nullable Jdec.bool) Nothing) | |
| 281 | + |> Jpipe.custom (optionalField "type" (Jdec.nullable vehicleType) Nothing) | |
| 282 | + |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing) | |
| 277 | 283 | |
| 278 | 284 | encodeVehicle : Vehicle -> Jenc.Value |
| 279 | 285 | encodeVehicle x = |
| @@ -289,7 +295,7 @@ encodeVehicle x = | ||
| 289 | 295 | speed : Jdec.Decoder Speed |
| 290 | 296 | speed = |
| 291 | 297 | Jdec.succeed Speed |
| 292 | - |> Jpipe.optional "velocity" (Jdec.nullable limit) Nothing | |
| 298 | + |> Jpipe.custom (optionalField "velocity" (Jdec.nullable limit) Nothing) | |
| 293 | 299 | |
| 294 | 300 | encodeSpeed : Speed -> Jenc.Value |
| 295 | 301 | encodeSpeed x = |
| @@ -300,8 +306,8 @@ encodeSpeed x = | ||
| 300 | 306 | limit : Jdec.Decoder Limit |
| 301 | 307 | limit = |
| 302 | 308 | Jdec.succeed Limit |
| 303 | - |> Jpipe.optional "maximum" (Jdec.nullable Jdec.float) Nothing | |
| 304 | - |> Jpipe.optional "minimum" (Jdec.nullable Jdec.float) Nothing | |
| 309 | + |> Jpipe.custom (optionalField "maximum" (Jdec.nullable Jdec.float) Nothing) | |
| 310 | + |> Jpipe.custom (optionalField "minimum" (Jdec.nullable Jdec.float) Nothing) | |
| 305 | 311 | |
| 306 | 312 | encodeLimit : Limit -> Jenc.Value |
| 307 | 313 | encodeLimit x = |
| @@ -313,9 +319,9 @@ encodeLimit x = | ||
| 313 | 319 | vehicleType : Jdec.Decoder VehicleType |
| 314 | 320 | vehicleType = |
| 315 | 321 | Jdec.succeed VehicleType |
| 316 | - |> Jpipe.optional "name" (Jdec.nullable name) Nothing | |
| 317 | - |> Jpipe.optional "width" (Jdec.nullable axis) Nothing | |
| 318 | - |> Jpipe.optional "length" (Jdec.nullable axis) Nothing | |
| 322 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable name) Nothing) | |
| 323 | + |> Jpipe.custom (optionalField "width" (Jdec.nullable axis) Nothing) | |
| 324 | + |> Jpipe.custom (optionalField "length" (Jdec.nullable axis) Nothing) | |
| 319 | 325 | |
| 320 | 326 | encodeVehicleType : VehicleType -> Jenc.Value |
| 321 | 327 | encodeVehicleType x = |
Test case
1 generated file · +6 −0test/inputs/schema/required-draft3.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/required-non-properties.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/required.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/schema-constraints.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type alias QuickType = | ||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +7 −1test/inputs/schema/strict-optional.schema
Mschema-elmdefault / QuickType.elm+7 −1
| @@ -27,6 +27,12 @@ type alias QuickType = | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | -- decoders and encoders |
| 30 | +optionalField key decoder fallback = | |
| 31 | + Jdec.dict Jdec.value | |
| 32 | + |> Jdec.andThen (\m -> | |
| 33 | + case Dict.get key m of | |
| 34 | + Nothing -> Jdec.succeed fallback | |
| 35 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 30 | 36 | |
| 31 | 37 | quickTypeToString : QuickType -> String |
| 32 | 38 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -34,7 +40,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 34 | 40 | quickType : Jdec.Decoder QuickType |
| 35 | 41 | quickType = |
| 36 | 42 | Jdec.succeed QuickType |
| 37 | - |> Jpipe.optional "foo" (Jdec.nullable Jdec.float) Nothing | |
| 43 | + |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.float) Nothing) | |
| 38 | 44 | |
| 39 | 45 | encodeQuickType : QuickType -> Jenc.Value |
| 40 | 46 | encodeQuickType x = |
Test case
1 generated file · +6 −0test/inputs/schema/top-level-array.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -31,6 +31,12 @@ type alias TextClassificationOutputElement = | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | -- decoders and encoders |
| 34 | +optionalField key decoder fallback = | |
| 35 | + Jdec.dict Jdec.value | |
| 36 | + |> Jdec.andThen (\m -> | |
| 37 | + case Dict.get key m of | |
| 38 | + Nothing -> Jdec.succeed fallback | |
| 39 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 34 | 40 | |
| 35 | 41 | quickType : Jdec.Decoder QuickType |
| 36 | 42 | quickType = Jdec.list textClassificationOutputElement |
Test case
1 generated file · +6 −0test/inputs/schema/top-level-enum.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -28,6 +28,12 @@ type QuickType | ||
| 28 | 28 | | Two |
| 29 | 29 | |
| 30 | 30 | -- decoders and encoders |
| 31 | +optionalField key decoder fallback = | |
| 32 | + Jdec.dict Jdec.value | |
| 33 | + |> Jdec.andThen (\m -> | |
| 34 | + case Dict.get key m of | |
| 35 | + Nothing -> Jdec.succeed fallback | |
| 36 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 31 | 37 | |
| 32 | 38 | quickTypeToString : QuickType -> String |
| 33 | 39 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +6 −0test/inputs/schema/top-level-primitive-array.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = List String |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.list Jdec.string |
Test case
1 generated file · +6 −0test/inputs/schema/top-level-primitive.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -25,6 +25,12 @@ import Dict exposing (Dict) | ||
| 25 | 25 | type alias QuickType = Float |
| 26 | 26 | |
| 27 | 27 | -- decoders and encoders |
| 28 | +optionalField key decoder fallback = | |
| 29 | + Jdec.dict Jdec.value | |
| 30 | + |> Jdec.andThen (\m -> | |
| 31 | + case Dict.get key m of | |
| 32 | + Nothing -> Jdec.succeed fallback | |
| 33 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 28 | 34 | |
| 29 | 35 | quickType : Jdec.Decoder QuickType |
| 30 | 36 | quickType = Jdec.float |
Test case
1 generated file · +6 −0test/inputs/schema/tuple.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -32,6 +32,12 @@ type Tuple | ||
| 32 | 32 | | IntegerInTuple Int |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +10 −4test/inputs/schema/unevaluated-properties.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -55,6 +55,12 @@ type alias Item = | ||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | -- decoders and encoders |
| 58 | +optionalField key decoder fallback = | |
| 59 | + Jdec.dict Jdec.value | |
| 60 | + |> Jdec.andThen (\m -> | |
| 61 | + case Dict.get key m of | |
| 62 | + Nothing -> Jdec.succeed fallback | |
| 63 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 58 | 64 | |
| 59 | 65 | quickTypeToString : QuickType -> String |
| 60 | 66 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -62,7 +68,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 62 | 68 | quickType : Jdec.Decoder QuickType |
| 63 | 69 | quickType = |
| 64 | 70 | Jdec.succeed QuickType |
| 65 | - |> Jpipe.optional "config" (Jdec.nullable config) Nothing | |
| 71 | + |> Jpipe.custom (optionalField "config" (Jdec.nullable config) Nothing) | |
| 66 | 72 | |
| 67 | 73 | encodeQuickType : QuickType -> Jenc.Value |
| 68 | 74 | encodeQuickType x = |
| @@ -73,9 +79,9 @@ encodeQuickType x = | ||
| 73 | 79 | config : Jdec.Decoder Config |
| 74 | 80 | config = |
| 75 | 81 | Jdec.succeed Config |
| 76 | - |> Jpipe.optional "closed" (Jdec.nullable closed) Nothing | |
| 77 | - |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing | |
| 78 | - |> Jpipe.optional "settings" (Jdec.nullable (Jdec.dict (Jdec.list item))) Nothing | |
| 82 | + |> Jpipe.custom (optionalField "closed" (Jdec.nullable closed) Nothing) | |
| 83 | + |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing) | |
| 84 | + |> Jpipe.custom (optionalField "settings" (Jdec.nullable (Jdec.dict (Jdec.list item))) Nothing) | |
| 79 | 85 | |
| 80 | 86 | encodeConfig : Config -> Jenc.Value |
| 81 | 87 | encodeConfig x = |
Test case
1 generated file · +6 −0test/inputs/schema/union-int-double.schema
Mschema-elmdefault / QuickType.elm+6 −0
| @@ -33,6 +33,12 @@ type Value | ||
| 33 | 33 | | StringInValue String |
| 34 | 34 | |
| 35 | 35 | -- decoders and encoders |
| 36 | +optionalField key decoder fallback = | |
| 37 | + Jdec.dict Jdec.value | |
| 38 | + |> Jdec.andThen (\m -> | |
| 39 | + case Dict.get key m of | |
| 40 | + Nothing -> Jdec.succeed fallback | |
| 41 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 36 | 42 | |
| 37 | 43 | quickTypeToString : QuickType -> String |
| 38 | 44 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
Test case
1 generated file · +8 −2test/inputs/schema/union.schema
Mschema-elmdefault / QuickType.elm+8 −2
| @@ -32,6 +32,12 @@ type alias QuickTypeElement = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickType : Jdec.Decoder QuickType |
| 37 | 43 | quickType = Jdec.list quickTypeElement |
| @@ -42,9 +48,9 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r) | ||
| 42 | 48 | quickTypeElement : Jdec.Decoder QuickTypeElement |
| 43 | 49 | quickTypeElement = |
| 44 | 50 | Jdec.succeed QuickTypeElement |
| 45 | - |> Jpipe.optional "one" (Jdec.nullable Jdec.int) Nothing | |
| 51 | + |> Jpipe.custom (optionalField "one" (Jdec.nullable Jdec.int) Nothing) | |
| 46 | 52 | |> Jpipe.required "two" Jdec.bool |
| 47 | - |> Jpipe.optional "three" (Jdec.nullable Jdec.float) Nothing | |
| 53 | + |> Jpipe.custom (optionalField "three" (Jdec.nullable Jdec.float) Nothing) | |
| 48 | 54 | |
| 49 | 55 | encodeQuickTypeElement : QuickTypeElement -> Jenc.Value |
| 50 | 56 | encodeQuickTypeElement x = |
Test case
1 generated file · +10 −4test/inputs/schema/uuid.schema
Mschema-elmdefault / QuickType.elm+10 −4
| @@ -32,6 +32,12 @@ type alias QuickType = | ||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | -- decoders and encoders |
| 35 | +optionalField key decoder fallback = | |
| 36 | + Jdec.dict Jdec.value | |
| 37 | + |> Jdec.andThen (\m -> | |
| 38 | + case Dict.get key m of | |
| 39 | + Nothing -> Jdec.succeed fallback | |
| 40 | + Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key))) | |
| 35 | 41 | |
| 36 | 42 | quickTypeToString : QuickType -> String |
| 37 | 43 | quickTypeToString r = Jenc.encode 0 (encodeQuickType r) |
| @@ -39,11 +45,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r) | ||
| 39 | 45 | quickType : Jdec.Decoder QuickType |
| 40 | 46 | quickType = |
| 41 | 47 | Jdec.succeed QuickType |
| 42 | - |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing | |
| 43 | - |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing | |
| 44 | - |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing | |
| 48 | + |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing) | |
| 49 | + |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing) | |
| 50 | + |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing) | |
| 45 | 51 | |> Jpipe.required "one" Jdec.string |
| 46 | - |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing | |
| 52 | + |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing) | |
| 47 | 53 | |> Jpipe.required "unionWithEnum" Jdec.string |
| 48 | 54 | |
| 49 | 55 | encodeQuickType : QuickType -> Jenc.Value |
No generated files match these filters.