diff --git a/base/elm/test/inputs/json/misc/00c36.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/00c36.json/default/QuickType.elm
index 5dc078b..d47c57b 100644
--- a/base/elm/test/inputs/json/misc/00c36.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/00c36.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/00ec5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/00ec5.json/default/QuickType.elm
index 7e82abb..674192e 100644
--- a/base/elm/test/inputs/json/misc/00ec5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/00ec5.json/default/QuickType.elm
@@ -106,6 +106,12 @@ type alias Schema =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/010b1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/010b1.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/010b1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/010b1.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/016af.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/016af.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/016af.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/016af.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/033b1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/033b1.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/033b1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/033b1.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/050b0.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/050b0.json/default/QuickType.elm
index 0ce57e6..1a9f3bd 100644
--- a/base/elm/test/inputs/json/misc/050b0.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/050b0.json/default/QuickType.elm
@@ -93,6 +93,12 @@ type Title
     | PlainText
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -109,7 +115,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list otherName)
-        |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
@@ -212,7 +218,7 @@ otherName : Jdec.Decoder OtherName
 otherName =
     Jdec.succeed OtherName
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing)
 
 encodeOtherName : OtherName -> Jenc.Value
 encodeOtherName x =
diff --git a/base/elm/test/inputs/json/misc/06bee.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/06bee.json/default/QuickType.elm
index 110be3c..86598a4 100644
--- a/base/elm/test/inputs/json/misc/06bee.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/06bee.json/default/QuickType.elm
@@ -80,6 +80,12 @@ type Title
     = HTML
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -96,7 +102,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ())
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/07540.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/07540.json/default/QuickType.elm
index caa4006..39c16ed 100644
--- a/base/elm/test/inputs/json/misc/07540.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/07540.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias Cookies =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/0779f.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0779f.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/0779f.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0779f.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/07c75.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/07c75.json/default/QuickType.elm
index 2766b12..f5b1d5e 100644
--- a/base/elm/test/inputs/json/misc/07c75.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/07c75.json/default/QuickType.elm
@@ -56,6 +56,12 @@ type alias Text =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -72,7 +78,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ())
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/09f54.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/09f54.json/default/QuickType.elm
index ce460e2..b7adef0 100644
--- a/base/elm/test/inputs/json/misc/09f54.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/09f54.json/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias Description =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/0a358.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0a358.json/default/QuickType.elm
index 6f42336..5559db7 100644
--- a/base/elm/test/inputs/json/misc/0a358.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0a358.json/default/QuickType.elm
@@ -48,6 +48,12 @@ type alias Result =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/0a91a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0a91a.json/default/QuickType.elm
index 4a2a9b3..2251f27 100644
--- a/base/elm/test/inputs/json/misc/0a91a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0a91a.json/default/QuickType.elm
@@ -260,6 +260,12 @@ type alias QuickTypeRepo =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -273,7 +279,7 @@ quickTypeElement =
         |> Jpipe.required "actor" actor
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "org" (Jdec.nullable actor) Nothing
+        |> Jpipe.custom (optionalField "org" (Jdec.nullable actor) Nothing)
         |> Jpipe.required "payload" payload
         |> Jpipe.required "public" Jdec.bool
         |> Jpipe.required "type" purpleType
@@ -296,7 +302,7 @@ actor : Jdec.Decoder Actor
 actor =
     Jdec.succeed Actor
         |> Jpipe.required "avatar_url" Jdec.string
-        |> Jpipe.optional "display_login" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "display_login" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "gravatar_id" Jdec.string
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "login" Jdec.string
@@ -316,20 +322,20 @@ encodeActor x =
 payload : Jdec.Decoder Payload
 payload =
     Jdec.succeed Payload
-        |> Jpipe.optional "action" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "before" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "commits" (Jdec.nullable (Jdec.list commit)) Nothing
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "distinct_size" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "head" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "master_branch" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "number" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pull_request" (Jdec.nullable pullRequest) Nothing
-        |> Jpipe.optional "push_id" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pusher_type" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ref" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ref_type" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "action" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "before" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "commits" (Jdec.nullable (Jdec.list commit)) Nothing)
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "distinct_size" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "head" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "master_branch" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "number" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable pullRequest) Nothing)
+        |> Jpipe.custom (optionalField "push_id" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pusher_type" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ref" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ref_type" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.int) Nothing)
 
 encodePayload : Payload -> Jenc.Value
 encodePayload x =
@@ -386,7 +392,7 @@ pullRequest : Jdec.Decoder PullRequest
 pullRequest =
     Jdec.succeed PullRequest
         |> Jpipe.required "additions" Jdec.int
-        |> Jpipe.optional "assignee" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ())
         |> Jpipe.required "assignees" (Jdec.list Jdec.value)
         |> Jpipe.required "base" base
         |> Jpipe.required "body" Jdec.string
@@ -407,15 +413,15 @@ pullRequest =
         |> Jpipe.required "locked" Jdec.bool
         |> Jpipe.required "maintainer_can_modify" Jdec.bool
         |> Jpipe.required "merge_commit_sha" Jdec.string
-        |> Jpipe.optional "mergeable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "mergeable" (Jdec.null ()) ())
         |> Jpipe.required "mergeable_state" Jdec.string
         |> Jpipe.required "merged" Jdec.bool
         |> Jpipe.required "merged_at" Jdec.string
         |> Jpipe.required "merged_by" mergedBy
-        |> Jpipe.optional "milestone" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "milestone" (Jdec.null ()) ())
         |> Jpipe.required "number" Jdec.int
         |> Jpipe.required "patch_url" Jdec.string
-        |> Jpipe.optional "rebaseable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "rebaseable" (Jdec.null ()) ())
         |> Jpipe.required "requested_reviewers" (Jdec.list Jdec.value)
         |> Jpipe.required "review_comment_url" Jdec.string
         |> Jpipe.required "review_comments" Jdec.int
@@ -509,7 +515,7 @@ baseRepo =
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "default_branch" Jdec.string
         |> Jpipe.required "deployments_url" Jdec.string
-        |> Jpipe.optional "description" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "description" (Jdec.null ()) ())
         |> Jpipe.required "downloads_url" Jdec.string
         |> Jpipe.required "events_url" Jdec.string
         |> Jpipe.required "fork" Jdec.bool
@@ -526,7 +532,7 @@ baseRepo =
         |> Jpipe.required "has_pages" Jdec.bool
         |> Jpipe.required "has_projects" Jdec.bool
         |> Jpipe.required "has_wiki" Jdec.bool
-        |> Jpipe.optional "homepage" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "homepage" (Jdec.null ()) ())
         |> Jpipe.required "hooks_url" Jdec.string
         |> Jpipe.required "html_url" Jdec.string
         |> Jpipe.required "id" Jdec.int
@@ -539,7 +545,7 @@ baseRepo =
         |> Jpipe.required "languages_url" Jdec.string
         |> Jpipe.required "merges_url" Jdec.string
         |> Jpipe.required "milestones_url" Jdec.string
-        |> Jpipe.optional "mirror_url" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "mirror_url" (Jdec.null ()) ())
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "notifications_url" Jdec.string
         |> Jpipe.required "open_issues" Jdec.int
diff --git a/base/elm/test/inputs/json/misc/0b91a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0b91a.json/default/QuickType.elm
index 963fa80..a9f092d 100644
--- a/base/elm/test/inputs/json/misc/0b91a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0b91a.json/default/QuickType.elm
@@ -72,6 +72,12 @@ type alias Component =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -142,8 +148,8 @@ result =
         |> Jpipe.required "created" Jdec.string
         |> Jpipe.required "date" Jdec.string
         |> Jpipe.required "image" (Jdec.list Jdec.value)
-        |> Jpipe.optional "number" (Jdec.null ()) ()
-        |> Jpipe.optional "teaser" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "number" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "teaser" (Jdec.null ()) ())
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "topic" (Jdec.list Jdec.value)
         |> Jpipe.required "url" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/0cffa.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0cffa.json/default/QuickType.elm
index b88d862..b6eb648 100644
--- a/base/elm/test/inputs/json/misc/0cffa.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0cffa.json/default/QuickType.elm
@@ -154,6 +154,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -192,7 +198,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" username
 
 encodeDatum : Datum -> Jenc.Value
@@ -256,7 +262,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -290,7 +296,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -323,11 +329,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/0e0c2.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0e0c2.json/default/QuickType.elm
index 7943aea..0a298ff 100644
--- a/base/elm/test/inputs/json/misc/0e0c2.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0e0c2.json/default/QuickType.elm
@@ -114,6 +114,12 @@ type alias VoteScore =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -123,7 +129,7 @@ quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "count" Jdec.int
         |> Jpipe.required "next" Jdec.string
-        |> Jpipe.optional "previous" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ())
         |> Jpipe.required "results" (Jdec.list result)
 
 encodeQuickType : QuickType -> Jenc.Value
@@ -148,7 +154,7 @@ result =
         |> Jpipe.required "language" resultLanguage
         |> Jpipe.required "release_date" Jdec.string
         |> Jpipe.required "stars" Jdec.int
-        |> Jpipe.optional "tags" (Jdec.nullable (Jdec.list Jdec.value)) Nothing
+        |> Jpipe.custom (optionalField "tags" (Jdec.nullable (Jdec.list Jdec.value)) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "videos" (Jdec.list video)
         |> Jpipe.required "vote_score" voteScore
diff --git a/base/elm/test/inputs/json/misc/0fecf.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/0fecf.json/default/QuickType.elm
index a19e480..93f9efa 100644
--- a/base/elm/test/inputs/json/misc/0fecf.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/0fecf.json/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/10be4.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/10be4.json/default/QuickType.elm
index db93f6e..77549e4 100644
--- a/base/elm/test/inputs/json/misc/10be4.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/10be4.json/default/QuickType.elm
@@ -104,6 +104,12 @@ type Title
     | PDF
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -120,7 +126,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list otherName)
-        |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
@@ -241,7 +247,7 @@ otherName : Jdec.Decoder OtherName
 otherName =
     Jdec.succeed OtherName
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing)
 
 encodeOtherName : OtherName -> Jenc.Value
 encodeOtherName x =
diff --git a/base/elm/test/inputs/json/misc/112b5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/112b5.json/default/QuickType.elm
index 77a2df9..ccac80c 100644
--- a/base/elm/test/inputs/json/misc/112b5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/112b5.json/default/QuickType.elm
@@ -43,6 +43,12 @@ type alias Headers =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/127a1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/127a1.json/default/QuickType.elm
index e1b1ce2..32a295b 100644
--- a/base/elm/test/inputs/json/misc/127a1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/127a1.json/default/QuickType.elm
@@ -153,6 +153,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -191,7 +197,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" username
 
 encodeDatum : Datum -> Jenc.Value
@@ -255,7 +261,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -289,7 +295,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -322,11 +328,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
@@ -381,7 +387,7 @@ user =
         |> Jpipe.required "banner_url" Jdec.string
         |> Jpipe.required "display_name" Jdec.string
         |> Jpipe.required "profile_url" Jdec.string
-        |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "username" username
 
 encodeUser : User -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/13d8d.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/13d8d.json/default/QuickType.elm
index 28d08f0..c018365 100644
--- a/base/elm/test/inputs/json/misc/13d8d.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/13d8d.json/default/QuickType.elm
@@ -57,6 +57,12 @@ type alias OutcomeStatus =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/14d38.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/14d38.json/default/QuickType.elm
index ef0623c..5a3bf52 100644
--- a/base/elm/test/inputs/json/misc/14d38.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/14d38.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type alias Headers =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/167d6.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/167d6.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/167d6.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/167d6.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/16bc5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/16bc5.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/16bc5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/16bc5.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/176f1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/176f1.json/default/QuickType.elm
index 19de555..ac9eb04 100644
--- a/base/elm/test/inputs/json/misc/176f1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/176f1.json/default/QuickType.elm
@@ -56,6 +56,12 @@ type alias Footnote =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -123,8 +129,8 @@ encodeDatum x =
 footnote : Jdec.Decoder Footnote
 footnote =
     Jdec.succeed Footnote
-        |> Jpipe.optional "code" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "code" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFootnote : Footnote -> Jenc.Value
 encodeFootnote x =
diff --git a/base/elm/test/inputs/json/misc/1a7f5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/1a7f5.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/1a7f5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/1a7f5.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/1b28c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/1b28c.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/1b28c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/1b28c.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/1b409.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/1b409.json/default/QuickType.elm
index 7391b92..22173a0 100644
--- a/base/elm/test/inputs/json/misc/1b409.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/1b409.json/default/QuickType.elm
@@ -129,6 +129,12 @@ type Title
     | Commish
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -164,7 +170,7 @@ encodeMeta x =
 object : Jdec.Decoder Object
 object =
     Jdec.succeed Object
-        |> Jpipe.optional "caucus" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "caucus" (Jdec.null ()) ())
         |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int)
         |> Jpipe.required "current" Jdec.bool
         |> Jpipe.required "description" Jdec.string
@@ -172,14 +178,14 @@ object =
         |> Jpipe.required "enddate" Jdec.string
         |> Jpipe.required "extra" extra
         |> Jpipe.required "id" Jdec.int
-        |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "party" party
         |> Jpipe.required "person" person
         |> Jpipe.required "phone" Jdec.string
         |> Jpipe.required "role_type" roleType
         |> Jpipe.required "role_type_label" roleTypeLabel
-        |> Jpipe.optional "senator_class" (Jdec.null ()) ()
-        |> Jpipe.optional "senator_rank" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "senator_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "senator_rank" (Jdec.null ()) ())
         |> Jpipe.required "startdate" Jdec.string
         |> Jpipe.required "state" Jdec.string
         |> Jpipe.required "title" title
@@ -216,10 +222,10 @@ extra : Jdec.Decoder Extra
 extra =
     Jdec.succeed Extra
         |> Jpipe.required "address" Jdec.string
-        |> Jpipe.optional "contact_form" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "contact_form" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "office" Jdec.string
-        |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing)
 
 encodeExtra : Extra -> Jenc.Value
 encodeExtra x =
@@ -263,10 +269,10 @@ person =
         |> Jpipe.required "namemod" namemod
         |> Jpipe.required "nickname" Jdec.string
         |> Jpipe.required "osid" Jdec.string
-        |> Jpipe.optional "pvsid" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "pvsid" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "sortname" Jdec.string
-        |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing)
 
 encodePerson : Person -> Jenc.Value
 encodePerson x =
diff --git a/base/elm/test/inputs/json/misc/2465e.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/2465e.json/default/QuickType.elm
index 9334fae..4b4f9c3 100644
--- a/base/elm/test/inputs/json/misc/2465e.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/2465e.json/default/QuickType.elm
@@ -112,6 +112,12 @@ type alias Schema =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/24f52.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/24f52.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/24f52.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/24f52.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/262f0.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/262f0.json/default/QuickType.elm
index 38aae10..5b0d277 100644
--- a/base/elm/test/inputs/json/misc/262f0.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/262f0.json/default/QuickType.elm
@@ -144,6 +144,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/26b49.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/26b49.json/default/QuickType.elm
index cc2bc1d..d6b311f 100644
--- a/base/elm/test/inputs/json/misc/26b49.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/26b49.json/default/QuickType.elm
@@ -150,6 +150,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -188,7 +194,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" Jdec.string
 
 encodeDatum : Datum -> Jenc.Value
@@ -245,7 +251,7 @@ images =
         |> Jpipe.required "fixed_width_small" fixedHeight
         |> Jpipe.required "fixed_width_small_still" the480WStill
         |> Jpipe.required "fixed_width_still" the480WStill
-        |> Jpipe.optional "hd" (Jdec.nullable downsizedSmall) Nothing
+        |> Jpipe.custom (optionalField "hd" (Jdec.nullable downsizedSmall) Nothing)
         |> Jpipe.required "looping" looping
         |> Jpipe.required "original" fixedHeight
         |> Jpipe.required "original_mp4" downsizedSmall
@@ -253,7 +259,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -288,7 +294,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -321,11 +327,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
@@ -386,7 +392,7 @@ user =
         |> Jpipe.required "banner_url" Jdec.string
         |> Jpipe.required "display_name" Jdec.string
         |> Jpipe.required "profile_url" Jdec.string
-        |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "username" Jdec.string
 
 encodeUser : User -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/26c9c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/26c9c.json/default/QuickType.elm
index 194c4eb..49785ef 100644
--- a/base/elm/test/inputs/json/misc/26c9c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/26c9c.json/default/QuickType.elm
@@ -241,6 +241,12 @@ type alias Expression =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -371,17 +377,17 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" Jdec.string
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" format
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" Jdec.string
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -402,12 +408,12 @@ encodeColumn x =
 cachedContents : Jdec.Decoder CachedContents
 cachedContents =
     Jdec.succeed CachedContents
-        |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "largest" Jdec.string
         |> Jpipe.required "non_null" Jdec.int
         |> Jpipe.required "null" Jdec.int
         |> Jpipe.required "smallest" Jdec.string
-        |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "top" (Jdec.list top)
 
 encodeCachedContents : CachedContents -> Jenc.Value
@@ -438,10 +444,10 @@ encodeTop x =
 format : Jdec.Decoder Format
 format =
     Jdec.succeed Format
-        |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "noCommas" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "precisionStyle" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "noCommas" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "precisionStyle" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFormat : Format -> Jenc.Value
 encodeFormat x =
diff --git a/base/elm/test/inputs/json/misc/27332.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/27332.json/default/QuickType.elm
index 4d9a06b..f715eee 100644
--- a/base/elm/test/inputs/json/misc/27332.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/27332.json/default/QuickType.elm
@@ -198,6 +198,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -219,7 +225,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -248,14 +254,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -263,7 +269,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "domain" domain
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -273,44 +279,44 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
-        |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing
-        |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing
+        |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing)
+        |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing)
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
-        |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
@@ -450,10 +456,10 @@ encodeOembed x =
 mediaEmbed : Jdec.Decoder MediaEmbed
 mediaEmbed =
     Jdec.succeed MediaEmbed
-        |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeMediaEmbed : MediaEmbed -> Jenc.Value
 encodeMediaEmbed x =
diff --git a/base/elm/test/inputs/json/misc/29f47.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/29f47.json/default/QuickType.elm
index 0b26eb3..d597cff 100644
--- a/base/elm/test/inputs/json/misc/29f47.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/29f47.json/default/QuickType.elm
@@ -187,6 +187,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -208,7 +214,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -237,14 +243,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "author_flair_text" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -262,44 +268,44 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_text" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ())
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "media" (Jdec.null ()) ())
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
-        |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing
-        |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing
+        |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing)
+        |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing)
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ())
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "thumbnail" Jdec.string
-        |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
@@ -484,8 +490,8 @@ encodeSource x =
 variants : Jdec.Decoder Variants
 variants =
     Jdec.succeed Variants
-        |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing
+        |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing)
 
 encodeVariants : Variants -> Jenc.Value
 encodeVariants x =
diff --git a/base/elm/test/inputs/json/misc/2d4e2.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/2d4e2.json/default/QuickType.elm
index 8fac6d2..9019369 100644
--- a/base/elm/test/inputs/json/misc/2d4e2.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/2d4e2.json/default/QuickType.elm
@@ -149,6 +149,12 @@ type Title
     = Sen
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -184,15 +190,15 @@ encodeMeta x =
 object : Jdec.Decoder Object
 object =
     Jdec.succeed Object
-        |> Jpipe.optional "caucus" (Jdec.nullable party) Nothing
+        |> Jpipe.custom (optionalField "caucus" (Jdec.nullable party) Nothing)
         |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int)
         |> Jpipe.required "current" Jdec.bool
         |> Jpipe.required "description" Jdec.string
-        |> Jpipe.optional "district" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "district" (Jdec.null ()) ())
         |> Jpipe.required "enddate" Jdec.string
         |> Jpipe.required "extra" extra
         |> Jpipe.required "id" Jdec.int
-        |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "party" party
         |> Jpipe.required "person" person
         |> Jpipe.required "phone" Jdec.string
@@ -258,9 +264,9 @@ extra =
     Jdec.succeed Extra
         |> Jpipe.required "address" Jdec.string
         |> Jpipe.required "contact_form" Jdec.string
-        |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "office" Jdec.string
-        |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing)
 
 encodeExtra : Extra -> Jenc.Value
 encodeExtra x =
@@ -291,8 +297,8 @@ person =
         |> Jpipe.required "osid" Jdec.string
         |> Jpipe.required "pvsid" Jdec.string
         |> Jpipe.required "sortname" Jdec.string
-        |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing)
 
 encodePerson : Person -> Jenc.Value
 encodePerson x =
diff --git a/base/elm/test/inputs/json/misc/2df80.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/2df80.json/default/QuickType.elm
index 5beacd7..7d2d1e5 100644
--- a/base/elm/test/inputs/json/misc/2df80.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/2df80.json/default/QuickType.elm
@@ -108,6 +108,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/31189.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/31189.json/default/QuickType.elm
index 991ce48..0835b15 100644
--- a/base/elm/test/inputs/json/misc/31189.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/31189.json/default/QuickType.elm
@@ -53,6 +53,12 @@ type alias Rates =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -62,7 +68,7 @@ quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "details" Jdec.string
         |> Jpipe.required "rates" (Jdec.list rate)
-        |> Jpipe.optional "version" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "version" (Jdec.null ()) ())
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
@@ -105,12 +111,12 @@ encodePeriod x =
 rates : Jdec.Decoder Rates
 rates =
     Jdec.succeed Rates
-        |> Jpipe.optional "parking" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "reduced" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "reduced1" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "reduced2" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "parking" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "reduced" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "reduced1" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "reduced2" (Jdec.nullable Jdec.float) Nothing)
         |> Jpipe.required "standard" Jdec.float
-        |> Jpipe.optional "super_reduced" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "super_reduced" (Jdec.nullable Jdec.float) Nothing)
 
 encodeRates : Rates -> Jenc.Value
 encodeRates x =
diff --git a/base/elm/test/inputs/json/misc/32431.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/32431.json/default/QuickType.elm
index 9a229cb..5eb4af1 100644
--- a/base/elm/test/inputs/json/misc/32431.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/32431.json/default/QuickType.elm
@@ -107,6 +107,12 @@ type alias Metadata =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -187,19 +193,19 @@ encodeGeometryType x = case x of
 properties : Jdec.Decoder Properties
 properties =
     Jdec.succeed Properties
-        |> Jpipe.optional "alert" (Jdec.null ()) ()
-        |> Jpipe.optional "cdi" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "alert" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cdi" (Jdec.null ()) ())
         |> Jpipe.required "code" Jdec.string
         |> Jpipe.required "detail" Jdec.string
-        |> Jpipe.optional "dmin" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "felt" (Jdec.null ()) ()
-        |> Jpipe.optional "gap" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "dmin" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "felt" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gap" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "ids" Jdec.string
         |> Jpipe.required "mag" Jdec.float
         |> Jpipe.required "magType" magType
-        |> Jpipe.optional "mmi" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "mmi" (Jdec.null ()) ())
         |> Jpipe.required "net" Jdec.string
-        |> Jpipe.optional "nst" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "nst" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "place" Jdec.string
         |> Jpipe.required "type" propertiesType
         |> Jpipe.required "rms" Jdec.float
diff --git a/base/elm/test/inputs/json/misc/32d5c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/32d5c.json/default/QuickType.elm
index a1cba9b..f30368c 100644
--- a/base/elm/test/inputs/json/misc/32d5c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/32d5c.json/default/QuickType.elm
@@ -37,6 +37,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -47,7 +53,7 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r)
 quickTypeElement : Jdec.Decoder QuickTypeElement
 quickTypeElement =
     Jdec.succeed QuickTypeElement
-        |> Jpipe.optional "BirthDate" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "BirthDate" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "BirthDateIsProtected" Jdec.bool
         |> Jpipe.required "GenderTypeID" Jdec.int
         |> Jpipe.required "Notes" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/337ed.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/337ed.json/default/QuickType.elm
index 09bd438..01d4269 100644
--- a/base/elm/test/inputs/json/misc/337ed.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/337ed.json/default/QuickType.elm
@@ -102,6 +102,12 @@ type ResultType
     | FinancialDataTradeAssociation
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -142,36 +148,36 @@ encodeFacets x =
 result : Jdec.Decoder Result
 result =
     Jdec.succeed Result
-        |> Jpipe.optional "cost_absolute" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cost_max" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cost_min" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "cost_absolute" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cost_max" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cost_min" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "customIncomes" (Jdec.list customIncome)
-        |> Jpipe.optional "direct_rep_costs_max" (Jdec.null ()) ()
-        |> Jpipe.optional "direct_rep_costs_min" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "direct_rep_costs_max" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "direct_rep_costs_min" (Jdec.null ()) ())
         |> Jpipe.required "end_date" Jdec.string
         |> Jpipe.required "eur_sources_grants" Jdec.int
-        |> Jpipe.optional "eur_sources_grants_src" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "eur_sources_grants_src" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "eur_sources_procurement" Jdec.int
-        |> Jpipe.optional "eur_sources_procurement_src" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "eur_sources_procurement_src" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "new_organisation" (Jdec.null ()) ()
-        |> Jpipe.optional "no_clients" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "other_financial_information" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "other_sources_contributions" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "other_sources_donation" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "other_sources_total" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "public_financing_infranational" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "public_financing_national" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "public_financing_total" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "new_organisation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "no_clients" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "other_financial_information" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "other_sources_contributions" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "other_sources_donation" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "other_sources_total" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "public_financing_infranational" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "public_financing_national" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "public_financing_total" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "representative" Jdec.string
         |> Jpipe.required "type" resultType
         |> Jpipe.required "start_date" Jdec.string
         |> Jpipe.required "status" status
-        |> Jpipe.optional "total_budget" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "turnover_absolute" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "turnover_max" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "turnover_min" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "total_budget" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "turnover_absolute" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "turnover_max" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "turnover_min" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "updated_at" Jdec.string
         |> Jpipe.required "uri" Jdec.string
 
diff --git a/base/elm/test/inputs/json/misc/33d2e.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/33d2e.json/default/QuickType.elm
index 60046a5..e8bb8b8 100644
--- a/base/elm/test/inputs/json/misc/33d2e.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/33d2e.json/default/QuickType.elm
@@ -81,6 +81,12 @@ type Category
     | Economics
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -100,18 +106,18 @@ laureate : Jdec.Decoder Laureate
 laureate =
     Jdec.succeed Laureate
         |> Jpipe.required "born" Jdec.string
-        |> Jpipe.optional "bornCity" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "bornCountry" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "bornCountryCode" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "bornCity" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "bornCountry" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "bornCountryCode" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "died" Jdec.string
-        |> Jpipe.optional "diedCity" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "diedCountry" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "diedCountryCode" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "firstname" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "diedCity" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "diedCountry" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "diedCountryCode" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "firstname" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "gender" gender
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "prizes" (Jdec.list prize)
-        |> Jpipe.optional "surname" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "surname" (Jdec.nullable Jdec.string) Nothing)
 
 encodeLaureate : Laureate -> Jenc.Value
 encodeLaureate x =
@@ -152,11 +158,11 @@ prize : Jdec.Decoder Prize
 prize =
     Jdec.succeed Prize
         |> Jpipe.required "affiliations" (Jdec.list affiliationElement)
-        |> Jpipe.optional "category" (Jdec.nullable category) Nothing
-        |> Jpipe.optional "motivation" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "overallMotivation" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "share" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "category" (Jdec.nullable category) Nothing)
+        |> Jpipe.custom (optionalField "motivation" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "overallMotivation" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "share" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing)
 
 encodePrize : Prize -> Jenc.Value
 encodePrize x =
@@ -184,9 +190,9 @@ encodeAffiliationElement x = case x of
 affiliationClass : Jdec.Decoder AffiliationClass
 affiliationClass =
     Jdec.succeed AffiliationClass
-        |> Jpipe.optional "city" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "country" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "city" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "country" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing)
 
 encodeAffiliationClass : AffiliationClass -> Jenc.Value
 encodeAffiliationClass x =
diff --git a/base/elm/test/inputs/json/misc/34702.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/34702.json/default/QuickType.elm
index c949acf..c479d74 100644
--- a/base/elm/test/inputs/json/misc/34702.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/34702.json/default/QuickType.elm
@@ -126,6 +126,12 @@ type Region
     | SouthernMetro
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -247,14 +253,14 @@ featureProperties =
     Jdec.succeed FeatureProperties
         |> Jpipe.required "division" Jdec.string
         |> Jpipe.required "fax" Jdec.float
-        |> Jpipe.optional "fire_ban_r" (Jdec.nullable fireBanR) Nothing
+        |> Jpipe.custom (optionalField "fire_ban_r" (Jdec.nullable fireBanR) Nothing)
         |> Jpipe.required "latitude" Jdec.float
         |> Jpipe.required "local_govt" Jdec.string
         |> Jpipe.required "longitude" Jdec.float
-        |> Jpipe.optional "no" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "no" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "phone" Jdec.float
         |> Jpipe.required "postcode" Jdec.int
-        |> Jpipe.optional "type" (Jdec.nullable propertiesType) Nothing
+        |> Jpipe.custom (optionalField "type" (Jdec.nullable propertiesType) Nothing)
         |> Jpipe.required "psa" Jdec.string
         |> Jpipe.required "region" region
         |> Jpipe.required "station" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/3536b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/3536b.json/default/QuickType.elm
index e5acac4..c5b75ba 100644
--- a/base/elm/test/inputs/json/misc/3536b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/3536b.json/default/QuickType.elm
@@ -68,6 +68,12 @@ type alias Text =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/3659d.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/3659d.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/3659d.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/3659d.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/36d5d.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/36d5d.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/36d5d.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/36d5d.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/3a6b3.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/3a6b3.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/3a6b3.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/3a6b3.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/3e9a3.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/3e9a3.json/default/QuickType.elm
index 19de555..ac9eb04 100644
--- a/base/elm/test/inputs/json/misc/3e9a3.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/3e9a3.json/default/QuickType.elm
@@ -56,6 +56,12 @@ type alias Footnote =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -123,8 +129,8 @@ encodeDatum x =
 footnote : Jdec.Decoder Footnote
 footnote =
     Jdec.succeed Footnote
-        |> Jpipe.optional "code" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "code" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFootnote : Footnote -> Jenc.Value
 encodeFootnote x =
diff --git a/base/elm/test/inputs/json/misc/3f1ce.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/3f1ce.json/default/QuickType.elm
index d471c1e..5736f43 100644
--- a/base/elm/test/inputs/json/misc/3f1ce.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/3f1ce.json/default/QuickType.elm
@@ -142,6 +142,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/421d4.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/421d4.json/default/QuickType.elm
index a63bce6..991ee00 100644
--- a/base/elm/test/inputs/json/misc/421d4.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/421d4.json/default/QuickType.elm
@@ -158,6 +158,12 @@ type alias Owner =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -292,17 +298,17 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" Jdec.string
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" query
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" Jdec.string
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -323,13 +329,13 @@ encodeColumn x =
 cachedContents : Jdec.Decoder CachedContents
 cachedContents =
     Jdec.succeed CachedContents
-        |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "largest" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "largest" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "non_null" Jdec.int
         |> Jpipe.required "null" Jdec.int
-        |> Jpipe.optional "smallest" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "top" (Jdec.nullable (Jdec.list top)) Nothing
+        |> Jpipe.custom (optionalField "smallest" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "top" (Jdec.nullable (Jdec.list top)) Nothing)
 
 encodeCachedContents : CachedContents -> Jenc.Value
 encodeCachedContents x =
diff --git a/base/elm/test/inputs/json/misc/437e7.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/437e7.json/default/QuickType.elm
index d0e4b2a..ad50348 100644
--- a/base/elm/test/inputs/json/misc/437e7.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/437e7.json/default/QuickType.elm
@@ -147,6 +147,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -185,7 +191,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" Jdec.string
 
 encodeDatum : Datum -> Jenc.Value
@@ -281,7 +287,7 @@ downsized : Jdec.Decoder Downsized
 downsized =
     Jdec.succeed Downsized
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -314,10 +320,10 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/43970.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/43970.json/default/QuickType.elm
index 898c7ef..c475117 100644
--- a/base/elm/test/inputs/json/misc/43970.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/43970.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/43eaf.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/43eaf.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/43eaf.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/43eaf.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/458db.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/458db.json/default/QuickType.elm
index be2b88e..61f70e7 100644
--- a/base/elm/test/inputs/json/misc/458db.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/458db.json/default/QuickType.elm
@@ -75,6 +75,12 @@ type Name
     = OfficeOnViolenceAgainstWomen
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/4961a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4961a.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/4961a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4961a.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/4a0d7.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4a0d7.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/4a0d7.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4a0d7.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/4a455.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4a455.json/default/QuickType.elm
index 2bc00ac..daa9498 100644
--- a/base/elm/test/inputs/json/misc/4a455.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4a455.json/default/QuickType.elm
@@ -78,6 +78,12 @@ type alias FeatureProperties =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/4c547.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4c547.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/4c547.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4c547.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/4d6fb.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4d6fb.json/default/QuickType.elm
index 9ab3068..895b7d0 100644
--- a/base/elm/test/inputs/json/misc/4d6fb.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4d6fb.json/default/QuickType.elm
@@ -192,6 +192,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -213,7 +219,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -242,14 +248,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "author_flair_text" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -257,7 +263,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ())
         |> Jpipe.required "domain" Jdec.string
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -267,44 +273,44 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_text" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ())
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
-        |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing
-        |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing
+        |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing)
+        |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing)
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ())
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
-        |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
@@ -427,10 +433,10 @@ encodeOembed x =
 mediaEmbed : Jdec.Decoder MediaEmbed
 mediaEmbed =
     Jdec.succeed MediaEmbed
-        |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeMediaEmbed : MediaEmbed -> Jenc.Value
 encodeMediaEmbed x =
diff --git a/base/elm/test/inputs/json/misc/4e336.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/4e336.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/4e336.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/4e336.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/54147.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/54147.json/default/QuickType.elm
index 1ce3519..ea8998e 100644
--- a/base/elm/test/inputs/json/misc/54147.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/54147.json/default/QuickType.elm
@@ -46,6 +46,12 @@ type alias Headers =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/54d32.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/54d32.json/default/QuickType.elm
index 4aee4af..dd8f3e6 100644
--- a/base/elm/test/inputs/json/misc/54d32.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/54d32.json/default/QuickType.elm
@@ -53,6 +53,12 @@ type Status
     | Active
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/570ec.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/570ec.json/default/QuickType.elm
index 645956f..600cac1 100644
--- a/base/elm/test/inputs/json/misc/570ec.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/570ec.json/default/QuickType.elm
@@ -68,6 +68,12 @@ type alias Text =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -84,7 +90,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list otherName)
-        |> Jpipe.optional "superseded_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ())
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
@@ -147,7 +153,7 @@ otherName : Jdec.Decoder OtherName
 otherName =
     Jdec.succeed OtherName
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing)
 
 encodeOtherName : OtherName -> Jenc.Value
 encodeOtherName x =
diff --git a/base/elm/test/inputs/json/misc/5dd0d.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/5dd0d.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/5dd0d.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/5dd0d.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/5eae5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/5eae5.json/default/QuickType.elm
index 0d94082..e72c0eb 100644
--- a/base/elm/test/inputs/json/misc/5eae5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/5eae5.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/5eb20.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/5eb20.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/5eb20.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/5eb20.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/5f3a1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/5f3a1.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/5f3a1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/5f3a1.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/5f7fe.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/5f7fe.json/default/QuickType.elm
index 319fca4..a909547 100644
--- a/base/elm/test/inputs/json/misc/5f7fe.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/5f7fe.json/default/QuickType.elm
@@ -243,6 +243,12 @@ type alias Expression =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -373,17 +379,17 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" typeName
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" format
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" typeName
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -453,8 +459,8 @@ encodeTypeName x = case x of
 format : Jdec.Decoder Format
 format =
     Jdec.succeed Format
-        |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFormat : Format -> Jenc.Value
 encodeFormat x =
diff --git a/base/elm/test/inputs/json/misc/617e8.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/617e8.json/default/QuickType.elm
index 21dca74..db52b5b 100644
--- a/base/elm/test/inputs/json/misc/617e8.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/617e8.json/default/QuickType.elm
@@ -242,6 +242,12 @@ type alias Expression =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -372,18 +378,18 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" typeName
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" format
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" typeName
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -454,8 +460,8 @@ encodeTypeName x = case x of
 format : Jdec.Decoder Format
 format =
     Jdec.succeed Format
-        |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "view" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "view" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFormat : Format -> Jenc.Value
 encodeFormat x =
diff --git a/base/elm/test/inputs/json/misc/61b66.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/61b66.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/61b66.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/61b66.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/6260a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6260a.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/6260a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6260a.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/65dec.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/65dec.json/default/QuickType.elm
index 886e486..b01f2ac 100644
--- a/base/elm/test/inputs/json/misc/65dec.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/65dec.json/default/QuickType.elm
@@ -123,6 +123,12 @@ type Type
     | Sorcery
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -164,31 +170,31 @@ card =
         |> Jpipe.required "artist" Jdec.string
         |> Jpipe.required "type" Jdec.string
         |> Jpipe.required "cmc" Jdec.int
-        |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing
-        |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list watermark)) Nothing
-        |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing)
+        |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list watermark)) Nothing)
+        |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "imageName" Jdec.string
         |> Jpipe.required "layout" layout
         |> Jpipe.required "legalities" (Jdec.list legalityElement)
-        |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "multiverseid" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "originalText" Jdec.string
         |> Jpipe.required "originalType" Jdec.string
-        |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "printings" (Jdec.list Jdec.string)
         |> Jpipe.required "rarity" rarity
-        |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing
-        |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing)
+        |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "types" (Jdec.list purpleType)
-        |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing
-        |> Jpipe.optional "watermark" (Jdec.nullable watermark) Nothing
+        |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing)
+        |> Jpipe.custom (optionalField "watermark" (Jdec.nullable watermark) Nothing)
 
 encodeCard : Card -> Jenc.Value
 encodeCard x =
diff --git a/base/elm/test/inputs/json/misc/66121.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/66121.json/default/QuickType.elm
index 875a510..fad3802 100644
--- a/base/elm/test/inputs/json/misc/66121.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/66121.json/default/QuickType.elm
@@ -80,6 +80,12 @@ type Title
     = HTML
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -96,7 +102,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/6617c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6617c.json/default/QuickType.elm
index 58814e6..98976ec 100644
--- a/base/elm/test/inputs/json/misc/6617c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6617c.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type alias IssPosition =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/67c03.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/67c03.json/default/QuickType.elm
index 9aaab9d..32677a5 100644
--- a/base/elm/test/inputs/json/misc/67c03.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/67c03.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type alias Person =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/68c30.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/68c30.json/default/QuickType.elm
index c72bcd3..2287450 100644
--- a/base/elm/test/inputs/json/misc/68c30.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/68c30.json/default/QuickType.elm
@@ -61,6 +61,12 @@ type alias Out =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/6c155.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6c155.json/default/QuickType.elm
index 0e1e900..f26017e 100644
--- a/base/elm/test/inputs/json/misc/6c155.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6c155.json/default/QuickType.elm
@@ -86,6 +86,12 @@ type alias Location =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -157,7 +163,7 @@ result =
         |> Jpipe.required "date" Jdec.string
         |> Jpipe.required "image" (Jdec.list Jdec.value)
         |> Jpipe.required "location" location
-        |> Jpipe.optional "teaser" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "teaser" (Jdec.null ()) ())
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "topic" (Jdec.list Jdec.value)
         |> Jpipe.required "url" Jdec.string
@@ -207,7 +213,7 @@ location =
         |> Jpipe.required "phone_number" Jdec.string
         |> Jpipe.required "phone_number_extension" Jdec.string
         |> Jpipe.required "postal_code" Jdec.string
-        |> Jpipe.optional "sub_premise" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "sub_premise" (Jdec.null ()) ())
         |> Jpipe.required "thoroughfare" Jdec.string
 
 encodeLocation : Location -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/6de06.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6de06.json/default/QuickType.elm
index 8818581..d9b6003 100644
--- a/base/elm/test/inputs/json/misc/6de06.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6de06.json/default/QuickType.elm
@@ -189,6 +189,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -210,7 +216,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -239,14 +245,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -254,7 +260,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ())
         |> Jpipe.required "domain" Jdec.string
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -264,44 +270,44 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
-        |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing
-        |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing
+        |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing)
+        |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing)
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" Jdec.string
         |> Jpipe.required "subreddit_id" Jdec.string
         |> Jpipe.required "subreddit_name_prefixed" Jdec.string
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "thumbnail" Jdec.string
-        |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
@@ -422,10 +428,10 @@ encodeOembed x =
 mediaEmbed : Jdec.Decoder MediaEmbed
 mediaEmbed =
     Jdec.succeed MediaEmbed
-        |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeMediaEmbed : MediaEmbed -> Jenc.Value
 encodeMediaEmbed x =
@@ -501,10 +507,10 @@ encodeSource x =
 variants : Jdec.Decoder Variants
 variants =
     Jdec.succeed Variants
-        |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "nsfw" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "obfuscated" (Jdec.nullable gif) Nothing
+        |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "nsfw" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "obfuscated" (Jdec.nullable gif) Nothing)
 
 encodeVariants : Variants -> Jenc.Value
 encodeVariants x =
diff --git a/base/elm/test/inputs/json/misc/6dec6.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6dec6.json/default/QuickType.elm
index 162536f..272dba5 100644
--- a/base/elm/test/inputs/json/misc/6dec6.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6dec6.json/default/QuickType.elm
@@ -144,6 +144,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/6eb00.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/6eb00.json/default/QuickType.elm
index a15b52d..22da735 100644
--- a/base/elm/test/inputs/json/misc/6eb00.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/6eb00.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/70c77.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/70c77.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/70c77.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/70c77.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/734ad.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/734ad.json/default/QuickType.elm
index 2d9b027..3105390 100644
--- a/base/elm/test/inputs/json/misc/734ad.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/734ad.json/default/QuickType.elm
@@ -105,6 +105,12 @@ type Status
     | Inactive
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -145,23 +151,23 @@ encodeFacets x =
 result : Jdec.Decoder Result
 result =
     Jdec.succeed Result
-        |> Jpipe.optional "acronym" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "acronym" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "activity_consult_committees" Jdec.string
         |> Jpipe.required "activity_eu_legislative" Jdec.string
         |> Jpipe.required "activity_expert_groups" Jdec.string
         |> Jpipe.required "activity_high_level_groups" Jdec.string
         |> Jpipe.required "activity_industry_forums" Jdec.string
         |> Jpipe.required "activity_inter_groups" Jdec.string
-        |> Jpipe.optional "activity_other" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "activity_other" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "activity_relevant_comm" Jdec.string
-        |> Jpipe.optional "be_office_country" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "be_office_lat" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "be_office_lon" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "be_office_phone" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "be_office_post_code" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "be_office_postbox" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "be_office_street" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "be_office_town" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "be_office_country" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "be_office_lat" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "be_office_lon" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "be_office_phone" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "be_office_post_code" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "be_office_postbox" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "be_office_street" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "be_office_town" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "code_of_conduct" Jdec.string
         |> Jpipe.required "contact_country" Jdec.int
         |> Jpipe.required "created_at" Jdec.string
@@ -169,11 +175,11 @@ result =
         |> Jpipe.required "goals" Jdec.string
         |> Jpipe.required "head" Jdec.string
         |> Jpipe.required "head_office_country" Jdec.string
-        |> Jpipe.optional "head_office_lat" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "head_office_lon" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "head_office_lat" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "head_office_lon" (Jdec.nullable Jdec.float) Nothing)
         |> Jpipe.required "head_office_phone" Jdec.string
-        |> Jpipe.optional "head_office_post_code" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "head_office_postbox" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "head_office_post_code" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "head_office_postbox" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "head_office_street" Jdec.string
         |> Jpipe.required "head_office_town" Jdec.string
         |> Jpipe.required "id" Jdec.string
@@ -185,16 +191,16 @@ result =
         |> Jpipe.required "main_category" Jdec.int
         |> Jpipe.required "main_category_title" Jdec.string
         |> Jpipe.required "members" Jdec.int
-        |> Jpipe.optional "members_100" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "members_25" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "members_50" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "members_75" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "members_100" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "members_25" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "members_50" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "members_75" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "members_fte" Jdec.float
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "native_name" (Jdec.null ()) ()
-        |> Jpipe.optional "networking" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "number_of_natural_persons" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "other_code_of_conduct" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "native_name" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "networking" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "number_of_natural_persons" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "other_code_of_conduct" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "registration_date" Jdec.string
         |> Jpipe.required "status" status
         |> Jpipe.required "structure_members" Jdec.string
@@ -202,7 +208,7 @@ result =
         |> Jpipe.required "sub_category_title" Jdec.string
         |> Jpipe.required "updated_at" Jdec.string
         |> Jpipe.required "uri" Jdec.string
-        |> Jpipe.optional "web_site_url" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "web_site_url" (Jdec.nullable Jdec.string) Nothing)
 
 encodeResult : Result -> Jenc.Value
 encodeResult x =
diff --git a/base/elm/test/inputs/json/misc/75912.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/75912.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/75912.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/75912.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/7681c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7681c.json/default/QuickType.elm
index a202f62..73ac4ae 100644
--- a/base/elm/test/inputs/json/misc/7681c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7681c.json/default/QuickType.elm
@@ -155,6 +155,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -193,7 +199,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" username
 
 encodeDatum : Datum -> Jenc.Value
@@ -257,7 +263,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -291,7 +297,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -324,11 +330,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
@@ -387,7 +393,7 @@ user =
         |> Jpipe.required "banner_url" Jdec.string
         |> Jpipe.required "display_name" Jdec.string
         |> Jpipe.required "profile_url" Jdec.string
-        |> Jpipe.optional "twitter" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitter" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "username" Jdec.string
 
 encodeUser : User -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/76ae1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/76ae1.json/default/QuickType.elm
index f79482a..c2b56d9 100644
--- a/base/elm/test/inputs/json/misc/76ae1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/76ae1.json/default/QuickType.elm
@@ -238,6 +238,12 @@ type SchemaType
     = TypeArray
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/77392.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/77392.json/default/QuickType.elm
index 292e865..32733a6 100644
--- a/base/elm/test/inputs/json/misc/77392.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/77392.json/default/QuickType.elm
@@ -57,6 +57,12 @@ type Pha
     | NA
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -69,14 +75,14 @@ quickTypeElement =
     Jdec.succeed QuickTypeElement
         |> Jpipe.required "designation" Jdec.string
         |> Jpipe.required "discovery_date" Jdec.string
-        |> Jpipe.optional "h_mag" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "h_mag" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "i_deg" Jdec.string
         |> Jpipe.required "moid_au" Jdec.string
         |> Jpipe.required "orbit_class" orbitClass
-        |> Jpipe.optional "period_yr" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "period_yr" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "pha" pha
         |> Jpipe.required "q_au_1" Jdec.string
-        |> Jpipe.optional "q_au_2" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "q_au_2" (Jdec.nullable Jdec.string) Nothing)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
 encodeQuickTypeElement x =
diff --git a/base/elm/test/inputs/json/misc/7d397.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7d397.json/default/QuickType.elm
index 157b037..88fc969 100644
--- a/base/elm/test/inputs/json/misc/7d397.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7d397.json/default/QuickType.elm
@@ -116,6 +116,12 @@ type alias Items =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/7d722.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7d722.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/7d722.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7d722.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/7df41.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7df41.json/default/QuickType.elm
index 40f2a6b..ba787c0 100644
--- a/base/elm/test/inputs/json/misc/7df41.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7df41.json/default/QuickType.elm
@@ -38,6 +38,12 @@ type alias PC =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/7dfa6.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7dfa6.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/7dfa6.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7dfa6.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/7eb30.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7eb30.json/default/QuickType.elm
index f60dce0..3b21887 100644
--- a/base/elm/test/inputs/json/misc/7eb30.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7eb30.json/default/QuickType.elm
@@ -78,6 +78,12 @@ type TelEnum
     | The022688899
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -87,7 +93,7 @@ quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "count" Jdec.int
         |> Jpipe.required "next" Jdec.string
-        |> Jpipe.optional "previous" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ())
         |> Jpipe.required "results" (Jdec.list result)
 
 encodeQuickType : QuickType -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/7f568.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7f568.json/default/QuickType.elm
index fea1498..cf391e1 100644
--- a/base/elm/test/inputs/json/misc/7f568.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7f568.json/default/QuickType.elm
@@ -62,6 +62,12 @@ type Language
     = Markdown
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -76,7 +82,7 @@ quickTypeElement =
         |> Jpipe.required "comments_url" Jdec.string
         |> Jpipe.required "commits_url" Jdec.string
         |> Jpipe.required "created_at" Jdec.string
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "files" (Jdec.dict file)
         |> Jpipe.required "forks_url" Jdec.string
         |> Jpipe.required "git_pull_url" Jdec.string
@@ -87,7 +93,7 @@ quickTypeElement =
         |> Jpipe.required "truncated" Jdec.bool
         |> Jpipe.required "updated_at" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "user" (Jdec.null ()) ())
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
 encodeQuickTypeElement x =
@@ -115,7 +121,7 @@ file =
     Jdec.succeed File
         |> Jpipe.required "type" purpleType
         |> Jpipe.required "filename" Jdec.string
-        |> Jpipe.optional "language" (Jdec.nullable language) Nothing
+        |> Jpipe.custom (optionalField "language" (Jdec.nullable language) Nothing)
         |> Jpipe.required "raw_url" Jdec.string
         |> Jpipe.required "size" Jdec.int
 
diff --git a/base/elm/test/inputs/json/misc/7fbfb.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/7fbfb.json/default/QuickType.elm
index d91afd6..a4cbbea 100644
--- a/base/elm/test/inputs/json/misc/7fbfb.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/7fbfb.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/80aff.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/80aff.json/default/QuickType.elm
index b593006..da624de 100644
--- a/base/elm/test/inputs/json/misc/80aff.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/80aff.json/default/QuickType.elm
@@ -49,6 +49,12 @@ type alias Result =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -93,7 +99,7 @@ result =
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "items" Jdec.int
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "parent" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "parent" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "updated_at" Jdec.string
         |> Jpipe.required "uri" Jdec.string
 
diff --git a/base/elm/test/inputs/json/misc/82509.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/82509.json/default/QuickType.elm
index 301c8ef..6d5fa4c 100644
--- a/base/elm/test/inputs/json/misc/82509.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/82509.json/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/8592b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/8592b.json/default/QuickType.elm
index 891d864..fceafc7 100644
--- a/base/elm/test/inputs/json/misc/8592b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/8592b.json/default/QuickType.elm
@@ -165,6 +165,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -186,7 +192,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -215,14 +221,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -230,7 +236,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ())
         |> Jpipe.required "domain" Jdec.string
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -240,29 +246,29 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
         |> Jpipe.required "link_flair_css_class" Jdec.string
         |> Jpipe.required "link_flair_text" Jdec.string
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "media" (Jdec.null ()) ())
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
-        |> Jpipe.optional "post_hint" (Jdec.nullable postHint) Nothing
-        |> Jpipe.optional "preview" (Jdec.nullable preview) Nothing
+        |> Jpipe.custom (optionalField "post_hint" (Jdec.nullable postHint) Nothing)
+        |> Jpipe.custom (optionalField "preview" (Jdec.nullable preview) Nothing)
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ())
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
@@ -271,13 +277,13 @@ childData =
         |> Jpipe.required "subreddit_type" subredditType
         |> Jpipe.required "suggested_sort" suggestedSort
         |> Jpipe.required "thumbnail" Jdec.string
-        |> Jpipe.optional "thumbnail_height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thumbnail_width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "thumbnail_height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thumbnail_width" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/88130.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/88130.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/88130.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/88130.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/8a62c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/8a62c.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/8a62c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/8a62c.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/908db.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/908db.json/default/QuickType.elm
index e9d1869..da06f33 100644
--- a/base/elm/test/inputs/json/misc/908db.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/908db.json/default/QuickType.elm
@@ -38,6 +38,12 @@ type alias StateState =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/9617f.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9617f.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/9617f.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9617f.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/96f7c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/96f7c.json/default/QuickType.elm
index 57094b3..fead1ca 100644
--- a/base/elm/test/inputs/json/misc/96f7c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/96f7c.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/9847b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9847b.json/default/QuickType.elm
index 6dde07b..78172e4 100644
--- a/base/elm/test/inputs/json/misc/9847b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9847b.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/9929c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9929c.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/9929c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9929c.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/996bd.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/996bd.json/default/QuickType.elm
index 54536bf..3ba681e 100644
--- a/base/elm/test/inputs/json/misc/996bd.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/996bd.json/default/QuickType.elm
@@ -79,6 +79,12 @@ type Title
     | HTML
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -95,7 +101,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/9a503.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9a503.json/default/QuickType.elm
index ce78d86..f255e77 100644
--- a/base/elm/test/inputs/json/misc/9a503.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9a503.json/default/QuickType.elm
@@ -62,6 +62,12 @@ type alias Text =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -78,7 +84,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ())
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/9ac3b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9ac3b.json/default/QuickType.elm
index c477159..524a417 100644
--- a/base/elm/test/inputs/json/misc/9ac3b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9ac3b.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type Title
     | MS
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -109,9 +115,9 @@ result =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "last_name" Jdec.string
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "position" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "position" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "status" status
-        |> Jpipe.optional "title" (Jdec.nullable title) Nothing
+        |> Jpipe.custom (optionalField "title" (Jdec.nullable title) Nothing)
         |> Jpipe.required "updated_at" Jdec.string
         |> Jpipe.required "uri" Jdec.string
 
diff --git a/base/elm/test/inputs/json/misc/9eed5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/9eed5.json/default/QuickType.elm
index b52e769..1220aab 100644
--- a/base/elm/test/inputs/json/misc/9eed5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/9eed5.json/default/QuickType.elm
@@ -61,6 +61,12 @@ type alias Text =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -77,7 +83,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list Jdec.value)
-        |> Jpipe.optional "superseded_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.null ()) ())
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/a0496.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a0496.json/default/QuickType.elm
index b4383f6..1d2ec8a 100644
--- a/base/elm/test/inputs/json/misc/a0496.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a0496.json/default/QuickType.elm
@@ -54,6 +54,12 @@ type alias Errors =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/a1eca.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a1eca.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/a1eca.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a1eca.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/a3d8c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a3d8c.json/default/QuickType.elm
index 8e1d299..4b13f1d 100644
--- a/base/elm/test/inputs/json/misc/a3d8c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a3d8c.json/default/QuickType.elm
@@ -161,6 +161,12 @@ type alias Owner =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -289,17 +295,17 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" typeName
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" query
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" typeName
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -320,12 +326,12 @@ encodeColumn x =
 cachedContents : Jdec.Decoder CachedContents
 cachedContents =
     Jdec.succeed CachedContents
-        |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "largest" Jdec.string
         |> Jpipe.required "non_null" Jdec.int
         |> Jpipe.required "null" Jdec.int
         |> Jpipe.required "smallest" Jdec.string
-        |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "top" (Jdec.list top)
 
 encodeCachedContents : CachedContents -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/a45b0.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a45b0.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/a45b0.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a45b0.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/a71df.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a71df.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/a71df.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a71df.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/a9691.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/a9691.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/a9691.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/a9691.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/ab0d1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ab0d1.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/ab0d1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ab0d1.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/abb4b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/abb4b.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/abb4b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/abb4b.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/ac944.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ac944.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/ac944.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ac944.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/ad8be.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ad8be.json/default/QuickType.elm
index db93f6e..77549e4 100644
--- a/base/elm/test/inputs/json/misc/ad8be.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ad8be.json/default/QuickType.elm
@@ -104,6 +104,12 @@ type Title
     | PDF
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -120,7 +126,7 @@ quickTypeElement =
         |> Jpipe.required "links" (Jdec.list link)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "other_names" (Jdec.list otherName)
-        |> Jpipe.optional "superseded_by" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "superseded_by" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "text" (Jdec.list text)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
@@ -241,7 +247,7 @@ otherName : Jdec.Decoder OtherName
 otherName =
     Jdec.succeed OtherName
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "note" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "note" (Jdec.nullable Jdec.string) Nothing)
 
 encodeOtherName : OtherName -> Jenc.Value
 encodeOtherName x =
diff --git a/base/elm/test/inputs/json/misc/ae7f0.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ae7f0.json/default/QuickType.elm
index fe28393..1ea97ec 100644
--- a/base/elm/test/inputs/json/misc/ae7f0.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ae7f0.json/default/QuickType.elm
@@ -135,6 +135,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -156,7 +162,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -185,14 +191,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "author_flair_text" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -200,7 +206,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ())
         |> Jpipe.required "domain" domain
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -210,40 +216,40 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "media" (Jdec.null ()) ())
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ())
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ())
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/ae9ca.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ae9ca.json/default/QuickType.elm
index 57d37f3..5f24a8f 100644
--- a/base/elm/test/inputs/json/misc/ae9ca.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ae9ca.json/default/QuickType.elm
@@ -81,6 +81,12 @@ type Ward
     | Central
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/af2d1.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/af2d1.json/default/QuickType.elm
index d889481..d19687f 100644
--- a/base/elm/test/inputs/json/misc/af2d1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/af2d1.json/default/QuickType.elm
@@ -150,6 +150,12 @@ type Status
     = Current
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -269,44 +275,44 @@ encodeGeometryName x = case x of
 featureProperties : Jdec.Decoder FeatureProperties
 featureProperties =
     Jdec.succeed FeatureProperties
-        |> Jpipe.optional "add_improv" (Jdec.nullable addImprov) Nothing
+        |> Jpipe.custom (optionalField "add_improv" (Jdec.nullable addImprov) Nothing)
         |> Jpipe.required "area_" Jdec.float
         |> Jpipe.required "asset_numb" Jdec.string
-        |> Jpipe.optional "comments" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "comments" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "condition" Jdec.int
-        |> Jpipe.optional "constructi" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "createdate" (Jdec.null ()) ()
-        |> Jpipe.optional "createuser" (Jdec.null ()) ()
-        |> Jpipe.optional "disposal_d" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "constructi" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "createdate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "createuser" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disposal_d" (Jdec.null ()) ())
         |> Jpipe.required "documents" Jdec.string
-        |> Jpipe.optional "drawing_nu" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "file_numbe" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "folder_num" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "funding_ba" (Jdec.nullable fundingBa) Nothing
+        |> Jpipe.custom (optionalField "drawing_nu" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "file_numbe" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "folder_num" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "funding_ba" (Jdec.nullable fundingBa) Nothing)
         |> Jpipe.required "historic_c" Jdec.int
         |> Jpipe.required "inspection" Jdec.string
-        |> Jpipe.optional "inspectors" (Jdec.null ()) ()
-        |> Jpipe.optional "last_updat" (Jdec.null ()) ()
-        |> Jpipe.optional "level_accu" (Jdec.nullable levelAccu) Nothing
+        |> Jpipe.custom (optionalField "inspectors" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "last_updat" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "level_accu" (Jdec.nullable levelAccu) Nothing)
         |> Jpipe.required "material" material
         |> Jpipe.required "mi_prinx" Jdec.int
         |> Jpipe.required "mi_symbolo" miSymbolo
         |> Jpipe.required "number_lan" Jdec.int
-        |> Jpipe.optional "owner" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "positional" (Jdec.nullable levelAccu) Nothing
-        |> Jpipe.optional "project_nu" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "type" (Jdec.nullable propertiesType) Nothing
+        |> Jpipe.custom (optionalField "owner" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "positional" (Jdec.nullable levelAccu) Nothing)
+        |> Jpipe.custom (optionalField "project_nu" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "type" (Jdec.nullable propertiesType) Nothing)
         |> Jpipe.required "rec_id" Jdec.int
-        |> Jpipe.optional "record_cre" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "record_cre" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "shape_area" Jdec.float
         |> Jpipe.required "shape_leng" Jdec.float
         |> Jpipe.required "status" status
-        |> Jpipe.optional "survey_num" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "survey_num" (Jdec.null ()) ())
         |> Jpipe.required "toe_rl" Jdec.float
         |> Jpipe.required "top_rl" Jdec.float
         |> Jpipe.required "update_dat" Jdec.string
-        |> Jpipe.optional "updatedate" (Jdec.null ()) ()
-        |> Jpipe.optional "updateuser" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "updatedate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "updateuser" (Jdec.null ()) ())
 
 encodeFeatureProperties : FeatureProperties -> Jenc.Value
 encodeFeatureProperties x =
diff --git a/base/elm/test/inputs/json/misc/b4865.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/b4865.json/default/QuickType.elm
index 0cca798..29fec35 100644
--- a/base/elm/test/inputs/json/misc/b4865.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/b4865.json/default/QuickType.elm
@@ -60,6 +60,12 @@ type Nametype
     = Valid
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -70,18 +76,18 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r)
 quickTypeElement : Jdec.Decoder QuickTypeElement
 quickTypeElement =
     Jdec.succeed QuickTypeElement
-        |> Jpipe.optional ":@computed_region_cbhk_fwbd" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional ":@computed_region_nnqa_25f4" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField ":@computed_region_cbhk_fwbd" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField ":@computed_region_nnqa_25f4" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "fall" fall
-        |> Jpipe.optional "geolocation" (Jdec.nullable geolocation) Nothing
+        |> Jpipe.custom (optionalField "geolocation" (Jdec.nullable geolocation) Nothing)
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "mass" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mass" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "nametype" nametype
         |> Jpipe.required "recclass" Jdec.string
-        |> Jpipe.optional "reclat" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "reclong" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "reclat" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "reclong" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
 encodeQuickTypeElement x =
diff --git a/base/elm/test/inputs/json/misc/b6f2c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/b6f2c.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/b6f2c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/b6f2c.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/b6fe5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/b6fe5.json/default/QuickType.elm
index 25cea15..863ab90 100644
--- a/base/elm/test/inputs/json/misc/b6fe5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/b6fe5.json/default/QuickType.elm
@@ -30,6 +30,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/b9f64.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/b9f64.json/default/QuickType.elm
index b2353b1..a774a16 100644
--- a/base/elm/test/inputs/json/misc/b9f64.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/b9f64.json/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/bb1ec.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/bb1ec.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/bb1ec.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/bb1ec.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/be234.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/be234.json/default/QuickType.elm
index f882065..22b185f 100644
--- a/base/elm/test/inputs/json/misc/be234.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/be234.json/default/QuickType.elm
@@ -207,6 +207,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -228,7 +234,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -257,14 +263,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -272,7 +278,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "domain" domain
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -282,36 +288,36 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_text" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.null ()) ())
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
         |> Jpipe.required "post_hint" postHint
         |> Jpipe.required "preview" preview
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.nullable media) Nothing
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.nullable media) Nothing)
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ())
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
         |> Jpipe.required "thumbnail_height" Jdec.int
         |> Jpipe.required "thumbnail_width" Jdec.int
@@ -319,7 +325,7 @@ childData =
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
@@ -461,10 +467,10 @@ encodeOembed x =
 mediaEmbed : Jdec.Decoder MediaEmbed
 mediaEmbed =
     Jdec.succeed MediaEmbed
-        |> Jpipe.optional "content" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "height" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scrolling" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "height" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scrolling" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeMediaEmbed : MediaEmbed -> Jenc.Value
 encodeMediaEmbed x =
@@ -540,8 +546,8 @@ encodeSource x =
 variants : Jdec.Decoder Variants
 variants =
     Jdec.succeed Variants
-        |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing
+        |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing)
 
 encodeVariants : Variants -> Jenc.Value
 encodeVariants x =
diff --git a/base/elm/test/inputs/json/misc/c0356.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/c0356.json/default/QuickType.elm
index 1106cad..82cbe6f 100644
--- a/base/elm/test/inputs/json/misc/c0356.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/c0356.json/default/QuickType.elm
@@ -41,6 +41,12 @@ type alias Description =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/c0a3a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/c0a3a.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/c0a3a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/c0a3a.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/c3303.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/c3303.json/default/QuickType.elm
index 1bbc6fd..09ebeb1 100644
--- a/base/elm/test/inputs/json/misc/c3303.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/c3303.json/default/QuickType.elm
@@ -152,6 +152,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -190,7 +196,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" username
 
 encodeDatum : Datum -> Jenc.Value
@@ -254,7 +260,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -288,7 +294,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -321,11 +327,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/c6cfd.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/c6cfd.json/default/QuickType.elm
index 642cd81..2a2667e 100644
--- a/base/elm/test/inputs/json/misc/c6cfd.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/c6cfd.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Country =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/c8c7e.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/c8c7e.json/default/QuickType.elm
index 4736774..b29fa6e 100644
--- a/base/elm/test/inputs/json/misc/c8c7e.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/c8c7e.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/cb0cc.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cb0cc.json/default/QuickType.elm
index 85f7396..c8b8ab2 100644
--- a/base/elm/test/inputs/json/misc/cb0cc.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cb0cc.json/default/QuickType.elm
@@ -53,6 +53,12 @@ type alias Laureate =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -73,7 +79,7 @@ prize =
     Jdec.succeed Prize
         |> Jpipe.required "category" category
         |> Jpipe.required "laureates" (Jdec.list laureate)
-        |> Jpipe.optional "overallMotivation" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "overallMotivation" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "year" Jdec.string
 
 encodePrize : Prize -> Jenc.Value
@@ -113,7 +119,7 @@ laureate =
     Jdec.succeed Laureate
         |> Jpipe.required "firstname" Jdec.string
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "motivation" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "motivation" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "share" Jdec.string
         |> Jpipe.required "surname" Jdec.string
 
diff --git a/base/elm/test/inputs/json/misc/cb81e.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cb81e.json/default/QuickType.elm
index 02d4a9e..9354bd5 100644
--- a/base/elm/test/inputs/json/misc/cb81e.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cb81e.json/default/QuickType.elm
@@ -36,6 +36,12 @@ type alias Description =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/ccd18.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ccd18.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/ccd18.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ccd18.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/cd238.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cd238.json/default/QuickType.elm
index 125e30b..99bdd61 100644
--- a/base/elm/test/inputs/json/misc/cd238.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cd238.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias Meta =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/cd463.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cd463.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/cd463.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cd463.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/cda6c.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cda6c.json/default/QuickType.elm
index 2a1a839..8dbb280 100644
--- a/base/elm/test/inputs/json/misc/cda6c.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cda6c.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/cf0d8.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cf0d8.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/cf0d8.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cf0d8.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/cfbce.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/cfbce.json/default/QuickType.elm
index 90cd26e..a54c0ff 100644
--- a/base/elm/test/inputs/json/misc/cfbce.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/cfbce.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/d0908.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/d0908.json/default/QuickType.elm
index 899c09a..75a30a1 100644
--- a/base/elm/test/inputs/json/misc/d0908.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/d0908.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias TotalPopulation =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/d23d5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/d23d5.json/default/QuickType.elm
index e59be48..921fbda 100644
--- a/base/elm/test/inputs/json/misc/d23d5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/d23d5.json/default/QuickType.elm
@@ -48,6 +48,12 @@ type alias Result =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -88,7 +94,7 @@ encodeFacets x =
 result : Jdec.Decoder Result
 result =
     Jdec.succeed Result
-        |> Jpipe.optional "acronym" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "acronym" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "name" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/dbfb3.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/dbfb3.json/default/QuickType.elm
index 4e4c386..f7f7af1 100644
--- a/base/elm/test/inputs/json/misc/dbfb3.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/dbfb3.json/default/QuickType.elm
@@ -143,6 +143,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/dc44f.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/dc44f.json/default/QuickType.elm
index d44c72b..091aaff 100644
--- a/base/elm/test/inputs/json/misc/dc44f.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/dc44f.json/default/QuickType.elm
@@ -165,6 +165,12 @@ type Type
     | Land
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -223,30 +229,30 @@ card =
         |> Jpipe.required "artist" Jdec.string
         |> Jpipe.required "type" Jdec.string
         |> Jpipe.required "cmc" Jdec.int
-        |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing
-        |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list color)) Nothing
-        |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing)
+        |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list color)) Nothing)
+        |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "imageName" Jdec.string
         |> Jpipe.required "layout" layout
         |> Jpipe.required "legalities" (Jdec.list legalityElement)
-        |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "multiverseid" Jdec.int
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "originalText" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "originalText" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "originalType" Jdec.string
-        |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "printings" (Jdec.list Jdec.string)
         |> Jpipe.required "rarity" rarity
-        |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing
-        |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing
-        |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing)
+        |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing)
+        |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "types" (Jdec.list purpleType)
-        |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing
+        |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing)
 
 encodeCard : Card -> Jenc.Value
 encodeCard x =
diff --git a/base/elm/test/inputs/json/misc/dd1ce.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/dd1ce.json/default/QuickType.elm
index d44c72b..091aaff 100644
--- a/base/elm/test/inputs/json/misc/dd1ce.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/dd1ce.json/default/QuickType.elm
@@ -165,6 +165,12 @@ type Type
     | Land
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -223,30 +229,30 @@ card =
         |> Jpipe.required "artist" Jdec.string
         |> Jpipe.required "type" Jdec.string
         |> Jpipe.required "cmc" Jdec.int
-        |> Jpipe.optional "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing
-        |> Jpipe.optional "colors" (Jdec.nullable (Jdec.list color)) Nothing
-        |> Jpipe.optional "flavor" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "colorIdentity" (Jdec.nullable (Jdec.list colorIdentity)) Nothing)
+        |> Jpipe.custom (optionalField "colors" (Jdec.nullable (Jdec.list color)) Nothing)
+        |> Jpipe.custom (optionalField "flavor" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "imageName" Jdec.string
         |> Jpipe.required "layout" layout
         |> Jpipe.required "legalities" (Jdec.list legalityElement)
-        |> Jpipe.optional "manaCost" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mciNumber" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "manaCost" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mciNumber" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "multiverseid" Jdec.int
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "originalText" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "originalText" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "originalType" Jdec.string
-        |> Jpipe.optional "power" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "power" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "printings" (Jdec.list Jdec.string)
         |> Jpipe.required "rarity" rarity
-        |> Jpipe.optional "reserved" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing
-        |> Jpipe.optional "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing
-        |> Jpipe.optional "text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "toughness" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "reserved" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "rulings" (Jdec.nullable (Jdec.list ruling)) Nothing)
+        |> Jpipe.custom (optionalField "subtypes" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "supertypes" (Jdec.nullable (Jdec.list supertype)) Nothing)
+        |> Jpipe.custom (optionalField "text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "toughness" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "types" (Jdec.list purpleType)
-        |> Jpipe.optional "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing
+        |> Jpipe.custom (optionalField "variations" (Jdec.nullable (Jdec.list Jdec.int)) Nothing)
 
 encodeCard : Card -> Jenc.Value
 encodeCard x =
diff --git a/base/elm/test/inputs/json/misc/dec3a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/dec3a.json/default/QuickType.elm
index f8c6e4c..5d88f99 100644
--- a/base/elm/test/inputs/json/misc/dec3a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/dec3a.json/default/QuickType.elm
@@ -94,6 +94,12 @@ type alias Location =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -162,17 +168,17 @@ result =
         |> Jpipe.required "body" Jdec.string
         |> Jpipe.required "changed" Jdec.string
         |> Jpipe.required "created" Jdec.string
-        |> Jpipe.optional "deadline" (Jdec.null ()) ()
-        |> Jpipe.optional "hiring_office" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "deadline" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hiring_office" (Jdec.null ()) ())
         |> Jpipe.required "hiring_org" hiringOrg
-        |> Jpipe.optional "job_id" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "job_id" (Jdec.null ()) ())
         |> Jpipe.required "language" Jdec.string
         |> Jpipe.required "location" location
         |> Jpipe.required "num_positions" Jdec.string
         |> Jpipe.required "position" Jdec.string
         |> Jpipe.required "practice_area" Jdec.string
         |> Jpipe.required "qualifications" Jdec.string
-        |> Jpipe.optional "relocation_expenses" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "relocation_expenses" (Jdec.null ()) ())
         |> Jpipe.required "salary" Jdec.string
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "travel" Jdec.string
@@ -231,7 +237,7 @@ location =
         |> Jpipe.required "phone_number" Jdec.string
         |> Jpipe.required "phone_number_extension" Jdec.string
         |> Jpipe.required "postal_code" Jdec.string
-        |> Jpipe.optional "sub_premise" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "sub_premise" (Jdec.null ()) ())
         |> Jpipe.required "thoroughfare" Jdec.string
 
 encodeLocation : Location -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/df957.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/df957.json/default/QuickType.elm
index fcc0666..a901cc1 100644
--- a/base/elm/test/inputs/json/misc/df957.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/df957.json/default/QuickType.elm
@@ -138,6 +138,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/e0ac7.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e0ac7.json/default/QuickType.elm
index 61766b5..0b5d04b 100644
--- a/base/elm/test/inputs/json/misc/e0ac7.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e0ac7.json/default/QuickType.elm
@@ -148,6 +148,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -186,7 +192,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" Jdec.string
 
 encodeDatum : Datum -> Jenc.Value
@@ -243,7 +249,7 @@ images =
         |> Jpipe.required "fixed_width_small" fixedHeight
         |> Jpipe.required "fixed_width_small_still" downsized
         |> Jpipe.required "fixed_width_still" downsized
-        |> Jpipe.optional "hd" (Jdec.nullable downsizedSmall) Nothing
+        |> Jpipe.custom (optionalField "hd" (Jdec.nullable downsizedSmall) Nothing)
         |> Jpipe.required "looping" looping
         |> Jpipe.required "original" fixedHeight
         |> Jpipe.required "original_mp4" downsizedSmall
@@ -284,7 +290,7 @@ downsized : Jdec.Decoder Downsized
 downsized =
     Jdec.succeed Downsized
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -317,11 +323,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/e2915.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e2915.json/default/QuickType.elm
index c11c874..682f11d 100644
--- a/base/elm/test/inputs/json/misc/e2915.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e2915.json/default/QuickType.elm
@@ -142,6 +142,12 @@ type alias Wind =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/e2a58.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e2a58.json/default/QuickType.elm
index 773231c..b9d8da6 100644
--- a/base/elm/test/inputs/json/misc/e2a58.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e2a58.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/e324e.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e324e.json/default/QuickType.elm
index d991d7c..6b2fc61 100644
--- a/base/elm/test/inputs/json/misc/e324e.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e324e.json/default/QuickType.elm
@@ -112,6 +112,12 @@ type alias Items =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/e53b5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e53b5.json/default/QuickType.elm
index 21793ec..4740df6 100644
--- a/base/elm/test/inputs/json/misc/e53b5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e53b5.json/default/QuickType.elm
@@ -63,6 +63,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/misc/e64a0.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e64a0.json/default/QuickType.elm
index 77a2df9..ccac80c 100644
--- a/base/elm/test/inputs/json/misc/e64a0.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e64a0.json/default/QuickType.elm
@@ -43,6 +43,12 @@ type alias Headers =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/e8a0b.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e8a0b.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/e8a0b.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e8a0b.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/e8b04.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/e8b04.json/default/QuickType.elm
index 9fd0bd6..26de586 100644
--- a/base/elm/test/inputs/json/misc/e8b04.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/e8b04.json/default/QuickType.elm
@@ -343,6 +343,12 @@ type ViewType
     = Tabular
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -354,21 +360,21 @@ quickTypeElement : Jdec.Decoder QuickTypeElement
 quickTypeElement =
     Jdec.succeed QuickTypeElement
         |> Jpipe.required "averageRating" Jdec.int
-        |> Jpipe.optional "category" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "category" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "createdAt" Jdec.int
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "displayType" (Jdec.nullable displayType) Nothing
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "displayType" (Jdec.nullable displayType) Nothing)
         |> Jpipe.required "downloadCount" Jdec.int
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list quickTypeFlag)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list quickTypeFlag)) Nothing)
         |> Jpipe.required "grants" (Jdec.list grant)
         |> Jpipe.required "hideFromCatalog" Jdec.bool
         |> Jpipe.required "hideFromDataJson" Jdec.bool
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "indexUpdatedAt" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "indexUpdatedAt" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "locale" Jdec.string
         |> Jpipe.required "metadata" quickTypeMetadata
-        |> Jpipe.optional "moderationStatus" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "modifyingViewUid" (Jdec.nullable modifyingViewUid) Nothing
+        |> Jpipe.custom (optionalField "moderationStatus" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "modifyingViewUid" (Jdec.nullable modifyingViewUid) Nothing)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "newBackend" Jdec.bool
         |> Jpipe.required "numberOfComments" Jdec.int
@@ -376,19 +382,19 @@ quickTypeElement =
         |> Jpipe.required "owner" owner
         |> Jpipe.required "provenance" provenance
         |> Jpipe.required "publicationAppendEnabled" Jdec.bool
-        |> Jpipe.optional "publicationDate" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "publicationDate" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "publicationGroup" Jdec.int
         |> Jpipe.required "publicationStage" publicationStage
-        |> Jpipe.optional "ratings" (Jdec.nullable ratings) Nothing
-        |> Jpipe.optional "resourceName" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "ratings" (Jdec.nullable ratings) Nothing)
+        |> Jpipe.custom (optionalField "resourceName" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "rights" (Jdec.list right)
-        |> Jpipe.optional "rowClass" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "rowIdentifierColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rowsUpdatedAt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rowsUpdatedBy" (Jdec.nullable rowsUpdatedBy) Nothing
+        |> Jpipe.custom (optionalField "rowClass" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "rowIdentifierColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rowsUpdatedAt" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rowsUpdatedBy" (Jdec.nullable rowsUpdatedBy) Nothing)
         |> Jpipe.required "tableAuthor" tableAuthor
         |> Jpipe.required "tableId" Jdec.int
-        |> Jpipe.optional "tags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "tags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "totalTimesRated" Jdec.int
         |> Jpipe.required "viewCount" Jdec.int
         |> Jpipe.required "viewLastModified" Jdec.int
@@ -519,16 +525,16 @@ encodeGrantType x = case x of
 quickTypeMetadata : Jdec.Decoder QuickTypeMetadata
 quickTypeMetadata =
     Jdec.succeed QuickTypeMetadata
-        |> Jpipe.optional "availableDisplayTypes" (Jdec.nullable (Jdec.list displayType)) Nothing
-        |> Jpipe.optional "custom_fields" (Jdec.nullable customFields) Nothing
-        |> Jpipe.optional "jsonQuery" (Jdec.nullable jsonQuery) Nothing
-        |> Jpipe.optional "rdfClass" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "rdfSubject" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "renderTypeConfig" (Jdec.nullable metadataRenderTypeConfig) Nothing
-        |> Jpipe.optional "richRendererConfigs" (Jdec.nullable richRendererConfigs) Nothing
-        |> Jpipe.optional "rowIdentifier" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "rowLabel" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "v1_archived_properties" (Jdec.nullable v1ArchivedProperties) Nothing
+        |> Jpipe.custom (optionalField "availableDisplayTypes" (Jdec.nullable (Jdec.list displayType)) Nothing)
+        |> Jpipe.custom (optionalField "custom_fields" (Jdec.nullable customFields) Nothing)
+        |> Jpipe.custom (optionalField "jsonQuery" (Jdec.nullable jsonQuery) Nothing)
+        |> Jpipe.custom (optionalField "rdfClass" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "rdfSubject" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "renderTypeConfig" (Jdec.nullable metadataRenderTypeConfig) Nothing)
+        |> Jpipe.custom (optionalField "richRendererConfigs" (Jdec.nullable richRendererConfigs) Nothing)
+        |> Jpipe.custom (optionalField "rowIdentifier" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "rowLabel" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "v1_archived_properties" (Jdec.nullable v1ArchivedProperties) Nothing)
 
 encodeQuickTypeMetadata : QuickTypeMetadata -> Jenc.Value
 encodeQuickTypeMetadata x =
@@ -570,10 +576,10 @@ encodeTest x =
 jsonQuery : Jdec.Decoder JSONQuery
 jsonQuery =
     Jdec.succeed JSONQuery
-        |> Jpipe.optional "group" (Jdec.nullable (Jdec.list group)) Nothing
-        |> Jpipe.optional "where" (Jdec.nullable purpleWhere) Nothing
-        |> Jpipe.optional "order" (Jdec.nullable (Jdec.list order)) Nothing
-        |> Jpipe.optional "select" (Jdec.nullable (Jdec.list select)) Nothing
+        |> Jpipe.custom (optionalField "group" (Jdec.nullable (Jdec.list group)) Nothing)
+        |> Jpipe.custom (optionalField "where" (Jdec.nullable purpleWhere) Nothing)
+        |> Jpipe.custom (optionalField "order" (Jdec.nullable (Jdec.list order)) Nothing)
+        |> Jpipe.custom (optionalField "select" (Jdec.nullable (Jdec.list select)) Nothing)
 
 encodeJSONQuery : JSONQuery -> Jenc.Value
 encodeJSONQuery x =
@@ -598,11 +604,11 @@ encodeGroup x =
 purpleWhere : Jdec.Decoder Where
 purpleWhere =
     Jdec.succeed Where
-        |> Jpipe.optional "children" (Jdec.nullable (Jdec.list child)) Nothing
-        |> Jpipe.optional "columnFieldName" (Jdec.nullable childColumnFieldName) Nothing
-        |> Jpipe.optional "metadata" (Jdec.nullable childMetadata) Nothing
+        |> Jpipe.custom (optionalField "children" (Jdec.nullable (Jdec.list child)) Nothing)
+        |> Jpipe.custom (optionalField "columnFieldName" (Jdec.nullable childColumnFieldName) Nothing)
+        |> Jpipe.custom (optionalField "metadata" (Jdec.nullable childMetadata) Nothing)
         |> Jpipe.required "operator" whereOperator
-        |> Jpipe.optional "value" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "value" (Jdec.nullable Jdec.string) Nothing)
 
 encodeWhere : Where -> Jenc.Value
 encodeWhere x =
@@ -618,9 +624,9 @@ child : Jdec.Decoder Child
 child =
     Jdec.succeed Child
         |> Jpipe.required "columnFieldName" childColumnFieldName
-        |> Jpipe.optional "metadata" (Jdec.nullable childMetadata) Nothing
+        |> Jpipe.custom (optionalField "metadata" (Jdec.nullable childMetadata) Nothing)
         |> Jpipe.required "operator" childOperator
-        |> Jpipe.optional "value" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "value" (Jdec.nullable Jdec.string) Nothing)
 
 encodeChild : Child -> Jenc.Value
 encodeChild x =
@@ -653,12 +659,12 @@ encodeChildColumnFieldName x = case x of
 childMetadata : Jdec.Decoder ChildMetadata
 childMetadata =
     Jdec.succeed ChildMetadata
-        |> Jpipe.optional "customValues" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "freeform" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "includeAuto" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "operator" (Jdec.nullable metadataOperator) Nothing
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable tableColumnID) Nothing
-        |> Jpipe.optional "unifiedVersion" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "customValues" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "freeform" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "includeAuto" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "operator" (Jdec.nullable metadataOperator) Nothing)
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable tableColumnID) Nothing)
+        |> Jpipe.custom (optionalField "unifiedVersion" (Jdec.nullable Jdec.int) Nothing)
 
 encodeChildMetadata : ChildMetadata -> Jenc.Value
 encodeChildMetadata x =
@@ -760,7 +766,7 @@ encodeOrderColumnFieldName x = case x of
 select : Jdec.Decoder Select
 select =
     Jdec.succeed Select
-        |> Jpipe.optional "aggregate" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "aggregate" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "columnFieldName" Jdec.string
 
 encodeSelect : Select -> Jenc.Value
@@ -784,8 +790,8 @@ encodeMetadataRenderTypeConfig x =
 purpleVisible : Jdec.Decoder PurpleVisible
 purpleVisible =
     Jdec.succeed PurpleVisible
-        |> Jpipe.optional "fatrow" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "table" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.custom (optionalField "fatrow" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "table" (Jdec.nullable Jdec.bool) Nothing)
 
 encodePurpleVisible : PurpleVisible -> Jenc.Value
 encodePurpleVisible x =
@@ -963,14 +969,14 @@ owner : Jdec.Decoder Owner
 owner =
     Jdec.succeed Owner
         |> Jpipe.required "displayName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "lastNotificationSeenAt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "profileImageUrlLarge" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "profileImageUrlMedium" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "profileImageUrlSmall" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "roleName" (Jdec.nullable roleName) Nothing
+        |> Jpipe.custom (optionalField "lastNotificationSeenAt" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "profileImageUrlLarge" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "profileImageUrlMedium" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "profileImageUrlSmall" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "roleName" (Jdec.nullable roleName) Nothing)
         |> Jpipe.required "screenName" Jdec.string
 
 encodeOwner : Owner -> Jenc.Value
@@ -1077,8 +1083,8 @@ tableAuthor =
     Jdec.succeed TableAuthor
         |> Jpipe.required "displayName" Jdec.string
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "roleName" (Jdec.nullable roleName) Nothing
+        |> Jpipe.custom (optionalField "rights" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "roleName" (Jdec.nullable roleName) Nothing)
         |> Jpipe.required "screenName" Jdec.string
 
 encodeTableAuthor : TableAuthor -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/ed095.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/ed095.json/default/QuickType.elm
index f32bd69..7c5f919 100644
--- a/base/elm/test/inputs/json/misc/ed095.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/ed095.json/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = Dict String String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.dict Jdec.string
diff --git a/base/elm/test/inputs/json/misc/f22f5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f22f5.json/default/QuickType.elm
index a6ee594..887211c 100644
--- a/base/elm/test/inputs/json/misc/f22f5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f22f5.json/default/QuickType.elm
@@ -131,6 +131,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -152,7 +158,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -181,14 +187,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.null ()) ()
-        |> Jpipe.optional "author_flair_text" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -196,7 +202,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.float
         |> Jpipe.required "created_utc" Jdec.float
-        |> Jpipe.optional "distinguished" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.null ()) ())
         |> Jpipe.required "domain" Jdec.string
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -206,40 +212,40 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "media" (Jdec.null ()) ())
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "permalink" Jdec.string
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ())
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ())
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
         |> Jpipe.required "title" Jdec.string
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
 
 encodeChildData : ChildData -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/f3139.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f3139.json/default/QuickType.elm
index 6dde07b..78172e4 100644
--- a/base/elm/test/inputs/json/misc/f3139.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f3139.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/f3edf.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f3edf.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/f3edf.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f3edf.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/f466a.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f466a.json/default/QuickType.elm
index 4c85c52..6e99496 100644
--- a/base/elm/test/inputs/json/misc/f466a.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f466a.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type Country
     = UnitedStates
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/misc/f6a65.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f6a65.json/default/QuickType.elm
index ad4b6dd..0917995 100644
--- a/base/elm/test/inputs/json/misc/f6a65.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f6a65.json/default/QuickType.elm
@@ -156,6 +156,12 @@ type alias Pagination =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -194,7 +200,7 @@ datum =
         |> Jpipe.required "source_tld" Jdec.string
         |> Jpipe.required "trending_datetime" Jdec.string
         |> Jpipe.required "url" Jdec.string
-        |> Jpipe.optional "user" (Jdec.nullable user) Nothing
+        |> Jpipe.custom (optionalField "user" (Jdec.nullable user) Nothing)
         |> Jpipe.required "username" username
 
 encodeDatum : Datum -> Jenc.Value
@@ -258,7 +264,7 @@ images =
         |> Jpipe.required "preview" downsizedSmall
         |> Jpipe.required "preview_gif" the480WStill
         |> Jpipe.required "preview_webp" the480WStill
-        |> Jpipe.optional "480w_still" (Jdec.nullable the480WStill) Nothing
+        |> Jpipe.custom (optionalField "480w_still" (Jdec.nullable the480WStill) Nothing)
 
 encodeImages : Images -> Jenc.Value
 encodeImages x =
@@ -292,7 +298,7 @@ the480WStill : Jdec.Decoder The480_WStill
 the480WStill =
     Jdec.succeed The480_WStill
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "width" Jdec.string
 
@@ -325,11 +331,11 @@ encodeDownsizedSmall x =
 fixedHeight : Jdec.Decoder FixedHeight
 fixedHeight =
     Jdec.succeed FixedHeight
-        |> Jpipe.optional "frames" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "hash" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "frames" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "hash" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "height" Jdec.string
-        |> Jpipe.optional "mp4" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "mp4_size" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "mp4_size" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "size" Jdec.string
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "webp" Jdec.string
diff --git a/base/elm/test/inputs/json/misc/f74d5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f74d5.json/default/QuickType.elm
index 1f0edac..83760aa 100644
--- a/base/elm/test/inputs/json/misc/f74d5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f74d5.json/default/QuickType.elm
@@ -160,6 +160,12 @@ type alias Owner =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -286,17 +292,17 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" typeName
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" query
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" typeName
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -317,12 +323,12 @@ encodeColumn x =
 cachedContents : Jdec.Decoder CachedContents
 cachedContents =
     Jdec.succeed CachedContents
-        |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "largest" Jdec.string
         |> Jpipe.required "non_null" Jdec.int
         |> Jpipe.required "null" Jdec.int
         |> Jpipe.required "smallest" Jdec.string
-        |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "top" (Jdec.list top)
 
 encodeCachedContents : CachedContents -> Jenc.Value
diff --git a/base/elm/test/inputs/json/misc/f82d9.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f82d9.json/default/QuickType.elm
index 50eb71c..ccd2f54 100644
--- a/base/elm/test/inputs/json/misc/f82d9.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f82d9.json/default/QuickType.elm
@@ -126,6 +126,12 @@ type alias Items =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/f974d.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/f974d.json/default/QuickType.elm
index 6eb1888..45c81bc 100644
--- a/base/elm/test/inputs/json/misc/f974d.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/f974d.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/faff5.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/faff5.json/default/QuickType.elm
index 11718c3..6a87fd6 100644
--- a/base/elm/test/inputs/json/misc/faff5.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/faff5.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Response =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/misc/fcca3.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/fcca3.json/default/QuickType.elm
index 561b7f0..8fe7470 100644
--- a/base/elm/test/inputs/json/misc/fcca3.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/fcca3.json/default/QuickType.elm
@@ -272,6 +272,12 @@ type alias Expression =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -400,18 +406,18 @@ encodeView x =
 column : Jdec.Decoder Column
 column =
     Jdec.succeed Column
-        |> Jpipe.optional "cachedContents" (Jdec.nullable cachedContents) Nothing
+        |> Jpipe.custom (optionalField "cachedContents" (Jdec.nullable cachedContents) Nothing)
         |> Jpipe.required "dataTypeName" typeName
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "fieldName" Jdec.string
-        |> Jpipe.optional "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
+        |> Jpipe.custom (optionalField "flags" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
         |> Jpipe.required "format" format
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "position" Jdec.int
         |> Jpipe.required "renderTypeName" typeName
-        |> Jpipe.optional "tableColumnId" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tableColumnId" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.int) Nothing)
 
 encodeColumn : Column -> Jenc.Value
 encodeColumn x =
@@ -433,12 +439,12 @@ encodeColumn x =
 cachedContents : Jdec.Decoder CachedContents
 cachedContents =
     Jdec.succeed CachedContents
-        |> Jpipe.optional "average" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "average" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "largest" Jdec.string
         |> Jpipe.required "non_null" Jdec.int
         |> Jpipe.required "null" Jdec.int
         |> Jpipe.required "smallest" Jdec.string
-        |> Jpipe.optional "sum" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "sum" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "top" (Jdec.list top)
 
 encodeCachedContents : CachedContents -> Jenc.Value
@@ -486,9 +492,9 @@ encodeTypeName x = case x of
 format : Jdec.Decoder Format
 format =
     Jdec.succeed Format
-        |> Jpipe.optional "align" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "noCommas" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "precisionStyle" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "align" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "noCommas" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "precisionStyle" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFormat : Format -> Jenc.Value
 encodeFormat x =
diff --git a/base/elm/test/inputs/json/misc/fd329.json/default/QuickType.elm b/head/elm/test/inputs/json/misc/fd329.json/default/QuickType.elm
index ce460e2..b7adef0 100644
--- a/base/elm/test/inputs/json/misc/fd329.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/misc/fd329.json/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias Description =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/blns-object.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/blns-object.json/default/QuickType.elm
index acd40f8..456066f 100644
--- a/base/elm/test/inputs/json/priority/blns-object.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/blns-object.json/default/QuickType.elm
@@ -625,6 +625,12 @@ type alias C =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/bug2037.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug2037.json/default/QuickType.elm
index 43aba9f..da9a5aa 100644
--- a/base/elm/test/inputs/json/priority/bug2037.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug2037.json/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias Reward =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/bug2521.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug2521.json/default/QuickType.elm
index 770ce21..6473f11 100644
--- a/base/elm/test/inputs/json/priority/bug2521.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug2521.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Option =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -51,7 +57,7 @@ encodeQuickType x =
 option : Jdec.Decoder Option
 option =
     Jdec.succeed Option
-        |> Jpipe.optional "foo" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "name" Jdec.string
 
 encodeOption : Option -> Jenc.Value
diff --git a/base/elm/test/inputs/json/priority/bug2590.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug2590.json/default/QuickType.elm
index 2496a11..bce12e7 100644
--- a/base/elm/test/inputs/json/priority/bug2590.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug2590.json/default/QuickType.elm
@@ -34,6 +34,12 @@ type alias Invoice =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -52,8 +58,8 @@ encodeQuickType x =
 invoice : Jdec.Decoder Invoice
 invoice =
     Jdec.succeed Invoice
-        |> Jpipe.optional "createdAt" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "dueDate" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "createdAt" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "dueDate" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "name" Jdec.string
 
 encodeInvoice : Invoice -> Jenc.Value
diff --git a/base/elm/test/inputs/json/priority/bug2663.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug2663.json/default/QuickType.elm
index 9c7da3b..e831733 100644
--- a/base/elm/test/inputs/json/priority/bug2663.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug2663.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/bug2793.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug2793.json/default/QuickType.elm
index 96330fc..ae9cc6c 100644
--- a/base/elm/test/inputs/json/priority/bug2793.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug2793.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type alias Labels =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/bug855-short.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug855-short.json/default/QuickType.elm
index bccdcf8..6af0100 100644
--- a/base/elm/test/inputs/json/priority/bug855-short.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug855-short.json/default/QuickType.elm
@@ -34,6 +34,12 @@ type alias QuickTypeValue =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.dict quickTypeValue
diff --git a/base/elm/test/inputs/json/priority/bug863.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/bug863.json/default/QuickType.elm
index a8f4bbd..fbf0d8e 100644
--- a/base/elm/test/inputs/json/priority/bug863.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/bug863.json/default/QuickType.elm
@@ -125,6 +125,12 @@ type alias FluffyQuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeUnion
diff --git a/base/elm/test/inputs/json/priority/coin-pairs.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/coin-pairs.json/default/QuickType.elm
index c887236..a735414 100644
--- a/base/elm/test/inputs/json/priority/coin-pairs.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/coin-pairs.json/default/QuickType.elm
@@ -40,6 +40,12 @@ type alias Pair =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/combinations1.json/array-type-array--eed288b23e27/QuickType.elm b/head/elm/test/inputs/json/priority/combinations1.json/array-type-array--eed288b23e27/QuickType.elm
index ed952c5..577a0aa 100644
--- a/base/elm/test/inputs/json/priority/combinations1.json/array-type-array--eed288b23e27/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations1.json/array-type-array--eed288b23e27/QuickType.elm
@@ -551,6 +551,12 @@ type Jacutinga
     | UnionMapInJacutinga (Dict String (Maybe Int))
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -667,26 +673,26 @@ encodeCerographElement x = case x of
 cerographClass : Jdec.Decoder CerographClass
 cerographClass =
     Jdec.succeed CerographClass
-        |> Jpipe.optional "apotropaion" (Jdec.null ()) ()
-        |> Jpipe.optional "casuary" (Jdec.null ()) ()
-        |> Jpipe.optional "creaker" (Jdec.null ()) ()
-        |> Jpipe.optional "disqualification" (Jdec.null ()) ()
-        |> Jpipe.optional "imperatorious" (Jdec.null ()) ()
-        |> Jpipe.optional "impermeabilize" (Jdec.null ()) ()
-        |> Jpipe.optional "metastoma" (Jdec.null ()) ()
-        |> Jpipe.optional "noctidiurnal" (Jdec.null ()) ()
-        |> Jpipe.optional "nonreserve" (Jdec.null ()) ()
-        |> Jpipe.optional "ophthalmotonometry" (Jdec.null ()) ()
-        |> Jpipe.optional "pailful" (Jdec.null ()) ()
-        |> Jpipe.optional "pigfish" (Jdec.null ()) ()
-        |> Jpipe.optional "pongee" (Jdec.null ()) ()
-        |> Jpipe.optional "prosodical" (Jdec.null ()) ()
-        |> Jpipe.optional "scrofuloderm" (Jdec.null ()) ()
-        |> Jpipe.optional "storekeeping" (Jdec.null ()) ()
-        |> Jpipe.optional "therologist" (Jdec.null ()) ()
-        |> Jpipe.optional "Tolowa" (Jdec.null ()) ()
-        |> Jpipe.optional "tradeful" (Jdec.null ()) ()
-        |> Jpipe.optional "unriveting" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apotropaion" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "casuary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "creaker" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disqualification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "imperatorious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "impermeabilize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metastoma" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "noctidiurnal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonreserve" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ophthalmotonometry" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pailful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pigfish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pongee" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prosodical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scrofuloderm" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "storekeeping" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "therologist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tolowa" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tradeful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unriveting" (Jdec.null ()) ())
 
 encodeCerographClass : CerographClass -> Jenc.Value
 encodeCerographClass x =
@@ -728,31 +734,31 @@ encodeChemotherapeuticElement x = case x of
 chemotherapeuticClass : Jdec.Decoder ChemotherapeuticClass
 chemotherapeuticClass =
     Jdec.succeed ChemotherapeuticClass
-        |> Jpipe.optional "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "availment" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bladelet" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "caulis" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "chalcus" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "imporosity" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "insistently" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ivied" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Maureen" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nostochine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "precoincident" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tetherball" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unshy" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "availment" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bladelet" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "caulis" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "chalcus" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "imporosity" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "insistently" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ivied" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Maureen" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nostochine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "precoincident" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tetherball" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unshy" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeChemotherapeuticClass : ChemotherapeuticClass -> Jenc.Value
 encodeChemotherapeuticClass x =
@@ -805,7 +811,7 @@ cimeliaClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeCimeliaClass : CimeliaClass -> Jenc.Value
 encodeCimeliaClass x =
@@ -844,31 +850,31 @@ encodeCoadjustElement x = case x of
 coadjustClass : Jdec.Decoder CoadjustClass
 coadjustClass =
     Jdec.succeed CoadjustClass
-        |> Jpipe.optional "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Benny" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ensnare" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "leastwise" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lof" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "monkhood" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "peonism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "rosal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "scalenous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "scopine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "suberinize" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "symbiot" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Benny" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ensnare" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "leastwise" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lof" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "monkhood" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "peonism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "rosal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "scalenous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "scopine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "suberinize" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "symbiot" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeCoadjustClass : CoadjustClass -> Jenc.Value
 encodeCoadjustClass x =
@@ -953,26 +959,26 @@ encodeCredulityElement x = case x of
 credulityClass : Jdec.Decoder CredulityClass
 credulityClass =
     Jdec.succeed CredulityClass
-        |> Jpipe.optional "ammonolytic" (Jdec.null ()) ()
-        |> Jpipe.optional "bushmaster" (Jdec.null ()) ()
-        |> Jpipe.optional "considering" (Jdec.null ()) ()
-        |> Jpipe.optional "consuetudinary" (Jdec.null ()) ()
-        |> Jpipe.optional "embarras" (Jdec.null ()) ()
-        |> Jpipe.optional "fineness" (Jdec.null ()) ()
-        |> Jpipe.optional "flaithship" (Jdec.null ()) ()
-        |> Jpipe.optional "Flavia" (Jdec.null ()) ()
-        |> Jpipe.optional "gruffly" (Jdec.null ()) ()
-        |> Jpipe.optional "Hedychium" (Jdec.null ()) ()
-        |> Jpipe.optional "leadwort" (Jdec.null ()) ()
-        |> Jpipe.optional "overseriously" (Jdec.null ()) ()
-        |> Jpipe.optional "parabola" (Jdec.null ()) ()
-        |> Jpipe.optional "pectinatodenticulate" (Jdec.null ()) ()
-        |> Jpipe.optional "Popean" (Jdec.null ()) ()
-        |> Jpipe.optional "pornocrat" (Jdec.null ()) ()
-        |> Jpipe.optional "quadrisect" (Jdec.null ()) ()
-        |> Jpipe.optional "seriality" (Jdec.null ()) ()
-        |> Jpipe.optional "vamphorn" (Jdec.null ()) ()
-        |> Jpipe.optional "wharp" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "ammonolytic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bushmaster" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "considering" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "consuetudinary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "embarras" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fineness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flaithship" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Flavia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gruffly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hedychium" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "leadwort" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overseriously" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "parabola" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pectinatodenticulate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Popean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pornocrat" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "quadrisect" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "seriality" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vamphorn" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "wharp" (Jdec.null ()) ())
 
 encodeCredulityClass : CredulityClass -> Jenc.Value
 encodeCredulityClass x =
@@ -1030,26 +1036,26 @@ encodeDeruralizeElement x = case x of
 deruralizeClass : Jdec.Decoder DeruralizeClass
 deruralizeClass =
     Jdec.succeed DeruralizeClass
-        |> Jpipe.optional "bockerel" (Jdec.null ()) ()
-        |> Jpipe.optional "boulder" (Jdec.null ()) ()
-        |> Jpipe.optional "churrus" (Jdec.null ()) ()
-        |> Jpipe.optional "counterdigged" (Jdec.null ()) ()
-        |> Jpipe.optional "dialogite" (Jdec.null ()) ()
-        |> Jpipe.optional "digenic" (Jdec.null ()) ()
-        |> Jpipe.optional "dunbird" (Jdec.null ()) ()
-        |> Jpipe.optional "ergatogyne" (Jdec.null ()) ()
-        |> Jpipe.optional "fiendful" (Jdec.null ()) ()
-        |> Jpipe.optional "jackrod" (Jdec.null ()) ()
-        |> Jpipe.optional "Jehovistic" (Jdec.null ()) ()
-        |> Jpipe.optional "Paninean" (Jdec.null ()) ()
-        |> Jpipe.optional "panther" (Jdec.null ()) ()
-        |> Jpipe.optional "placentigerous" (Jdec.null ()) ()
-        |> Jpipe.optional "Romney" (Jdec.null ()) ()
-        |> Jpipe.optional "sparm" (Jdec.null ()) ()
-        |> Jpipe.optional "tocsin" (Jdec.null ()) ()
-        |> Jpipe.optional "unnicked" (Jdec.null ()) ()
-        |> Jpipe.optional "unstavable" (Jdec.null ()) ()
-        |> Jpipe.optional "windfirm" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "bockerel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "boulder" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "churrus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "counterdigged" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dialogite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "digenic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dunbird" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ergatogyne" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fiendful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jackrod" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Jehovistic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Paninean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "panther" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "placentigerous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Romney" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sparm" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tocsin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unnicked" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unstavable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "windfirm" (Jdec.null ()) ())
 
 encodeDeruralizeClass : DeruralizeClass -> Jenc.Value
 encodeDeruralizeClass x =
@@ -1093,26 +1099,26 @@ encodeDiaereseElement x = case x of
 diaereseClass : Jdec.Decoder DiaereseClass
 diaereseClass =
     Jdec.succeed DiaereseClass
-        |> Jpipe.optional "Amoreuxia" (Jdec.null ()) ()
-        |> Jpipe.optional "ani" (Jdec.null ()) ()
-        |> Jpipe.optional "bernicle" (Jdec.null ()) ()
-        |> Jpipe.optional "blackwasher" (Jdec.null ()) ()
-        |> Jpipe.optional "blowhard" (Jdec.null ()) ()
-        |> Jpipe.optional "broma" (Jdec.null ()) ()
-        |> Jpipe.optional "closecross" (Jdec.null ()) ()
-        |> Jpipe.optional "congregationalism" (Jdec.null ()) ()
-        |> Jpipe.optional "grayly" (Jdec.null ()) ()
-        |> Jpipe.optional "historically" (Jdec.null ()) ()
-        |> Jpipe.optional "hoast" (Jdec.null ()) ()
-        |> Jpipe.optional "irretentive" (Jdec.null ()) ()
-        |> Jpipe.optional "parcener" (Jdec.null ()) ()
-        |> Jpipe.optional "pedder" (Jdec.null ()) ()
-        |> Jpipe.optional "pseudoanatomic" (Jdec.null ()) ()
-        |> Jpipe.optional "rhizocarpian" (Jdec.null ()) ()
-        |> Jpipe.optional "samel" (Jdec.null ()) ()
-        |> Jpipe.optional "silker" (Jdec.null ()) ()
-        |> Jpipe.optional "subdentated" (Jdec.null ()) ()
-        |> Jpipe.optional "subobscure" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Amoreuxia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ani" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bernicle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "blackwasher" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "blowhard" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "broma" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "closecross" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "congregationalism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grayly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "historically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hoast" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "irretentive" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "parcener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pedder" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pseudoanatomic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rhizocarpian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "samel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "silker" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subdentated" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subobscure" (Jdec.null ()) ())
 
 encodeDiaereseClass : DiaereseClass -> Jenc.Value
 encodeDiaereseClass x =
@@ -1170,26 +1176,26 @@ encodeEleutheromania x = case x of
 encrust : Jdec.Decoder Encrust
 encrust =
     Jdec.succeed Encrust
-        |> Jpipe.optional "comradely" (Jdec.null ()) ()
-        |> Jpipe.optional "diacanthous" (Jdec.null ()) ()
-        |> Jpipe.optional "feminineness" (Jdec.null ()) ()
-        |> Jpipe.optional "gossamered" (Jdec.null ()) ()
-        |> Jpipe.optional "Hibernia" (Jdec.null ()) ()
-        |> Jpipe.optional "Hibiscus" (Jdec.null ()) ()
-        |> Jpipe.optional "Lepidosauria" (Jdec.null ()) ()
-        |> Jpipe.optional "lollingly" (Jdec.null ()) ()
-        |> Jpipe.optional "manager" (Jdec.null ()) ()
-        |> Jpipe.optional "mechanic" (Jdec.null ()) ()
-        |> Jpipe.optional "overminuteness" (Jdec.null ()) ()
-        |> Jpipe.optional "papelonne" (Jdec.null ()) ()
-        |> Jpipe.optional "plebification" (Jdec.null ()) ()
-        |> Jpipe.optional "pugmiller" (Jdec.null ()) ()
-        |> Jpipe.optional "recoveror" (Jdec.null ()) ()
-        |> Jpipe.optional "spermatoblastic" (Jdec.null ()) ()
-        |> Jpipe.optional "Syllidae" (Jdec.null ()) ()
-        |> Jpipe.optional "ungyved" (Jdec.null ()) ()
-        |> Jpipe.optional "whirlabout" (Jdec.null ()) ()
-        |> Jpipe.optional "woodenware" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "comradely" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "diacanthous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "feminineness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gossamered" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hibernia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hibiscus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lepidosauria" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lollingly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "manager" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mechanic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overminuteness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "papelonne" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "plebification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pugmiller" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "recoveror" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "spermatoblastic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Syllidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ungyved" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "whirlabout" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "woodenware" (Jdec.null ()) ())
 
 encodeEncrust : Encrust -> Jenc.Value
 encodeEncrust x =
@@ -1269,26 +1275,26 @@ encodeFagginglyElement x = case x of
 fagginglyClass : Jdec.Decoder FagginglyClass
 fagginglyClass =
     Jdec.succeed FagginglyClass
-        |> Jpipe.optional "abranchian" (Jdec.null ()) ()
-        |> Jpipe.optional "aculeiform" (Jdec.null ()) ()
-        |> Jpipe.optional "adiaphoristic" (Jdec.null ()) ()
-        |> Jpipe.optional "adoptionism" (Jdec.null ()) ()
-        |> Jpipe.optional "Anglic" (Jdec.null ()) ()
-        |> Jpipe.optional "antrotomy" (Jdec.null ()) ()
-        |> Jpipe.optional "coerciveness" (Jdec.null ()) ()
-        |> Jpipe.optional "decorist" (Jdec.null ()) ()
-        |> Jpipe.optional "duckhood" (Jdec.null ()) ()
-        |> Jpipe.optional "Heteromeri" (Jdec.null ()) ()
-        |> Jpipe.optional "hypochnose" (Jdec.null ()) ()
-        |> Jpipe.optional "lochage" (Jdec.null ()) ()
-        |> Jpipe.optional "melee" (Jdec.null ()) ()
-        |> Jpipe.optional "nonconformitant" (Jdec.null ()) ()
-        |> Jpipe.optional "Poinsettia" (Jdec.null ()) ()
-        |> Jpipe.optional "putatively" (Jdec.null ()) ()
-        |> Jpipe.optional "semivolatile" (Jdec.null ()) ()
-        |> Jpipe.optional "soleas" (Jdec.null ()) ()
-        |> Jpipe.optional "unfastenable" (Jdec.null ()) ()
-        |> Jpipe.optional "unmillinered" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "abranchian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aculeiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "adiaphoristic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "adoptionism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Anglic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antrotomy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coerciveness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "decorist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "duckhood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Heteromeri" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypochnose" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lochage" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "melee" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonconformitant" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Poinsettia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "putatively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "semivolatile" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "soleas" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unfastenable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmillinered" (Jdec.null ()) ())
 
 encodeFagginglyClass : FagginglyClass -> Jenc.Value
 encodeFagginglyClass x =
@@ -1330,26 +1336,26 @@ encodeFenkElement x = case x of
 fenkClass : Jdec.Decoder FenkClass
 fenkClass =
     Jdec.succeed FenkClass
-        |> Jpipe.optional "apoise" (Jdec.null ()) ()
-        |> Jpipe.optional "astronomize" (Jdec.null ()) ()
-        |> Jpipe.optional "cockhorse" (Jdec.null ()) ()
-        |> Jpipe.optional "copular" (Jdec.null ()) ()
-        |> Jpipe.optional "Dagomba" (Jdec.null ()) ()
-        |> Jpipe.optional "draffy" (Jdec.null ()) ()
-        |> Jpipe.optional "foreigner" (Jdec.null ()) ()
-        |> Jpipe.optional "Guyandot" (Jdec.null ()) ()
-        |> Jpipe.optional "neurogliosis" (Jdec.null ()) ()
-        |> Jpipe.optional "osmious" (Jdec.null ()) ()
-        |> Jpipe.optional "palpitate" (Jdec.null ()) ()
-        |> Jpipe.optional "rebukeable" (Jdec.null ()) ()
-        |> Jpipe.optional "Reinwardtia" (Jdec.null ()) ()
-        |> Jpipe.optional "reservatory" (Jdec.null ()) ()
-        |> Jpipe.optional "scalt" (Jdec.null ()) ()
-        |> Jpipe.optional "scripturalize" (Jdec.null ()) ()
-        |> Jpipe.optional "tintometer" (Jdec.null ()) ()
-        |> Jpipe.optional "Tritoness" (Jdec.null ()) ()
-        |> Jpipe.optional "undergrade" (Jdec.null ()) ()
-        |> Jpipe.optional "undermountain" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apoise" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "astronomize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cockhorse" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "copular" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Dagomba" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "draffy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "foreigner" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Guyandot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "neurogliosis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "osmious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palpitate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rebukeable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Reinwardtia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reservatory" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scalt" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scripturalize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tintometer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tritoness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undergrade" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undermountain" (Jdec.null ()) ())
 
 encodeFenkClass : FenkClass -> Jenc.Value
 encodeFenkClass x =
@@ -1393,26 +1399,26 @@ encodeFlagmakingElement x = case x of
 flagmakingClass : Jdec.Decoder FlagmakingClass
 flagmakingClass =
     Jdec.succeed FlagmakingClass
-        |> Jpipe.optional "albarco" (Jdec.null ()) ()
-        |> Jpipe.optional "Bunodonta" (Jdec.null ()) ()
-        |> Jpipe.optional "hornify" (Jdec.null ()) ()
-        |> Jpipe.optional "Hydrocorisae" (Jdec.null ()) ()
-        |> Jpipe.optional "hypoglossus" (Jdec.null ()) ()
-        |> Jpipe.optional "inexpiably" (Jdec.null ()) ()
-        |> Jpipe.optional "ingratitude" (Jdec.null ()) ()
-        |> Jpipe.optional "ladyfly" (Jdec.null ()) ()
-        |> Jpipe.optional "medicament" (Jdec.null ()) ()
-        |> Jpipe.optional "monogrammatic" (Jdec.null ()) ()
-        |> Jpipe.optional "nobbut" (Jdec.null ()) ()
-        |> Jpipe.optional "Notacanthidae" (Jdec.null ()) ()
-        |> Jpipe.optional "polyplacophore" (Jdec.null ()) ()
-        |> Jpipe.optional "proexercise" (Jdec.null ()) ()
-        |> Jpipe.optional "protoplast" (Jdec.null ()) ()
-        |> Jpipe.optional "puzzling" (Jdec.null ()) ()
-        |> Jpipe.optional "splanchnoskeleton" (Jdec.null ()) ()
-        |> Jpipe.optional "unloveliness" (Jdec.null ()) ()
-        |> Jpipe.optional "unquarantined" (Jdec.null ()) ()
-        |> Jpipe.optional "unrenounceable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "albarco" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Bunodonta" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hornify" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hydrocorisae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypoglossus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "inexpiably" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ingratitude" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ladyfly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "medicament" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monogrammatic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nobbut" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Notacanthidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "polyplacophore" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "proexercise" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "protoplast" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "puzzling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "splanchnoskeleton" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unloveliness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unquarantined" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unrenounceable" (Jdec.null ()) ())
 
 encodeFlagmakingClass : FlagmakingClass -> Jenc.Value
 encodeFlagmakingClass x =
@@ -1520,31 +1526,31 @@ encodeHemocoeleElement x = case x of
 hemocoeleClass : Jdec.Decoder HemocoeleClass
 hemocoeleClass =
     Jdec.succeed HemocoeleClass
-        |> Jpipe.optional "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "amelification" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "berat" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "erythrite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "graphic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hepatological" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stambouline" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stickpin" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tubulure" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "undelated" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unsalt" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "untutelar" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "vagrant" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Walt" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "amelification" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "berat" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "erythrite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "graphic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hepatological" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stambouline" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stickpin" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tubulure" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "undelated" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unsalt" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "untutelar" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "vagrant" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Walt" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeHemocoeleClass : HemocoeleClass -> Jenc.Value
 encodeHemocoeleClass x =
@@ -1667,7 +1673,7 @@ interacinar =
         |> Jpipe.required "benefactorship" Jdec.bool
         |> Jpipe.required "triseriatim" Jdec.string
         |> Jpipe.required "tubbing" Jdec.int
-        |> Jpipe.optional "untrimmed" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "untrimmed" (Jdec.null ()) ())
 
 encodeInteracinar : Interacinar -> Jenc.Value
 encodeInteracinar x =
diff --git a/base/elm/test/inputs/json/priority/combinations1.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/combinations1.json/default/QuickType.elm
index 6a46588..225f1d6 100644
--- a/base/elm/test/inputs/json/priority/combinations1.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations1.json/default/QuickType.elm
@@ -550,6 +550,12 @@ type Jacutinga
     | UnionMapInJacutinga (Dict String (Maybe Int))
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -666,26 +672,26 @@ encodeCerographElement x = case x of
 cerographClass : Jdec.Decoder CerographClass
 cerographClass =
     Jdec.succeed CerographClass
-        |> Jpipe.optional "apotropaion" (Jdec.null ()) ()
-        |> Jpipe.optional "casuary" (Jdec.null ()) ()
-        |> Jpipe.optional "creaker" (Jdec.null ()) ()
-        |> Jpipe.optional "disqualification" (Jdec.null ()) ()
-        |> Jpipe.optional "imperatorious" (Jdec.null ()) ()
-        |> Jpipe.optional "impermeabilize" (Jdec.null ()) ()
-        |> Jpipe.optional "metastoma" (Jdec.null ()) ()
-        |> Jpipe.optional "noctidiurnal" (Jdec.null ()) ()
-        |> Jpipe.optional "nonreserve" (Jdec.null ()) ()
-        |> Jpipe.optional "ophthalmotonometry" (Jdec.null ()) ()
-        |> Jpipe.optional "pailful" (Jdec.null ()) ()
-        |> Jpipe.optional "pigfish" (Jdec.null ()) ()
-        |> Jpipe.optional "pongee" (Jdec.null ()) ()
-        |> Jpipe.optional "prosodical" (Jdec.null ()) ()
-        |> Jpipe.optional "scrofuloderm" (Jdec.null ()) ()
-        |> Jpipe.optional "storekeeping" (Jdec.null ()) ()
-        |> Jpipe.optional "therologist" (Jdec.null ()) ()
-        |> Jpipe.optional "Tolowa" (Jdec.null ()) ()
-        |> Jpipe.optional "tradeful" (Jdec.null ()) ()
-        |> Jpipe.optional "unriveting" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apotropaion" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "casuary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "creaker" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disqualification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "imperatorious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "impermeabilize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metastoma" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "noctidiurnal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonreserve" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ophthalmotonometry" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pailful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pigfish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pongee" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prosodical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scrofuloderm" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "storekeeping" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "therologist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tolowa" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tradeful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unriveting" (Jdec.null ()) ())
 
 encodeCerographClass : CerographClass -> Jenc.Value
 encodeCerographClass x =
@@ -727,31 +733,31 @@ encodeChemotherapeuticElement x = case x of
 chemotherapeuticClass : Jdec.Decoder ChemotherapeuticClass
 chemotherapeuticClass =
     Jdec.succeed ChemotherapeuticClass
-        |> Jpipe.optional "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "availment" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bladelet" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "caulis" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "chalcus" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "imporosity" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "insistently" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ivied" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Maureen" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nostochine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "precoincident" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tetherball" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unshy" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "angioneurotic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "availment" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bladelet" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "caulis" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "chalcus" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enteradenological" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "imporosity" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "insistently" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "intraparietal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ivied" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Maureen" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nostochine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nutcracker" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ofttimes" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "phenocryst" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "precoincident" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ramiferous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stagmometer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tetherball" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unshy" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeChemotherapeuticClass : ChemotherapeuticClass -> Jenc.Value
 encodeChemotherapeuticClass x =
@@ -804,7 +810,7 @@ cimeliaClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeCimeliaClass : CimeliaClass -> Jenc.Value
 encodeCimeliaClass x =
@@ -843,31 +849,31 @@ encodeCoadjustElement x = case x of
 coadjustClass : Jdec.Decoder CoadjustClass
 coadjustClass =
     Jdec.succeed CoadjustClass
-        |> Jpipe.optional "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Benny" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ensnare" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "leastwise" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lof" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "monkhood" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "peonism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "rosal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "scalenous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "scopine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "suberinize" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "symbiot" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "amidosulphonal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Benny" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ensnare" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "hybridizer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "leastwise" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lof" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "monkhood" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Netherlandish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "peonism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Phonelescope" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "porphyrogeniture" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "preindemnify" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "rosal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "scalenous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "scopine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Sedaceae" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "suberinize" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "symbiot" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tablefellow" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unchargeable" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeCoadjustClass : CoadjustClass -> Jenc.Value
 encodeCoadjustClass x =
@@ -952,26 +958,26 @@ encodeCredulityElement x = case x of
 credulityClass : Jdec.Decoder CredulityClass
 credulityClass =
     Jdec.succeed CredulityClass
-        |> Jpipe.optional "ammonolytic" (Jdec.null ()) ()
-        |> Jpipe.optional "bushmaster" (Jdec.null ()) ()
-        |> Jpipe.optional "considering" (Jdec.null ()) ()
-        |> Jpipe.optional "consuetudinary" (Jdec.null ()) ()
-        |> Jpipe.optional "embarras" (Jdec.null ()) ()
-        |> Jpipe.optional "fineness" (Jdec.null ()) ()
-        |> Jpipe.optional "flaithship" (Jdec.null ()) ()
-        |> Jpipe.optional "Flavia" (Jdec.null ()) ()
-        |> Jpipe.optional "gruffly" (Jdec.null ()) ()
-        |> Jpipe.optional "Hedychium" (Jdec.null ()) ()
-        |> Jpipe.optional "leadwort" (Jdec.null ()) ()
-        |> Jpipe.optional "overseriously" (Jdec.null ()) ()
-        |> Jpipe.optional "parabola" (Jdec.null ()) ()
-        |> Jpipe.optional "pectinatodenticulate" (Jdec.null ()) ()
-        |> Jpipe.optional "Popean" (Jdec.null ()) ()
-        |> Jpipe.optional "pornocrat" (Jdec.null ()) ()
-        |> Jpipe.optional "quadrisect" (Jdec.null ()) ()
-        |> Jpipe.optional "seriality" (Jdec.null ()) ()
-        |> Jpipe.optional "vamphorn" (Jdec.null ()) ()
-        |> Jpipe.optional "wharp" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "ammonolytic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bushmaster" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "considering" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "consuetudinary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "embarras" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fineness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flaithship" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Flavia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gruffly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hedychium" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "leadwort" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overseriously" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "parabola" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pectinatodenticulate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Popean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pornocrat" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "quadrisect" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "seriality" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vamphorn" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "wharp" (Jdec.null ()) ())
 
 encodeCredulityClass : CredulityClass -> Jenc.Value
 encodeCredulityClass x =
@@ -1029,26 +1035,26 @@ encodeDeruralizeElement x = case x of
 deruralizeClass : Jdec.Decoder DeruralizeClass
 deruralizeClass =
     Jdec.succeed DeruralizeClass
-        |> Jpipe.optional "bockerel" (Jdec.null ()) ()
-        |> Jpipe.optional "boulder" (Jdec.null ()) ()
-        |> Jpipe.optional "churrus" (Jdec.null ()) ()
-        |> Jpipe.optional "counterdigged" (Jdec.null ()) ()
-        |> Jpipe.optional "dialogite" (Jdec.null ()) ()
-        |> Jpipe.optional "digenic" (Jdec.null ()) ()
-        |> Jpipe.optional "dunbird" (Jdec.null ()) ()
-        |> Jpipe.optional "ergatogyne" (Jdec.null ()) ()
-        |> Jpipe.optional "fiendful" (Jdec.null ()) ()
-        |> Jpipe.optional "jackrod" (Jdec.null ()) ()
-        |> Jpipe.optional "Jehovistic" (Jdec.null ()) ()
-        |> Jpipe.optional "Paninean" (Jdec.null ()) ()
-        |> Jpipe.optional "panther" (Jdec.null ()) ()
-        |> Jpipe.optional "placentigerous" (Jdec.null ()) ()
-        |> Jpipe.optional "Romney" (Jdec.null ()) ()
-        |> Jpipe.optional "sparm" (Jdec.null ()) ()
-        |> Jpipe.optional "tocsin" (Jdec.null ()) ()
-        |> Jpipe.optional "unnicked" (Jdec.null ()) ()
-        |> Jpipe.optional "unstavable" (Jdec.null ()) ()
-        |> Jpipe.optional "windfirm" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "bockerel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "boulder" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "churrus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "counterdigged" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dialogite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "digenic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dunbird" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ergatogyne" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fiendful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jackrod" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Jehovistic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Paninean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "panther" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "placentigerous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Romney" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sparm" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tocsin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unnicked" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unstavable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "windfirm" (Jdec.null ()) ())
 
 encodeDeruralizeClass : DeruralizeClass -> Jenc.Value
 encodeDeruralizeClass x =
@@ -1092,26 +1098,26 @@ encodeDiaereseElement x = case x of
 diaereseClass : Jdec.Decoder DiaereseClass
 diaereseClass =
     Jdec.succeed DiaereseClass
-        |> Jpipe.optional "Amoreuxia" (Jdec.null ()) ()
-        |> Jpipe.optional "ani" (Jdec.null ()) ()
-        |> Jpipe.optional "bernicle" (Jdec.null ()) ()
-        |> Jpipe.optional "blackwasher" (Jdec.null ()) ()
-        |> Jpipe.optional "blowhard" (Jdec.null ()) ()
-        |> Jpipe.optional "broma" (Jdec.null ()) ()
-        |> Jpipe.optional "closecross" (Jdec.null ()) ()
-        |> Jpipe.optional "congregationalism" (Jdec.null ()) ()
-        |> Jpipe.optional "grayly" (Jdec.null ()) ()
-        |> Jpipe.optional "historically" (Jdec.null ()) ()
-        |> Jpipe.optional "hoast" (Jdec.null ()) ()
-        |> Jpipe.optional "irretentive" (Jdec.null ()) ()
-        |> Jpipe.optional "parcener" (Jdec.null ()) ()
-        |> Jpipe.optional "pedder" (Jdec.null ()) ()
-        |> Jpipe.optional "pseudoanatomic" (Jdec.null ()) ()
-        |> Jpipe.optional "rhizocarpian" (Jdec.null ()) ()
-        |> Jpipe.optional "samel" (Jdec.null ()) ()
-        |> Jpipe.optional "silker" (Jdec.null ()) ()
-        |> Jpipe.optional "subdentated" (Jdec.null ()) ()
-        |> Jpipe.optional "subobscure" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Amoreuxia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ani" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bernicle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "blackwasher" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "blowhard" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "broma" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "closecross" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "congregationalism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grayly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "historically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hoast" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "irretentive" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "parcener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pedder" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pseudoanatomic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rhizocarpian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "samel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "silker" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subdentated" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subobscure" (Jdec.null ()) ())
 
 encodeDiaereseClass : DiaereseClass -> Jenc.Value
 encodeDiaereseClass x =
@@ -1169,26 +1175,26 @@ encodeEleutheromania x = case x of
 encrust : Jdec.Decoder Encrust
 encrust =
     Jdec.succeed Encrust
-        |> Jpipe.optional "comradely" (Jdec.null ()) ()
-        |> Jpipe.optional "diacanthous" (Jdec.null ()) ()
-        |> Jpipe.optional "feminineness" (Jdec.null ()) ()
-        |> Jpipe.optional "gossamered" (Jdec.null ()) ()
-        |> Jpipe.optional "Hibernia" (Jdec.null ()) ()
-        |> Jpipe.optional "Hibiscus" (Jdec.null ()) ()
-        |> Jpipe.optional "Lepidosauria" (Jdec.null ()) ()
-        |> Jpipe.optional "lollingly" (Jdec.null ()) ()
-        |> Jpipe.optional "manager" (Jdec.null ()) ()
-        |> Jpipe.optional "mechanic" (Jdec.null ()) ()
-        |> Jpipe.optional "overminuteness" (Jdec.null ()) ()
-        |> Jpipe.optional "papelonne" (Jdec.null ()) ()
-        |> Jpipe.optional "plebification" (Jdec.null ()) ()
-        |> Jpipe.optional "pugmiller" (Jdec.null ()) ()
-        |> Jpipe.optional "recoveror" (Jdec.null ()) ()
-        |> Jpipe.optional "spermatoblastic" (Jdec.null ()) ()
-        |> Jpipe.optional "Syllidae" (Jdec.null ()) ()
-        |> Jpipe.optional "ungyved" (Jdec.null ()) ()
-        |> Jpipe.optional "whirlabout" (Jdec.null ()) ()
-        |> Jpipe.optional "woodenware" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "comradely" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "diacanthous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "feminineness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gossamered" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hibernia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hibiscus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lepidosauria" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lollingly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "manager" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mechanic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overminuteness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "papelonne" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "plebification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pugmiller" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "recoveror" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "spermatoblastic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Syllidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ungyved" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "whirlabout" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "woodenware" (Jdec.null ()) ())
 
 encodeEncrust : Encrust -> Jenc.Value
 encodeEncrust x =
@@ -1268,26 +1274,26 @@ encodeFagginglyElement x = case x of
 fagginglyClass : Jdec.Decoder FagginglyClass
 fagginglyClass =
     Jdec.succeed FagginglyClass
-        |> Jpipe.optional "abranchian" (Jdec.null ()) ()
-        |> Jpipe.optional "aculeiform" (Jdec.null ()) ()
-        |> Jpipe.optional "adiaphoristic" (Jdec.null ()) ()
-        |> Jpipe.optional "adoptionism" (Jdec.null ()) ()
-        |> Jpipe.optional "Anglic" (Jdec.null ()) ()
-        |> Jpipe.optional "antrotomy" (Jdec.null ()) ()
-        |> Jpipe.optional "coerciveness" (Jdec.null ()) ()
-        |> Jpipe.optional "decorist" (Jdec.null ()) ()
-        |> Jpipe.optional "duckhood" (Jdec.null ()) ()
-        |> Jpipe.optional "Heteromeri" (Jdec.null ()) ()
-        |> Jpipe.optional "hypochnose" (Jdec.null ()) ()
-        |> Jpipe.optional "lochage" (Jdec.null ()) ()
-        |> Jpipe.optional "melee" (Jdec.null ()) ()
-        |> Jpipe.optional "nonconformitant" (Jdec.null ()) ()
-        |> Jpipe.optional "Poinsettia" (Jdec.null ()) ()
-        |> Jpipe.optional "putatively" (Jdec.null ()) ()
-        |> Jpipe.optional "semivolatile" (Jdec.null ()) ()
-        |> Jpipe.optional "soleas" (Jdec.null ()) ()
-        |> Jpipe.optional "unfastenable" (Jdec.null ()) ()
-        |> Jpipe.optional "unmillinered" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "abranchian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aculeiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "adiaphoristic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "adoptionism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Anglic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antrotomy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coerciveness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "decorist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "duckhood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Heteromeri" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypochnose" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lochage" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "melee" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonconformitant" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Poinsettia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "putatively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "semivolatile" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "soleas" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unfastenable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmillinered" (Jdec.null ()) ())
 
 encodeFagginglyClass : FagginglyClass -> Jenc.Value
 encodeFagginglyClass x =
@@ -1329,26 +1335,26 @@ encodeFenkElement x = case x of
 fenkClass : Jdec.Decoder FenkClass
 fenkClass =
     Jdec.succeed FenkClass
-        |> Jpipe.optional "apoise" (Jdec.null ()) ()
-        |> Jpipe.optional "astronomize" (Jdec.null ()) ()
-        |> Jpipe.optional "cockhorse" (Jdec.null ()) ()
-        |> Jpipe.optional "copular" (Jdec.null ()) ()
-        |> Jpipe.optional "Dagomba" (Jdec.null ()) ()
-        |> Jpipe.optional "draffy" (Jdec.null ()) ()
-        |> Jpipe.optional "foreigner" (Jdec.null ()) ()
-        |> Jpipe.optional "Guyandot" (Jdec.null ()) ()
-        |> Jpipe.optional "neurogliosis" (Jdec.null ()) ()
-        |> Jpipe.optional "osmious" (Jdec.null ()) ()
-        |> Jpipe.optional "palpitate" (Jdec.null ()) ()
-        |> Jpipe.optional "rebukeable" (Jdec.null ()) ()
-        |> Jpipe.optional "Reinwardtia" (Jdec.null ()) ()
-        |> Jpipe.optional "reservatory" (Jdec.null ()) ()
-        |> Jpipe.optional "scalt" (Jdec.null ()) ()
-        |> Jpipe.optional "scripturalize" (Jdec.null ()) ()
-        |> Jpipe.optional "tintometer" (Jdec.null ()) ()
-        |> Jpipe.optional "Tritoness" (Jdec.null ()) ()
-        |> Jpipe.optional "undergrade" (Jdec.null ()) ()
-        |> Jpipe.optional "undermountain" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apoise" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "astronomize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cockhorse" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "copular" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Dagomba" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "draffy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "foreigner" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Guyandot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "neurogliosis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "osmious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palpitate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rebukeable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Reinwardtia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reservatory" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scalt" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scripturalize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tintometer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tritoness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undergrade" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undermountain" (Jdec.null ()) ())
 
 encodeFenkClass : FenkClass -> Jenc.Value
 encodeFenkClass x =
@@ -1392,26 +1398,26 @@ encodeFlagmakingElement x = case x of
 flagmakingClass : Jdec.Decoder FlagmakingClass
 flagmakingClass =
     Jdec.succeed FlagmakingClass
-        |> Jpipe.optional "albarco" (Jdec.null ()) ()
-        |> Jpipe.optional "Bunodonta" (Jdec.null ()) ()
-        |> Jpipe.optional "hornify" (Jdec.null ()) ()
-        |> Jpipe.optional "Hydrocorisae" (Jdec.null ()) ()
-        |> Jpipe.optional "hypoglossus" (Jdec.null ()) ()
-        |> Jpipe.optional "inexpiably" (Jdec.null ()) ()
-        |> Jpipe.optional "ingratitude" (Jdec.null ()) ()
-        |> Jpipe.optional "ladyfly" (Jdec.null ()) ()
-        |> Jpipe.optional "medicament" (Jdec.null ()) ()
-        |> Jpipe.optional "monogrammatic" (Jdec.null ()) ()
-        |> Jpipe.optional "nobbut" (Jdec.null ()) ()
-        |> Jpipe.optional "Notacanthidae" (Jdec.null ()) ()
-        |> Jpipe.optional "polyplacophore" (Jdec.null ()) ()
-        |> Jpipe.optional "proexercise" (Jdec.null ()) ()
-        |> Jpipe.optional "protoplast" (Jdec.null ()) ()
-        |> Jpipe.optional "puzzling" (Jdec.null ()) ()
-        |> Jpipe.optional "splanchnoskeleton" (Jdec.null ()) ()
-        |> Jpipe.optional "unloveliness" (Jdec.null ()) ()
-        |> Jpipe.optional "unquarantined" (Jdec.null ()) ()
-        |> Jpipe.optional "unrenounceable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "albarco" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Bunodonta" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hornify" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hydrocorisae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypoglossus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "inexpiably" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ingratitude" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ladyfly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "medicament" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monogrammatic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nobbut" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Notacanthidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "polyplacophore" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "proexercise" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "protoplast" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "puzzling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "splanchnoskeleton" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unloveliness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unquarantined" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unrenounceable" (Jdec.null ()) ())
 
 encodeFlagmakingClass : FlagmakingClass -> Jenc.Value
 encodeFlagmakingClass x =
@@ -1519,31 +1525,31 @@ encodeHemocoeleElement x = case x of
 hemocoeleClass : Jdec.Decoder HemocoeleClass
 hemocoeleClass =
     Jdec.succeed HemocoeleClass
-        |> Jpipe.optional "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "amelification" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "berat" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "erythrite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "graphic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hepatological" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stambouline" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "stickpin" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tubulure" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "undelated" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unsalt" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "untutelar" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "vagrant" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Walt" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "acrogamy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "amelification" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "autobiographic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "berat" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "disproportionably" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "erythrite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "graphic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hepatological" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "incommensurably" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "misaffirm" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "pocketbook" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sclerometric" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stambouline" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "stickpin" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tubulure" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "undelated" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unsalt" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "untutelar" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "vagrant" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Walt" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeHemocoeleClass : HemocoeleClass -> Jenc.Value
 encodeHemocoeleClass x =
@@ -1666,7 +1672,7 @@ interacinar =
         |> Jpipe.required "benefactorship" Jdec.bool
         |> Jpipe.required "triseriatim" Jdec.string
         |> Jpipe.required "tubbing" Jdec.int
-        |> Jpipe.optional "untrimmed" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "untrimmed" (Jdec.null ()) ())
 
 encodeInteracinar : Interacinar -> Jenc.Value
 encodeInteracinar x =
diff --git a/base/elm/test/inputs/json/priority/combinations2.json/array-type-array--eed288b23e27/QuickType.elm b/head/elm/test/inputs/json/priority/combinations2.json/array-type-array--eed288b23e27/QuickType.elm
index 10a1622..16d5110 100644
--- a/base/elm/test/inputs/json/priority/combinations2.json/array-type-array--eed288b23e27/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations2.json/array-type-array--eed288b23e27/QuickType.elm
@@ -506,6 +506,12 @@ type Shakespearolater
     | StringInShakespearolater String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -525,7 +531,7 @@ quickType =
         |> Jpipe.required "Andriana" (Jdec.array (Jdec.nullable Jdec.string))
         |> Jpipe.required "ankee" (Jdec.array ankeeElement)
         |> Jpipe.required "annihilator" (Jdec.array (Jdec.nullable (Jdec.dict (Jdec.nullable Jdec.int))))
-        |> Jpipe.optional "annulose" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "annulose" (Jdec.null ()) ())
         |> Jpipe.required "Ansarie" (Jdec.array ansarieElement)
         |> Jpipe.required "aphasia" (Jdec.array aphasia)
         |> Jpipe.required "asprawl" (Jdec.array asprawl)
@@ -688,26 +694,26 @@ encodeAlleviateElement x = case x of
 alleviateClass : Jdec.Decoder AlleviateClass
 alleviateClass =
     Jdec.succeed AlleviateClass
-        |> Jpipe.optional "apriori" (Jdec.null ()) ()
-        |> Jpipe.optional "beggarer" (Jdec.null ()) ()
-        |> Jpipe.optional "brokenheartedly" (Jdec.null ()) ()
-        |> Jpipe.optional "debilitation" (Jdec.null ()) ()
-        |> Jpipe.optional "frike" (Jdec.null ()) ()
-        |> Jpipe.optional "gastrolith" (Jdec.null ()) ()
-        |> Jpipe.optional "Hulsean" (Jdec.null ()) ()
-        |> Jpipe.optional "orthocentric" (Jdec.null ()) ()
-        |> Jpipe.optional "petaly" (Jdec.null ()) ()
-        |> Jpipe.optional "probudgeting" (Jdec.null ()) ()
-        |> Jpipe.optional "reacquire" (Jdec.null ()) ()
-        |> Jpipe.optional "scow" (Jdec.null ()) ()
-        |> Jpipe.optional "shutoff" (Jdec.null ()) ()
-        |> Jpipe.optional "subcontiguous" (Jdec.null ()) ()
-        |> Jpipe.optional "suffumigate" (Jdec.null ()) ()
-        |> Jpipe.optional "transformable" (Jdec.null ()) ()
-        |> Jpipe.optional "uncoroneted" (Jdec.null ()) ()
-        |> Jpipe.optional "unparking" (Jdec.null ()) ()
-        |> Jpipe.optional "unvarnishedness" (Jdec.null ()) ()
-        |> Jpipe.optional "wherewithal" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apriori" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beggarer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brokenheartedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "debilitation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "frike" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gastrolith" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hulsean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "orthocentric" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "petaly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "probudgeting" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reacquire" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scow" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shutoff" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subcontiguous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "suffumigate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "transformable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncoroneted" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unparking" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unvarnishedness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "wherewithal" (Jdec.null ()) ())
 
 encodeAlleviateClass : AlleviateClass -> Jenc.Value
 encodeAlleviateClass x =
@@ -755,7 +761,7 @@ rebecca =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeRebecca : Rebecca -> Jenc.Value
 encodeRebecca x =
@@ -782,31 +788,31 @@ encodeAmbassage x = case x of
 amphithyron : Jdec.Decoder Amphithyron
 amphithyron =
     Jdec.succeed Amphithyron
-        |> Jpipe.optional "akroasis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "antiphonical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "basebred" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "conductometric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ensilation" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "eyebolt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fistulated" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "heteropod" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "Juniperus" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "labyrinthically" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "martyrization" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mispolicy" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "multipara" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Nazirite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "possessorial" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shamed" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shelfworn" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "stagnum" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Those" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undecimal" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "akroasis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "antiphonical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "basebred" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "conductometric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ensilation" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "eyebolt" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fistulated" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "heteropod" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "Juniperus" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "labyrinthically" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "martyrization" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mispolicy" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "multipara" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Nazirite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "possessorial" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shamed" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shelfworn" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "stagnum" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Those" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undecimal" (Jdec.nullable Jdec.int) Nothing)
 
 encodeAmphithyron : Amphithyron -> Jenc.Value
 encodeAmphithyron x =
@@ -855,26 +861,26 @@ encodeAnkeeElement x = case x of
 ankeeClass : Jdec.Decoder AnkeeClass
 ankeeClass =
     Jdec.succeed AnkeeClass
-        |> Jpipe.optional "Anomoean" (Jdec.null ()) ()
-        |> Jpipe.optional "barleyhood" (Jdec.null ()) ()
-        |> Jpipe.optional "befriender" (Jdec.null ()) ()
-        |> Jpipe.optional "brutishness" (Jdec.null ()) ()
-        |> Jpipe.optional "cephalalgy" (Jdec.null ()) ()
-        |> Jpipe.optional "cirurgian" (Jdec.null ()) ()
-        |> Jpipe.optional "conventionally" (Jdec.null ()) ()
-        |> Jpipe.optional "jackshay" (Jdec.null ()) ()
-        |> Jpipe.optional "milammeter" (Jdec.null ()) ()
-        |> Jpipe.optional "Naja" (Jdec.null ()) ()
-        |> Jpipe.optional "ombrological" (Jdec.null ()) ()
-        |> Jpipe.optional "phonasthenia" (Jdec.null ()) ()
-        |> Jpipe.optional "retrievableness" (Jdec.null ()) ()
-        |> Jpipe.optional "snakily" (Jdec.null ()) ()
-        |> Jpipe.optional "swot" (Jdec.null ()) ()
-        |> Jpipe.optional "tartlet" (Jdec.null ()) ()
-        |> Jpipe.optional "thiofuran" (Jdec.null ()) ()
-        |> Jpipe.optional "tracheophone" (Jdec.null ()) ()
-        |> Jpipe.optional "tuglike" (Jdec.null ()) ()
-        |> Jpipe.optional "unscratchingly" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Anomoean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "barleyhood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "befriender" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brutishness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cephalalgy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cirurgian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "conventionally" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jackshay" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "milammeter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Naja" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ombrological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phonasthenia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "retrievableness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "snakily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "swot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tartlet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thiofuran" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tracheophone" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tuglike" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unscratchingly" (Jdec.null ()) ())
 
 encodeAnkeeClass : AnkeeClass -> Jenc.Value
 encodeAnkeeClass x =
@@ -918,26 +924,26 @@ encodeAnsarieElement x = case x of
 ansarieClass : Jdec.Decoder AnsarieClass
 ansarieClass =
     Jdec.succeed AnsarieClass
-        |> Jpipe.optional "accension" (Jdec.null ()) ()
-        |> Jpipe.optional "Alida" (Jdec.null ()) ()
-        |> Jpipe.optional "asteria" (Jdec.null ()) ()
-        |> Jpipe.optional "beriberic" (Jdec.null ()) ()
-        |> Jpipe.optional "edgebone" (Jdec.null ()) ()
-        |> Jpipe.optional "gastrodialysis" (Jdec.null ()) ()
-        |> Jpipe.optional "geographic" (Jdec.null ()) ()
-        |> Jpipe.optional "Ictonyx" (Jdec.null ()) ()
-        |> Jpipe.optional "metrocele" (Jdec.null ()) ()
-        |> Jpipe.optional "misgraft" (Jdec.null ()) ()
-        |> Jpipe.optional "monteith" (Jdec.null ()) ()
-        |> Jpipe.optional "notcher" (Jdec.null ()) ()
-        |> Jpipe.optional "prorestriction" (Jdec.null ()) ()
-        |> Jpipe.optional "Ramist" (Jdec.null ()) ()
-        |> Jpipe.optional "throatlet" (Jdec.null ()) ()
-        |> Jpipe.optional "unfair" (Jdec.null ()) ()
-        |> Jpipe.optional "unsynonymous" (Jdec.null ()) ()
-        |> Jpipe.optional "water" (Jdec.null ()) ()
-        |> Jpipe.optional "zestfully" (Jdec.null ()) ()
-        |> Jpipe.optional "zincic" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "accension" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Alida" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "asteria" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beriberic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "edgebone" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gastrodialysis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "geographic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ictonyx" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metrocele" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "misgraft" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monteith" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "notcher" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prorestriction" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ramist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "throatlet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unfair" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsynonymous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "water" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "zestfully" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "zincic" (Jdec.null ()) ())
 
 encodeAnsarieClass : AnsarieClass -> Jenc.Value
 encodeAnsarieClass x =
@@ -1125,26 +1131,26 @@ encodeChytridiaceaeElement x = case x of
 chytridiaceaeClass : Jdec.Decoder ChytridiaceaeClass
 chytridiaceaeClass =
     Jdec.succeed ChytridiaceaeClass
-        |> Jpipe.optional "Batidaceae" (Jdec.null ()) ()
-        |> Jpipe.optional "Brechites" (Jdec.null ()) ()
-        |> Jpipe.optional "codespairer" (Jdec.null ()) ()
-        |> Jpipe.optional "Emery" (Jdec.null ()) ()
-        |> Jpipe.optional "enervative" (Jdec.null ()) ()
-        |> Jpipe.optional "excriminate" (Jdec.null ()) ()
-        |> Jpipe.optional "goshenite" (Jdec.null ()) ()
-        |> Jpipe.optional "grime" (Jdec.null ()) ()
-        |> Jpipe.optional "gritten" (Jdec.null ()) ()
-        |> Jpipe.optional "hectorly" (Jdec.null ()) ()
-        |> Jpipe.optional "intermediation" (Jdec.null ()) ()
-        |> Jpipe.optional "meeterly" (Jdec.null ()) ()
-        |> Jpipe.optional "Narraganset" (Jdec.null ()) ()
-        |> Jpipe.optional "onymatic" (Jdec.null ()) ()
-        |> Jpipe.optional "paddlecock" (Jdec.null ()) ()
-        |> Jpipe.optional "thana" (Jdec.null ()) ()
-        |> Jpipe.optional "thornily" (Jdec.null ()) ()
-        |> Jpipe.optional "uckia" (Jdec.null ()) ()
-        |> Jpipe.optional "unmettle" (Jdec.null ()) ()
-        |> Jpipe.optional "vorticellid" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Batidaceae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Brechites" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "codespairer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Emery" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enervative" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "excriminate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "goshenite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grime" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gritten" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hectorly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "intermediation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "meeterly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Narraganset" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "onymatic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "paddlecock" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thana" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thornily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uckia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmettle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vorticellid" (Jdec.null ()) ())
 
 encodeChytridiaceaeClass : ChytridiaceaeClass -> Jenc.Value
 encodeChytridiaceaeClass x =
@@ -1186,31 +1192,31 @@ encodeDiscordiaElement x = case x of
 discordiaClass : Jdec.Decoder DiscordiaClass
 discordiaClass =
     Jdec.succeed DiscordiaClass
-        |> Jpipe.optional "Altaic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "amoristic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "blennophthalmia" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disciplinability" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "goofer" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "laryngograph" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "leucitis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lymphocyst" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "microcosmology" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nauseation" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Patarin" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preliberal" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "prettifier" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rangework" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "redient" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "subfusiform" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "suicidical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "swow" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "wastrel" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "wingle" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "Altaic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "amoristic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "blennophthalmia" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disciplinability" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "goofer" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "laryngograph" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "leucitis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lymphocyst" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "microcosmology" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nauseation" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Patarin" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preliberal" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "prettifier" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rangework" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "redient" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "subfusiform" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "suicidical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "swow" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "wastrel" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "wingle" (Jdec.nullable Jdec.int) Nothing)
 
 encodeDiscordiaClass : DiscordiaClass -> Jenc.Value
 encodeDiscordiaClass x =
@@ -1297,26 +1303,26 @@ encodeGryphosaurusElement x = case x of
 gryphosaurusClass : Jdec.Decoder GryphosaurusClass
 gryphosaurusClass =
     Jdec.succeed GryphosaurusClass
-        |> Jpipe.optional "amissibility" (Jdec.null ()) ()
-        |> Jpipe.optional "Burushaski" (Jdec.null ()) ()
-        |> Jpipe.optional "citronin" (Jdec.null ()) ()
-        |> Jpipe.optional "coplaintiff" (Jdec.null ()) ()
-        |> Jpipe.optional "disquisitionary" (Jdec.null ()) ()
-        |> Jpipe.optional "enoplan" (Jdec.null ()) ()
-        |> Jpipe.optional "faintness" (Jdec.null ()) ()
-        |> Jpipe.optional "hebetomy" (Jdec.null ()) ()
-        |> Jpipe.optional "islandry" (Jdec.null ()) ()
-        |> Jpipe.optional "lameduck" (Jdec.null ()) ()
-        |> Jpipe.optional "overbattle" (Jdec.null ()) ()
-        |> Jpipe.optional "overinterested" (Jdec.null ()) ()
-        |> Jpipe.optional "phrenologic" (Jdec.null ()) ()
-        |> Jpipe.optional "rainband" (Jdec.null ()) ()
-        |> Jpipe.optional "shiningly" (Jdec.null ()) ()
-        |> Jpipe.optional "stamineous" (Jdec.null ()) ()
-        |> Jpipe.optional "subscapularis" (Jdec.null ()) ()
-        |> Jpipe.optional "Tahami" (Jdec.null ()) ()
-        |> Jpipe.optional "undaubed" (Jdec.null ()) ()
-        |> Jpipe.optional "underntime" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "amissibility" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Burushaski" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "citronin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coplaintiff" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disquisitionary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enoplan" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "faintness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hebetomy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "islandry" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lameduck" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overbattle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overinterested" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phrenologic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rainband" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shiningly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stamineous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subscapularis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tahami" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undaubed" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underntime" (Jdec.null ()) ())
 
 encodeGryphosaurusClass : GryphosaurusClass -> Jenc.Value
 encodeGryphosaurusClass x =
@@ -1370,31 +1376,31 @@ encodeLaviniaElement x = case x of
 laviniaClass : Jdec.Decoder LaviniaClass
 laviniaClass =
     Jdec.succeed LaviniaClass
-        |> Jpipe.optional "agitable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "asininity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "benefiter" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "bronzelike" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "deprivement" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "flippantness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fogproof" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "merrymeeting" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "overcareful" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "panaris" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preacceptance" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "quinoxaline" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sig" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "superconfusion" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Tacana" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tillotter" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tranquillize" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unquestionable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "uproute" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "agitable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "asininity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "benefiter" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "bronzelike" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "deprivement" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "flippantness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fogproof" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "merrymeeting" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "overcareful" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "panaris" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preacceptance" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "quinoxaline" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sig" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "superconfusion" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Tacana" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tillotter" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tranquillize" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unquestionable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "uproute" (Jdec.nullable Jdec.int) Nothing)
 
 encodeLaviniaClass : LaviniaClass -> Jenc.Value
 encodeLaviniaClass x =
@@ -1441,26 +1447,26 @@ encodeOskarElement x = case x of
 oskarClass : Jdec.Decoder OskarClass
 oskarClass =
     Jdec.succeed OskarClass
-        |> Jpipe.optional "Acrobates" (Jdec.null ()) ()
-        |> Jpipe.optional "beanshooter" (Jdec.null ()) ()
-        |> Jpipe.optional "bearhound" (Jdec.null ()) ()
-        |> Jpipe.optional "Cayuga" (Jdec.null ()) ()
-        |> Jpipe.optional "guarneri" (Jdec.null ()) ()
-        |> Jpipe.optional "hypochondriacism" (Jdec.null ()) ()
-        |> Jpipe.optional "indication" (Jdec.null ()) ()
-        |> Jpipe.optional "jaculative" (Jdec.null ()) ()
-        |> Jpipe.optional "nagana" (Jdec.null ()) ()
-        |> Jpipe.optional "Netherlandish" (Jdec.null ()) ()
-        |> Jpipe.optional "noctivagous" (Jdec.null ()) ()
-        |> Jpipe.optional "nonphysiological" (Jdec.null ()) ()
-        |> Jpipe.optional "praxis" (Jdec.null ()) ()
-        |> Jpipe.optional "provision" (Jdec.null ()) ()
-        |> Jpipe.optional "subterhuman" (Jdec.null ()) ()
-        |> Jpipe.optional "sunlit" (Jdec.null ()) ()
-        |> Jpipe.optional "syncraniate" (Jdec.null ()) ()
-        |> Jpipe.optional "teachment" (Jdec.null ()) ()
-        |> Jpipe.optional "unmutinous" (Jdec.null ()) ()
-        |> Jpipe.optional "unstoppable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Acrobates" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beanshooter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bearhound" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Cayuga" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "guarneri" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypochondriacism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "indication" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jaculative" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nagana" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Netherlandish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "noctivagous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonphysiological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "praxis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "provision" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subterhuman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sunlit" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "syncraniate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "teachment" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmutinous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unstoppable" (Jdec.null ()) ())
 
 encodeOskarClass : OskarClass -> Jenc.Value
 encodeOskarClass x =
diff --git a/base/elm/test/inputs/json/priority/combinations2.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/combinations2.json/default/QuickType.elm
index a4581c7..f2d192c 100644
--- a/base/elm/test/inputs/json/priority/combinations2.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations2.json/default/QuickType.elm
@@ -505,6 +505,12 @@ type Shakespearolater
     | StringInShakespearolater String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -524,7 +530,7 @@ quickType =
         |> Jpipe.required "Andriana" (Jdec.list (Jdec.nullable Jdec.string))
         |> Jpipe.required "ankee" (Jdec.list ankeeElement)
         |> Jpipe.required "annihilator" (Jdec.list (Jdec.nullable (Jdec.dict (Jdec.nullable Jdec.int))))
-        |> Jpipe.optional "annulose" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "annulose" (Jdec.null ()) ())
         |> Jpipe.required "Ansarie" (Jdec.list ansarieElement)
         |> Jpipe.required "aphasia" (Jdec.list aphasia)
         |> Jpipe.required "asprawl" (Jdec.list asprawl)
@@ -687,26 +693,26 @@ encodeAlleviateElement x = case x of
 alleviateClass : Jdec.Decoder AlleviateClass
 alleviateClass =
     Jdec.succeed AlleviateClass
-        |> Jpipe.optional "apriori" (Jdec.null ()) ()
-        |> Jpipe.optional "beggarer" (Jdec.null ()) ()
-        |> Jpipe.optional "brokenheartedly" (Jdec.null ()) ()
-        |> Jpipe.optional "debilitation" (Jdec.null ()) ()
-        |> Jpipe.optional "frike" (Jdec.null ()) ()
-        |> Jpipe.optional "gastrolith" (Jdec.null ()) ()
-        |> Jpipe.optional "Hulsean" (Jdec.null ()) ()
-        |> Jpipe.optional "orthocentric" (Jdec.null ()) ()
-        |> Jpipe.optional "petaly" (Jdec.null ()) ()
-        |> Jpipe.optional "probudgeting" (Jdec.null ()) ()
-        |> Jpipe.optional "reacquire" (Jdec.null ()) ()
-        |> Jpipe.optional "scow" (Jdec.null ()) ()
-        |> Jpipe.optional "shutoff" (Jdec.null ()) ()
-        |> Jpipe.optional "subcontiguous" (Jdec.null ()) ()
-        |> Jpipe.optional "suffumigate" (Jdec.null ()) ()
-        |> Jpipe.optional "transformable" (Jdec.null ()) ()
-        |> Jpipe.optional "uncoroneted" (Jdec.null ()) ()
-        |> Jpipe.optional "unparking" (Jdec.null ()) ()
-        |> Jpipe.optional "unvarnishedness" (Jdec.null ()) ()
-        |> Jpipe.optional "wherewithal" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "apriori" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beggarer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brokenheartedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "debilitation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "frike" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gastrolith" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hulsean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "orthocentric" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "petaly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "probudgeting" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reacquire" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scow" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shutoff" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subcontiguous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "suffumigate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "transformable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncoroneted" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unparking" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unvarnishedness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "wherewithal" (Jdec.null ()) ())
 
 encodeAlleviateClass : AlleviateClass -> Jenc.Value
 encodeAlleviateClass x =
@@ -754,7 +760,7 @@ rebecca =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeRebecca : Rebecca -> Jenc.Value
 encodeRebecca x =
@@ -781,31 +787,31 @@ encodeAmbassage x = case x of
 amphithyron : Jdec.Decoder Amphithyron
 amphithyron =
     Jdec.succeed Amphithyron
-        |> Jpipe.optional "akroasis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "antiphonical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "basebred" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "conductometric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ensilation" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "eyebolt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fistulated" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "heteropod" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "Juniperus" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "labyrinthically" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "martyrization" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mispolicy" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "multipara" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Nazirite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "possessorial" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shamed" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shelfworn" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "stagnum" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Those" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undecimal" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "akroasis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "antiphonical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "basebred" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "conductometric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ensilation" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "eyebolt" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fistulated" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "heteropod" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "Juniperus" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "labyrinthically" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "martyrization" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mispolicy" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "multipara" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Nazirite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "possessorial" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shamed" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shelfworn" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "stagnum" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Those" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undecimal" (Jdec.nullable Jdec.int) Nothing)
 
 encodeAmphithyron : Amphithyron -> Jenc.Value
 encodeAmphithyron x =
@@ -854,26 +860,26 @@ encodeAnkeeElement x = case x of
 ankeeClass : Jdec.Decoder AnkeeClass
 ankeeClass =
     Jdec.succeed AnkeeClass
-        |> Jpipe.optional "Anomoean" (Jdec.null ()) ()
-        |> Jpipe.optional "barleyhood" (Jdec.null ()) ()
-        |> Jpipe.optional "befriender" (Jdec.null ()) ()
-        |> Jpipe.optional "brutishness" (Jdec.null ()) ()
-        |> Jpipe.optional "cephalalgy" (Jdec.null ()) ()
-        |> Jpipe.optional "cirurgian" (Jdec.null ()) ()
-        |> Jpipe.optional "conventionally" (Jdec.null ()) ()
-        |> Jpipe.optional "jackshay" (Jdec.null ()) ()
-        |> Jpipe.optional "milammeter" (Jdec.null ()) ()
-        |> Jpipe.optional "Naja" (Jdec.null ()) ()
-        |> Jpipe.optional "ombrological" (Jdec.null ()) ()
-        |> Jpipe.optional "phonasthenia" (Jdec.null ()) ()
-        |> Jpipe.optional "retrievableness" (Jdec.null ()) ()
-        |> Jpipe.optional "snakily" (Jdec.null ()) ()
-        |> Jpipe.optional "swot" (Jdec.null ()) ()
-        |> Jpipe.optional "tartlet" (Jdec.null ()) ()
-        |> Jpipe.optional "thiofuran" (Jdec.null ()) ()
-        |> Jpipe.optional "tracheophone" (Jdec.null ()) ()
-        |> Jpipe.optional "tuglike" (Jdec.null ()) ()
-        |> Jpipe.optional "unscratchingly" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Anomoean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "barleyhood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "befriender" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brutishness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cephalalgy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cirurgian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "conventionally" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jackshay" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "milammeter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Naja" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ombrological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phonasthenia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "retrievableness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "snakily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "swot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tartlet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thiofuran" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tracheophone" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tuglike" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unscratchingly" (Jdec.null ()) ())
 
 encodeAnkeeClass : AnkeeClass -> Jenc.Value
 encodeAnkeeClass x =
@@ -917,26 +923,26 @@ encodeAnsarieElement x = case x of
 ansarieClass : Jdec.Decoder AnsarieClass
 ansarieClass =
     Jdec.succeed AnsarieClass
-        |> Jpipe.optional "accension" (Jdec.null ()) ()
-        |> Jpipe.optional "Alida" (Jdec.null ()) ()
-        |> Jpipe.optional "asteria" (Jdec.null ()) ()
-        |> Jpipe.optional "beriberic" (Jdec.null ()) ()
-        |> Jpipe.optional "edgebone" (Jdec.null ()) ()
-        |> Jpipe.optional "gastrodialysis" (Jdec.null ()) ()
-        |> Jpipe.optional "geographic" (Jdec.null ()) ()
-        |> Jpipe.optional "Ictonyx" (Jdec.null ()) ()
-        |> Jpipe.optional "metrocele" (Jdec.null ()) ()
-        |> Jpipe.optional "misgraft" (Jdec.null ()) ()
-        |> Jpipe.optional "monteith" (Jdec.null ()) ()
-        |> Jpipe.optional "notcher" (Jdec.null ()) ()
-        |> Jpipe.optional "prorestriction" (Jdec.null ()) ()
-        |> Jpipe.optional "Ramist" (Jdec.null ()) ()
-        |> Jpipe.optional "throatlet" (Jdec.null ()) ()
-        |> Jpipe.optional "unfair" (Jdec.null ()) ()
-        |> Jpipe.optional "unsynonymous" (Jdec.null ()) ()
-        |> Jpipe.optional "water" (Jdec.null ()) ()
-        |> Jpipe.optional "zestfully" (Jdec.null ()) ()
-        |> Jpipe.optional "zincic" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "accension" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Alida" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "asteria" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beriberic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "edgebone" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gastrodialysis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "geographic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ictonyx" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metrocele" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "misgraft" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monteith" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "notcher" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prorestriction" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ramist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "throatlet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unfair" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsynonymous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "water" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "zestfully" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "zincic" (Jdec.null ()) ())
 
 encodeAnsarieClass : AnsarieClass -> Jenc.Value
 encodeAnsarieClass x =
@@ -1124,26 +1130,26 @@ encodeChytridiaceaeElement x = case x of
 chytridiaceaeClass : Jdec.Decoder ChytridiaceaeClass
 chytridiaceaeClass =
     Jdec.succeed ChytridiaceaeClass
-        |> Jpipe.optional "Batidaceae" (Jdec.null ()) ()
-        |> Jpipe.optional "Brechites" (Jdec.null ()) ()
-        |> Jpipe.optional "codespairer" (Jdec.null ()) ()
-        |> Jpipe.optional "Emery" (Jdec.null ()) ()
-        |> Jpipe.optional "enervative" (Jdec.null ()) ()
-        |> Jpipe.optional "excriminate" (Jdec.null ()) ()
-        |> Jpipe.optional "goshenite" (Jdec.null ()) ()
-        |> Jpipe.optional "grime" (Jdec.null ()) ()
-        |> Jpipe.optional "gritten" (Jdec.null ()) ()
-        |> Jpipe.optional "hectorly" (Jdec.null ()) ()
-        |> Jpipe.optional "intermediation" (Jdec.null ()) ()
-        |> Jpipe.optional "meeterly" (Jdec.null ()) ()
-        |> Jpipe.optional "Narraganset" (Jdec.null ()) ()
-        |> Jpipe.optional "onymatic" (Jdec.null ()) ()
-        |> Jpipe.optional "paddlecock" (Jdec.null ()) ()
-        |> Jpipe.optional "thana" (Jdec.null ()) ()
-        |> Jpipe.optional "thornily" (Jdec.null ()) ()
-        |> Jpipe.optional "uckia" (Jdec.null ()) ()
-        |> Jpipe.optional "unmettle" (Jdec.null ()) ()
-        |> Jpipe.optional "vorticellid" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Batidaceae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Brechites" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "codespairer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Emery" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enervative" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "excriminate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "goshenite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grime" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gritten" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hectorly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "intermediation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "meeterly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Narraganset" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "onymatic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "paddlecock" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thana" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thornily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uckia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmettle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vorticellid" (Jdec.null ()) ())
 
 encodeChytridiaceaeClass : ChytridiaceaeClass -> Jenc.Value
 encodeChytridiaceaeClass x =
@@ -1185,31 +1191,31 @@ encodeDiscordiaElement x = case x of
 discordiaClass : Jdec.Decoder DiscordiaClass
 discordiaClass =
     Jdec.succeed DiscordiaClass
-        |> Jpipe.optional "Altaic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "amoristic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "blennophthalmia" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disciplinability" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "goofer" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "laryngograph" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "leucitis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lymphocyst" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "microcosmology" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nauseation" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Patarin" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preliberal" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "prettifier" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rangework" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "redient" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "subfusiform" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "suicidical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "swow" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "wastrel" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "wingle" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "Altaic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "amoristic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "blennophthalmia" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disciplinability" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "goofer" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "laryngograph" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "leucitis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lymphocyst" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "microcosmology" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nauseation" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Patarin" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preliberal" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "prettifier" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rangework" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "redient" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "subfusiform" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "suicidical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "swow" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "wastrel" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "wingle" (Jdec.nullable Jdec.int) Nothing)
 
 encodeDiscordiaClass : DiscordiaClass -> Jenc.Value
 encodeDiscordiaClass x =
@@ -1296,26 +1302,26 @@ encodeGryphosaurusElement x = case x of
 gryphosaurusClass : Jdec.Decoder GryphosaurusClass
 gryphosaurusClass =
     Jdec.succeed GryphosaurusClass
-        |> Jpipe.optional "amissibility" (Jdec.null ()) ()
-        |> Jpipe.optional "Burushaski" (Jdec.null ()) ()
-        |> Jpipe.optional "citronin" (Jdec.null ()) ()
-        |> Jpipe.optional "coplaintiff" (Jdec.null ()) ()
-        |> Jpipe.optional "disquisitionary" (Jdec.null ()) ()
-        |> Jpipe.optional "enoplan" (Jdec.null ()) ()
-        |> Jpipe.optional "faintness" (Jdec.null ()) ()
-        |> Jpipe.optional "hebetomy" (Jdec.null ()) ()
-        |> Jpipe.optional "islandry" (Jdec.null ()) ()
-        |> Jpipe.optional "lameduck" (Jdec.null ()) ()
-        |> Jpipe.optional "overbattle" (Jdec.null ()) ()
-        |> Jpipe.optional "overinterested" (Jdec.null ()) ()
-        |> Jpipe.optional "phrenologic" (Jdec.null ()) ()
-        |> Jpipe.optional "rainband" (Jdec.null ()) ()
-        |> Jpipe.optional "shiningly" (Jdec.null ()) ()
-        |> Jpipe.optional "stamineous" (Jdec.null ()) ()
-        |> Jpipe.optional "subscapularis" (Jdec.null ()) ()
-        |> Jpipe.optional "Tahami" (Jdec.null ()) ()
-        |> Jpipe.optional "undaubed" (Jdec.null ()) ()
-        |> Jpipe.optional "underntime" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "amissibility" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Burushaski" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "citronin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coplaintiff" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disquisitionary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enoplan" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "faintness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hebetomy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "islandry" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lameduck" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overbattle" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overinterested" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phrenologic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rainband" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shiningly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stamineous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subscapularis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tahami" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undaubed" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underntime" (Jdec.null ()) ())
 
 encodeGryphosaurusClass : GryphosaurusClass -> Jenc.Value
 encodeGryphosaurusClass x =
@@ -1369,31 +1375,31 @@ encodeLaviniaElement x = case x of
 laviniaClass : Jdec.Decoder LaviniaClass
 laviniaClass =
     Jdec.succeed LaviniaClass
-        |> Jpipe.optional "agitable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "asininity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "benefiter" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "bronzelike" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "deprivement" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "flippantness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fogproof" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "merrymeeting" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "overcareful" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "panaris" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preacceptance" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "quinoxaline" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sig" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "superconfusion" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Tacana" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tillotter" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tranquillize" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unquestionable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "uproute" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "agitable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "asininity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "benefiter" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "bronzelike" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cholesteatomatous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "deprivement" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "flippantness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fogproof" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "merrymeeting" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "overcareful" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "panaris" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preacceptance" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "quinoxaline" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sig" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "superconfusion" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Tacana" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tillotter" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tranquillize" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unquestionable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "uproute" (Jdec.nullable Jdec.int) Nothing)
 
 encodeLaviniaClass : LaviniaClass -> Jenc.Value
 encodeLaviniaClass x =
@@ -1440,26 +1446,26 @@ encodeOskarElement x = case x of
 oskarClass : Jdec.Decoder OskarClass
 oskarClass =
     Jdec.succeed OskarClass
-        |> Jpipe.optional "Acrobates" (Jdec.null ()) ()
-        |> Jpipe.optional "beanshooter" (Jdec.null ()) ()
-        |> Jpipe.optional "bearhound" (Jdec.null ()) ()
-        |> Jpipe.optional "Cayuga" (Jdec.null ()) ()
-        |> Jpipe.optional "guarneri" (Jdec.null ()) ()
-        |> Jpipe.optional "hypochondriacism" (Jdec.null ()) ()
-        |> Jpipe.optional "indication" (Jdec.null ()) ()
-        |> Jpipe.optional "jaculative" (Jdec.null ()) ()
-        |> Jpipe.optional "nagana" (Jdec.null ()) ()
-        |> Jpipe.optional "Netherlandish" (Jdec.null ()) ()
-        |> Jpipe.optional "noctivagous" (Jdec.null ()) ()
-        |> Jpipe.optional "nonphysiological" (Jdec.null ()) ()
-        |> Jpipe.optional "praxis" (Jdec.null ()) ()
-        |> Jpipe.optional "provision" (Jdec.null ()) ()
-        |> Jpipe.optional "subterhuman" (Jdec.null ()) ()
-        |> Jpipe.optional "sunlit" (Jdec.null ()) ()
-        |> Jpipe.optional "syncraniate" (Jdec.null ()) ()
-        |> Jpipe.optional "teachment" (Jdec.null ()) ()
-        |> Jpipe.optional "unmutinous" (Jdec.null ()) ()
-        |> Jpipe.optional "unstoppable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Acrobates" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "beanshooter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bearhound" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Cayuga" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "guarneri" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hypochondriacism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "indication" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jaculative" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nagana" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Netherlandish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "noctivagous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonphysiological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "praxis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "provision" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subterhuman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sunlit" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "syncraniate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "teachment" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmutinous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unstoppable" (Jdec.null ()) ())
 
 encodeOskarClass : OskarClass -> Jenc.Value
 encodeOskarClass x =
diff --git a/base/elm/test/inputs/json/priority/combinations3.json/array-type-array--eed288b23e27/QuickType.elm b/head/elm/test/inputs/json/priority/combinations3.json/array-type-array--eed288b23e27/QuickType.elm
index acbde51..e054cbe 100644
--- a/base/elm/test/inputs/json/priority/combinations3.json/array-type-array--eed288b23e27/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations3.json/array-type-array--eed288b23e27/QuickType.elm
@@ -615,6 +615,12 @@ type Protext
     | MonaziteClassInProtext MonaziteClass
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -727,26 +733,26 @@ encodeJurorElement x = case x of
 jurorClass : Jdec.Decoder JurorClass
 jurorClass =
     Jdec.succeed JurorClass
-        |> Jpipe.optional "adipsy" (Jdec.null ()) ()
-        |> Jpipe.optional "auxiliator" (Jdec.null ()) ()
-        |> Jpipe.optional "benda" (Jdec.null ()) ()
-        |> Jpipe.optional "benjamin" (Jdec.null ()) ()
-        |> Jpipe.optional "brandling" (Jdec.null ()) ()
-        |> Jpipe.optional "epicurishly" (Jdec.null ()) ()
-        |> Jpipe.optional "eremochaetous" (Jdec.null ()) ()
-        |> Jpipe.optional "marten" (Jdec.null ()) ()
-        |> Jpipe.optional "monocline" (Jdec.null ()) ()
-        |> Jpipe.optional "Olea" (Jdec.null ()) ()
-        |> Jpipe.optional "palgat" (Jdec.null ()) ()
-        |> Jpipe.optional "pennyworth" (Jdec.null ()) ()
-        |> Jpipe.optional "pioury" (Jdec.null ()) ()
-        |> Jpipe.optional "pragmatistic" (Jdec.null ()) ()
-        |> Jpipe.optional "stylelessness" (Jdec.null ()) ()
-        |> Jpipe.optional "systematical" (Jdec.null ()) ()
-        |> Jpipe.optional "thready" (Jdec.null ()) ()
-        |> Jpipe.optional "uncontemporary" (Jdec.null ()) ()
-        |> Jpipe.optional "uncouched" (Jdec.null ()) ()
-        |> Jpipe.optional "uninhabitedness" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "adipsy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "auxiliator" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "benda" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "benjamin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brandling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "epicurishly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "eremochaetous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "marten" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monocline" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Olea" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palgat" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pennyworth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pioury" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pragmatistic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stylelessness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "systematical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thready" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncontemporary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncouched" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uninhabitedness" (Jdec.null ()) ())
 
 encodeJurorClass : JurorClass -> Jenc.Value
 encodeJurorClass x =
@@ -802,26 +808,26 @@ encodeLadronismElement x = case x of
 ladronismClass : Jdec.Decoder LadronismClass
 ladronismClass =
     Jdec.succeed LadronismClass
-        |> Jpipe.optional "acclaimer" (Jdec.null ()) ()
-        |> Jpipe.optional "achree" (Jdec.null ()) ()
-        |> Jpipe.optional "base" (Jdec.null ()) ()
-        |> Jpipe.optional "conundrumize" (Jdec.null ()) ()
-        |> Jpipe.optional "degerminator" (Jdec.null ()) ()
-        |> Jpipe.optional "describable" (Jdec.null ()) ()
-        |> Jpipe.optional "exasperatedly" (Jdec.null ()) ()
-        |> Jpipe.optional "heroine" (Jdec.null ()) ()
-        |> Jpipe.optional "indazin" (Jdec.null ()) ()
-        |> Jpipe.optional "luteous" (Jdec.null ()) ()
-        |> Jpipe.optional "papular" (Jdec.null ()) ()
-        |> Jpipe.optional "pritch" (Jdec.null ()) ()
-        |> Jpipe.optional "Prodenia" (Jdec.null ()) ()
-        |> Jpipe.optional "seege" (Jdec.null ()) ()
-        |> Jpipe.optional "shopgirl" (Jdec.null ()) ()
-        |> Jpipe.optional "tragedietta" (Jdec.null ()) ()
-        |> Jpipe.optional "unsparse" (Jdec.null ()) ()
-        |> Jpipe.optional "uplook" (Jdec.null ()) ()
-        |> Jpipe.optional "vermiformis" (Jdec.null ()) ()
-        |> Jpipe.optional "whafabout" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "acclaimer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "achree" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "base" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "conundrumize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "degerminator" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "describable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "exasperatedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heroine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "indazin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "luteous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "papular" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pritch" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Prodenia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "seege" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shopgirl" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tragedietta" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsparse" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uplook" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vermiformis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "whafabout" (Jdec.null ()) ())
 
 encodeLadronismClass : LadronismClass -> Jenc.Value
 encodeLadronismClass x =
@@ -865,26 +871,26 @@ encodeLandlubberlyElement x = case x of
 landlubberlyClass : Jdec.Decoder LandlubberlyClass
 landlubberlyClass =
     Jdec.succeed LandlubberlyClass
-        |> Jpipe.optional "acropoleis" (Jdec.null ()) ()
-        |> Jpipe.optional "aminate" (Jdec.null ()) ()
-        |> Jpipe.optional "Amyraldism" (Jdec.null ()) ()
-        |> Jpipe.optional "bipenniform" (Jdec.null ()) ()
-        |> Jpipe.optional "bugre" (Jdec.null ()) ()
-        |> Jpipe.optional "calycule" (Jdec.null ()) ()
-        |> Jpipe.optional "caoutchouc" (Jdec.null ()) ()
-        |> Jpipe.optional "disprover" (Jdec.null ()) ()
-        |> Jpipe.optional "fitroot" (Jdec.null ()) ()
-        |> Jpipe.optional "fulgently" (Jdec.null ()) ()
-        |> Jpipe.optional "kickup" (Jdec.null ()) ()
-        |> Jpipe.optional "laevoversion" (Jdec.null ()) ()
-        |> Jpipe.optional "moter" (Jdec.null ()) ()
-        |> Jpipe.optional "objectivity" (Jdec.null ()) ()
-        |> Jpipe.optional "posterity" (Jdec.null ()) ()
-        |> Jpipe.optional "postnuptial" (Jdec.null ()) ()
-        |> Jpipe.optional "precedentary" (Jdec.null ()) ()
-        |> Jpipe.optional "saddling" (Jdec.null ()) ()
-        |> Jpipe.optional "subcurrent" (Jdec.null ()) ()
-        |> Jpipe.optional "unrecriminative" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "acropoleis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aminate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Amyraldism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bipenniform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bugre" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "calycule" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "caoutchouc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disprover" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fitroot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fulgently" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kickup" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laevoversion" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "moter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "objectivity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "posterity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "postnuptial" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "precedentary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "saddling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subcurrent" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unrecriminative" (Jdec.null ()) ())
 
 encodeLandlubberlyClass : LandlubberlyClass -> Jenc.Value
 encodeLandlubberlyClass x =
@@ -938,31 +944,31 @@ encodeLupusElement x = case x of
 lupusClass : Jdec.Decoder LupusClass
 lupusClass =
     Jdec.succeed LupusClass
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Chlorioninae" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Corvinae" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Crassina" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "exiguity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "farcist" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "holographical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "ichthyophagan" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "implacable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "outshiner" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "overweather" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "protonegroid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shallowish" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "snoke" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "snout" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "surveillance" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "threshingtime" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsignificantly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsnap" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "vendible" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Chlorioninae" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Corvinae" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Crassina" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "exiguity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "farcist" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "holographical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "ichthyophagan" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "implacable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "outshiner" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "overweather" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "protonegroid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shallowish" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "snoke" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "snout" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "surveillance" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "threshingtime" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsignificantly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsnap" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "vendible" (Jdec.nullable Jdec.int) Nothing)
 
 encodeLupusClass : LupusClass -> Jenc.Value
 encodeLupusClass x =
@@ -997,51 +1003,51 @@ encodeLupusClass x =
 maslin : Jdec.Decoder Maslin
 maslin =
     Jdec.succeed Maslin
-        |> Jpipe.optional "Alicant" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "anticorrosive" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "be" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chub" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cuprosilicon" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "curtailedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "dellenite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Dimitry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "edifying" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ethmoiditis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "goatherd" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hammerdress" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hangfire" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "lacunosity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mameliere" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "motherless" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "oafishly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pfund" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "saccharulmic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scowlful" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "secluded" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "slackage" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sphaeridial" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "spondulics" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subsecive" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trachyglossate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "trialogue" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unassuaged" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ungross" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "Alicant" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "anticorrosive" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "be" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chub" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cuprosilicon" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "curtailedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "dellenite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Dimitry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "edifying" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ethmoiditis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "goatherd" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hammerdress" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hangfire" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "lacunosity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mameliere" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "motherless" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "oafishly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pfund" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "saccharulmic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scowlful" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "secluded" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "slackage" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sphaeridial" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "spondulics" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subsecive" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trachyglossate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "trialogue" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unassuaged" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ungross" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeMaslin : Maslin -> Jenc.Value
 encodeMaslin x =
@@ -1112,7 +1118,7 @@ monaziteClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeMonaziteClass : MonaziteClass -> Jenc.Value
 encodeMonaziteClass x =
@@ -1151,31 +1157,31 @@ encodeMonotheisticallyElement x = case x of
 monotheisticallyClass : Jdec.Decoder MonotheisticallyClass
 monotheisticallyClass =
     Jdec.succeed MonotheisticallyClass
-        |> Jpipe.optional "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "egestive" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "enchylema" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "gasconade" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "holidayer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "palatableness" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "pimpery" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "previolation" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "registership" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "smithereens" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "superedification" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trust" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "whitestone" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "egestive" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "enchylema" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "gasconade" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "holidayer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "palatableness" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "pimpery" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "previolation" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "registership" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "smithereens" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "superedification" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trust" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "whitestone" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeMonotheisticallyClass : MonotheisticallyClass -> Jenc.Value
 encodeMonotheisticallyClass x =
@@ -1282,7 +1288,7 @@ noncontributing =
         |> Jpipe.required "jolterhead" Jdec.float
         |> Jpipe.required "sauternes" Jdec.int
         |> Jpipe.required "sparsely" Jdec.bool
-        |> Jpipe.optional "unrequested" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "unrequested" (Jdec.null ()) ())
 
 encodeNoncontributing : Noncontributing -> Jenc.Value
 encodeNoncontributing x =
@@ -1337,26 +1343,26 @@ encodeOccupationalistElement x = case x of
 occupationalistClass : Jdec.Decoder OccupationalistClass
 occupationalistClass =
     Jdec.succeed OccupationalistClass
-        |> Jpipe.optional "beholdable" (Jdec.null ()) ()
-        |> Jpipe.optional "brotuliform" (Jdec.null ()) ()
-        |> Jpipe.optional "Chimakum" (Jdec.null ()) ()
-        |> Jpipe.optional "doodler" (Jdec.null ()) ()
-        |> Jpipe.optional "emulsin" (Jdec.null ()) ()
-        |> Jpipe.optional "Fin" (Jdec.null ()) ()
-        |> Jpipe.optional "flourishing" (Jdec.null ()) ()
-        |> Jpipe.optional "flueless" (Jdec.null ()) ()
-        |> Jpipe.optional "furtively" (Jdec.null ()) ()
-        |> Jpipe.optional "gritter" (Jdec.null ()) ()
-        |> Jpipe.optional "interwish" (Jdec.null ()) ()
-        |> Jpipe.optional "monoxylic" (Jdec.null ()) ()
-        |> Jpipe.optional "myristic" (Jdec.null ()) ()
-        |> Jpipe.optional "nightwear" (Jdec.null ()) ()
-        |> Jpipe.optional "peruser" (Jdec.null ()) ()
-        |> Jpipe.optional "theoastrological" (Jdec.null ()) ()
-        |> Jpipe.optional "thumby" (Jdec.null ()) ()
-        |> Jpipe.optional "tingitid" (Jdec.null ()) ()
-        |> Jpipe.optional "trailless" (Jdec.null ()) ()
-        |> Jpipe.optional "unpocketed" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "beholdable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brotuliform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Chimakum" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "doodler" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "emulsin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Fin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flourishing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flueless" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "furtively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gritter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "interwish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monoxylic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "myristic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nightwear" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "peruser" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "theoastrological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thumby" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tingitid" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "trailless" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unpocketed" (Jdec.null ()) ())
 
 encodeOccupationalistClass : OccupationalistClass -> Jenc.Value
 encodeOccupationalistClass x =
@@ -1400,26 +1406,26 @@ encodeOutrivalElement x = case x of
 outrivalClass : Jdec.Decoder OutrivalClass
 outrivalClass =
     Jdec.succeed OutrivalClass
-        |> Jpipe.optional "adroitly" (Jdec.null ()) ()
-        |> Jpipe.optional "bridehood" (Jdec.null ()) ()
-        |> Jpipe.optional "Castoroides" (Jdec.null ()) ()
-        |> Jpipe.optional "Czechoslovak" (Jdec.null ()) ()
-        |> Jpipe.optional "diagenesis" (Jdec.null ()) ()
-        |> Jpipe.optional "dihexahedron" (Jdec.null ()) ()
-        |> Jpipe.optional "dopester" (Jdec.null ()) ()
-        |> Jpipe.optional "eumerism" (Jdec.null ()) ()
-        |> Jpipe.optional "flyness" (Jdec.null ()) ()
-        |> Jpipe.optional "fouler" (Jdec.null ()) ()
-        |> Jpipe.optional "laudanosine" (Jdec.null ()) ()
-        |> Jpipe.optional "Lingulidae" (Jdec.null ()) ()
-        |> Jpipe.optional "minutary" (Jdec.null ()) ()
-        |> Jpipe.optional "mitra" (Jdec.null ()) ()
-        |> Jpipe.optional "opisthorchiasis" (Jdec.null ()) ()
-        |> Jpipe.optional "pensively" (Jdec.null ()) ()
-        |> Jpipe.optional "pubigerous" (Jdec.null ()) ()
-        |> Jpipe.optional "rebellious" (Jdec.null ()) ()
-        |> Jpipe.optional "recodify" (Jdec.null ()) ()
-        |> Jpipe.optional "unpaced" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "adroitly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bridehood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Castoroides" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Czechoslovak" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "diagenesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dihexahedron" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dopester" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "eumerism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flyness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fouler" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laudanosine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lingulidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "minutary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mitra" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "opisthorchiasis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pensively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pubigerous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rebellious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "recodify" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unpaced" (Jdec.null ()) ())
 
 encodeOutrivalClass : OutrivalClass -> Jenc.Value
 encodeOutrivalClass x =
@@ -1501,31 +1507,31 @@ encodePiaculumElement x = case x of
 piaculumClass : Jdec.Decoder PiaculumClass
 piaculumClass =
     Jdec.succeed PiaculumClass
-        |> Jpipe.optional "alada" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "amphistomous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "boysenberry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "decardinalize" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "discouragement" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "doitrified" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hexaspermous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "insinking" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "loathfulness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "miasmatical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "neurofibril" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "phonendoscope" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pilferment" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "predismissory" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preinscription" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "quotative" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sienna" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thorax" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "yachting" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Zipper" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "alada" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "amphistomous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "boysenberry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "decardinalize" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "discouragement" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "doitrified" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hexaspermous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "insinking" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "loathfulness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "miasmatical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "neurofibril" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "phonendoscope" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pilferment" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "predismissory" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preinscription" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "quotative" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sienna" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thorax" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "yachting" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Zipper" (Jdec.nullable Jdec.int) Nothing)
 
 encodePiaculumClass : PiaculumClass -> Jenc.Value
 encodePiaculumClass x =
@@ -1624,31 +1630,31 @@ encodePlectopterous x = case x of
 pneumocele : Jdec.Decoder Pneumocele
 pneumocele =
     Jdec.succeed Pneumocele
-        |> Jpipe.optional "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cineolic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "cobbly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "congregation" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "entophytal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "herem" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "Koniga" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Micky" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "persuasively" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "replaceable" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "silex" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "taillight" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unjealous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "visitorial" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cineolic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "cobbly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "congregation" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "entophytal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "herem" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "Koniga" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Micky" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "persuasively" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "replaceable" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "silex" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "taillight" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unjealous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "visitorial" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodePneumocele : Pneumocele -> Jenc.Value
 encodePneumocele x =
@@ -1723,26 +1729,26 @@ encodePotwhiskyElement x = case x of
 potwhiskyClass : Jdec.Decoder PotwhiskyClass
 potwhiskyClass =
     Jdec.succeed PotwhiskyClass
-        |> Jpipe.optional "arciform" (Jdec.null ()) ()
-        |> Jpipe.optional "cresolin" (Jdec.null ()) ()
-        |> Jpipe.optional "disheartener" (Jdec.null ()) ()
-        |> Jpipe.optional "disproportionable" (Jdec.null ()) ()
-        |> Jpipe.optional "Euchorda" (Jdec.null ()) ()
-        |> Jpipe.optional "ferryway" (Jdec.null ()) ()
-        |> Jpipe.optional "filamentiferous" (Jdec.null ()) ()
-        |> Jpipe.optional "flemish" (Jdec.null ()) ()
-        |> Jpipe.optional "forgainst" (Jdec.null ()) ()
-        |> Jpipe.optional "grainering" (Jdec.null ()) ()
-        |> Jpipe.optional "irrevoluble" (Jdec.null ()) ()
-        |> Jpipe.optional "kindredship" (Jdec.null ()) ()
-        |> Jpipe.optional "pinguitudinous" (Jdec.null ()) ()
-        |> Jpipe.optional "simpletonic" (Jdec.null ()) ()
-        |> Jpipe.optional "singsong" (Jdec.null ()) ()
-        |> Jpipe.optional "submergement" (Jdec.null ()) ()
-        |> Jpipe.optional "supraoesophagal" (Jdec.null ()) ()
-        |> Jpipe.optional "thrashel" (Jdec.null ()) ()
-        |> Jpipe.optional "tyremesis" (Jdec.null ()) ()
-        |> Jpipe.optional "Yoruba" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "arciform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cresolin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disheartener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disproportionable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Euchorda" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ferryway" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "filamentiferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flemish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "forgainst" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grainering" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "irrevoluble" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kindredship" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pinguitudinous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "simpletonic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "singsong" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "submergement" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "supraoesophagal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thrashel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tyremesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Yoruba" (Jdec.null ()) ())
 
 encodePotwhiskyClass : PotwhiskyClass -> Jenc.Value
 encodePotwhiskyClass x =
@@ -1800,26 +1806,26 @@ encodePrefreshmanElement x = case x of
 prefreshmanClass : Jdec.Decoder PrefreshmanClass
 prefreshmanClass =
     Jdec.succeed PrefreshmanClass
-        |> Jpipe.optional "azorubine" (Jdec.null ()) ()
-        |> Jpipe.optional "choroiditis" (Jdec.null ()) ()
-        |> Jpipe.optional "coagulatory" (Jdec.null ()) ()
-        |> Jpipe.optional "cyclorama" (Jdec.null ()) ()
-        |> Jpipe.optional "Dolphus" (Jdec.null ()) ()
-        |> Jpipe.optional "duckhearted" (Jdec.null ()) ()
-        |> Jpipe.optional "Ficus" (Jdec.null ()) ()
-        |> Jpipe.optional "Gemaric" (Jdec.null ()) ()
-        |> Jpipe.optional "jugation" (Jdec.null ()) ()
-        |> Jpipe.optional "myoliposis" (Jdec.null ()) ()
-        |> Jpipe.optional "nonnomination" (Jdec.null ()) ()
-        |> Jpipe.optional "palay" (Jdec.null ()) ()
-        |> Jpipe.optional "pentactinal" (Jdec.null ()) ()
-        |> Jpipe.optional "Phaet" (Jdec.null ()) ()
-        |> Jpipe.optional "piquant" (Jdec.null ()) ()
-        |> Jpipe.optional "registration" (Jdec.null ()) ()
-        |> Jpipe.optional "remancipation" (Jdec.null ()) ()
-        |> Jpipe.optional "scutatiform" (Jdec.null ()) ()
-        |> Jpipe.optional "theodolite" (Jdec.null ()) ()
-        |> Jpipe.optional "underward" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "azorubine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "choroiditis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coagulatory" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cyclorama" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Dolphus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "duckhearted" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ficus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Gemaric" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jugation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "myoliposis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonnomination" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palay" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pentactinal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Phaet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "piquant" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "registration" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "remancipation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scutatiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "theodolite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underward" (Jdec.null ()) ())
 
 encodePrefreshmanClass : PrefreshmanClass -> Jenc.Value
 encodePrefreshmanClass x =
diff --git a/base/elm/test/inputs/json/priority/combinations3.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/combinations3.json/default/QuickType.elm
index 2aad2a1..5a544d2 100644
--- a/base/elm/test/inputs/json/priority/combinations3.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations3.json/default/QuickType.elm
@@ -614,6 +614,12 @@ type Protext
     | MonaziteClassInProtext MonaziteClass
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -726,26 +732,26 @@ encodeJurorElement x = case x of
 jurorClass : Jdec.Decoder JurorClass
 jurorClass =
     Jdec.succeed JurorClass
-        |> Jpipe.optional "adipsy" (Jdec.null ()) ()
-        |> Jpipe.optional "auxiliator" (Jdec.null ()) ()
-        |> Jpipe.optional "benda" (Jdec.null ()) ()
-        |> Jpipe.optional "benjamin" (Jdec.null ()) ()
-        |> Jpipe.optional "brandling" (Jdec.null ()) ()
-        |> Jpipe.optional "epicurishly" (Jdec.null ()) ()
-        |> Jpipe.optional "eremochaetous" (Jdec.null ()) ()
-        |> Jpipe.optional "marten" (Jdec.null ()) ()
-        |> Jpipe.optional "monocline" (Jdec.null ()) ()
-        |> Jpipe.optional "Olea" (Jdec.null ()) ()
-        |> Jpipe.optional "palgat" (Jdec.null ()) ()
-        |> Jpipe.optional "pennyworth" (Jdec.null ()) ()
-        |> Jpipe.optional "pioury" (Jdec.null ()) ()
-        |> Jpipe.optional "pragmatistic" (Jdec.null ()) ()
-        |> Jpipe.optional "stylelessness" (Jdec.null ()) ()
-        |> Jpipe.optional "systematical" (Jdec.null ()) ()
-        |> Jpipe.optional "thready" (Jdec.null ()) ()
-        |> Jpipe.optional "uncontemporary" (Jdec.null ()) ()
-        |> Jpipe.optional "uncouched" (Jdec.null ()) ()
-        |> Jpipe.optional "uninhabitedness" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "adipsy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "auxiliator" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "benda" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "benjamin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brandling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "epicurishly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "eremochaetous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "marten" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monocline" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Olea" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palgat" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pennyworth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pioury" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pragmatistic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stylelessness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "systematical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thready" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncontemporary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncouched" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uninhabitedness" (Jdec.null ()) ())
 
 encodeJurorClass : JurorClass -> Jenc.Value
 encodeJurorClass x =
@@ -801,26 +807,26 @@ encodeLadronismElement x = case x of
 ladronismClass : Jdec.Decoder LadronismClass
 ladronismClass =
     Jdec.succeed LadronismClass
-        |> Jpipe.optional "acclaimer" (Jdec.null ()) ()
-        |> Jpipe.optional "achree" (Jdec.null ()) ()
-        |> Jpipe.optional "base" (Jdec.null ()) ()
-        |> Jpipe.optional "conundrumize" (Jdec.null ()) ()
-        |> Jpipe.optional "degerminator" (Jdec.null ()) ()
-        |> Jpipe.optional "describable" (Jdec.null ()) ()
-        |> Jpipe.optional "exasperatedly" (Jdec.null ()) ()
-        |> Jpipe.optional "heroine" (Jdec.null ()) ()
-        |> Jpipe.optional "indazin" (Jdec.null ()) ()
-        |> Jpipe.optional "luteous" (Jdec.null ()) ()
-        |> Jpipe.optional "papular" (Jdec.null ()) ()
-        |> Jpipe.optional "pritch" (Jdec.null ()) ()
-        |> Jpipe.optional "Prodenia" (Jdec.null ()) ()
-        |> Jpipe.optional "seege" (Jdec.null ()) ()
-        |> Jpipe.optional "shopgirl" (Jdec.null ()) ()
-        |> Jpipe.optional "tragedietta" (Jdec.null ()) ()
-        |> Jpipe.optional "unsparse" (Jdec.null ()) ()
-        |> Jpipe.optional "uplook" (Jdec.null ()) ()
-        |> Jpipe.optional "vermiformis" (Jdec.null ()) ()
-        |> Jpipe.optional "whafabout" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "acclaimer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "achree" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "base" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "conundrumize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "degerminator" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "describable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "exasperatedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heroine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "indazin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "luteous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "papular" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pritch" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Prodenia" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "seege" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "shopgirl" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tragedietta" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsparse" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uplook" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vermiformis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "whafabout" (Jdec.null ()) ())
 
 encodeLadronismClass : LadronismClass -> Jenc.Value
 encodeLadronismClass x =
@@ -864,26 +870,26 @@ encodeLandlubberlyElement x = case x of
 landlubberlyClass : Jdec.Decoder LandlubberlyClass
 landlubberlyClass =
     Jdec.succeed LandlubberlyClass
-        |> Jpipe.optional "acropoleis" (Jdec.null ()) ()
-        |> Jpipe.optional "aminate" (Jdec.null ()) ()
-        |> Jpipe.optional "Amyraldism" (Jdec.null ()) ()
-        |> Jpipe.optional "bipenniform" (Jdec.null ()) ()
-        |> Jpipe.optional "bugre" (Jdec.null ()) ()
-        |> Jpipe.optional "calycule" (Jdec.null ()) ()
-        |> Jpipe.optional "caoutchouc" (Jdec.null ()) ()
-        |> Jpipe.optional "disprover" (Jdec.null ()) ()
-        |> Jpipe.optional "fitroot" (Jdec.null ()) ()
-        |> Jpipe.optional "fulgently" (Jdec.null ()) ()
-        |> Jpipe.optional "kickup" (Jdec.null ()) ()
-        |> Jpipe.optional "laevoversion" (Jdec.null ()) ()
-        |> Jpipe.optional "moter" (Jdec.null ()) ()
-        |> Jpipe.optional "objectivity" (Jdec.null ()) ()
-        |> Jpipe.optional "posterity" (Jdec.null ()) ()
-        |> Jpipe.optional "postnuptial" (Jdec.null ()) ()
-        |> Jpipe.optional "precedentary" (Jdec.null ()) ()
-        |> Jpipe.optional "saddling" (Jdec.null ()) ()
-        |> Jpipe.optional "subcurrent" (Jdec.null ()) ()
-        |> Jpipe.optional "unrecriminative" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "acropoleis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aminate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Amyraldism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bipenniform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bugre" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "calycule" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "caoutchouc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disprover" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fitroot" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fulgently" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kickup" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laevoversion" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "moter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "objectivity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "posterity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "postnuptial" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "precedentary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "saddling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "subcurrent" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unrecriminative" (Jdec.null ()) ())
 
 encodeLandlubberlyClass : LandlubberlyClass -> Jenc.Value
 encodeLandlubberlyClass x =
@@ -937,31 +943,31 @@ encodeLupusElement x = case x of
 lupusClass : Jdec.Decoder LupusClass
 lupusClass =
     Jdec.succeed LupusClass
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Chlorioninae" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Corvinae" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Crassina" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "exiguity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "farcist" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "holographical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "ichthyophagan" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "implacable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "outshiner" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "overweather" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "protonegroid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "shallowish" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "snoke" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "snout" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "surveillance" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "threshingtime" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsignificantly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsnap" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "vendible" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Chlorioninae" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Corvinae" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Crassina" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "exiguity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "farcist" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "holographical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "ichthyophagan" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "implacable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "outshiner" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "overweather" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "protonegroid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "shallowish" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "snoke" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "snout" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "surveillance" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "threshingtime" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Thysanocarpus" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsignificantly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsnap" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "vendible" (Jdec.nullable Jdec.int) Nothing)
 
 encodeLupusClass : LupusClass -> Jenc.Value
 encodeLupusClass x =
@@ -996,51 +1002,51 @@ encodeLupusClass x =
 maslin : Jdec.Decoder Maslin
 maslin =
     Jdec.succeed Maslin
-        |> Jpipe.optional "Alicant" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "anticorrosive" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "be" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chub" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cuprosilicon" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "curtailedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "dellenite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Dimitry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "edifying" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ethmoiditis" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "goatherd" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hammerdress" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hangfire" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "lacunosity" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mameliere" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "motherless" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "oafishly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pfund" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "saccharulmic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scowlful" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "secluded" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "slackage" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sphaeridial" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "spondulics" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subsecive" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trachyglossate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "trialogue" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unassuaged" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ungross" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "Alicant" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "antiatonement" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "anticorrosive" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "aphidozer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Bakuninist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "be" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chub" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cuprosilicon" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "curtailedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "dellenite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Dimitry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "edifying" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ethmoiditis" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gastralgy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "goatherd" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hammerdress" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hangfire" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "lacunosity" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "longiloquence" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mameliere" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "motherless" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "noncorrodible" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonsensicality" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "oafishly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pfund" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "preadvisory" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "retroflexed" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "saccharulmic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scowlful" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "secluded" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "slackage" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sphaeridial" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "spondulics" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subsecive" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "swellmobsman" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trachyglossate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "trialogue" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unassuaged" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ungross" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unjudiciously" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeMaslin : Maslin -> Jenc.Value
 encodeMaslin x =
@@ -1111,7 +1117,7 @@ monaziteClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeMonaziteClass : MonaziteClass -> Jenc.Value
 encodeMonaziteClass x =
@@ -1150,31 +1156,31 @@ encodeMonotheisticallyElement x = case x of
 monotheisticallyClass : Jdec.Decoder MonotheisticallyClass
 monotheisticallyClass =
     Jdec.succeed MonotheisticallyClass
-        |> Jpipe.optional "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "egestive" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "enchylema" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "gasconade" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "holidayer" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "palatableness" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "pimpery" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "previolation" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "registership" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "smithereens" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "superedification" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trust" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "whitestone" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "blaspheme" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "celiosalpingectomy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "consummativeness" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "egestive" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "enchylema" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "gasconade" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "holidayer" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "intuitionalism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lophiostomate" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonvolition" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "palatableness" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "pimpery" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "previolation" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "reconveyance" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "registership" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "rhyacolite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "smithereens" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "superedification" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trust" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "whitestone" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeMonotheisticallyClass : MonotheisticallyClass -> Jenc.Value
 encodeMonotheisticallyClass x =
@@ -1281,7 +1287,7 @@ noncontributing =
         |> Jpipe.required "jolterhead" Jdec.float
         |> Jpipe.required "sauternes" Jdec.int
         |> Jpipe.required "sparsely" Jdec.bool
-        |> Jpipe.optional "unrequested" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "unrequested" (Jdec.null ()) ())
 
 encodeNoncontributing : Noncontributing -> Jenc.Value
 encodeNoncontributing x =
@@ -1336,26 +1342,26 @@ encodeOccupationalistElement x = case x of
 occupationalistClass : Jdec.Decoder OccupationalistClass
 occupationalistClass =
     Jdec.succeed OccupationalistClass
-        |> Jpipe.optional "beholdable" (Jdec.null ()) ()
-        |> Jpipe.optional "brotuliform" (Jdec.null ()) ()
-        |> Jpipe.optional "Chimakum" (Jdec.null ()) ()
-        |> Jpipe.optional "doodler" (Jdec.null ()) ()
-        |> Jpipe.optional "emulsin" (Jdec.null ()) ()
-        |> Jpipe.optional "Fin" (Jdec.null ()) ()
-        |> Jpipe.optional "flourishing" (Jdec.null ()) ()
-        |> Jpipe.optional "flueless" (Jdec.null ()) ()
-        |> Jpipe.optional "furtively" (Jdec.null ()) ()
-        |> Jpipe.optional "gritter" (Jdec.null ()) ()
-        |> Jpipe.optional "interwish" (Jdec.null ()) ()
-        |> Jpipe.optional "monoxylic" (Jdec.null ()) ()
-        |> Jpipe.optional "myristic" (Jdec.null ()) ()
-        |> Jpipe.optional "nightwear" (Jdec.null ()) ()
-        |> Jpipe.optional "peruser" (Jdec.null ()) ()
-        |> Jpipe.optional "theoastrological" (Jdec.null ()) ()
-        |> Jpipe.optional "thumby" (Jdec.null ()) ()
-        |> Jpipe.optional "tingitid" (Jdec.null ()) ()
-        |> Jpipe.optional "trailless" (Jdec.null ()) ()
-        |> Jpipe.optional "unpocketed" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "beholdable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "brotuliform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Chimakum" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "doodler" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "emulsin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Fin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flourishing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flueless" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "furtively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gritter" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "interwish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monoxylic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "myristic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nightwear" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "peruser" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "theoastrological" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thumby" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tingitid" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "trailless" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unpocketed" (Jdec.null ()) ())
 
 encodeOccupationalistClass : OccupationalistClass -> Jenc.Value
 encodeOccupationalistClass x =
@@ -1399,26 +1405,26 @@ encodeOutrivalElement x = case x of
 outrivalClass : Jdec.Decoder OutrivalClass
 outrivalClass =
     Jdec.succeed OutrivalClass
-        |> Jpipe.optional "adroitly" (Jdec.null ()) ()
-        |> Jpipe.optional "bridehood" (Jdec.null ()) ()
-        |> Jpipe.optional "Castoroides" (Jdec.null ()) ()
-        |> Jpipe.optional "Czechoslovak" (Jdec.null ()) ()
-        |> Jpipe.optional "diagenesis" (Jdec.null ()) ()
-        |> Jpipe.optional "dihexahedron" (Jdec.null ()) ()
-        |> Jpipe.optional "dopester" (Jdec.null ()) ()
-        |> Jpipe.optional "eumerism" (Jdec.null ()) ()
-        |> Jpipe.optional "flyness" (Jdec.null ()) ()
-        |> Jpipe.optional "fouler" (Jdec.null ()) ()
-        |> Jpipe.optional "laudanosine" (Jdec.null ()) ()
-        |> Jpipe.optional "Lingulidae" (Jdec.null ()) ()
-        |> Jpipe.optional "minutary" (Jdec.null ()) ()
-        |> Jpipe.optional "mitra" (Jdec.null ()) ()
-        |> Jpipe.optional "opisthorchiasis" (Jdec.null ()) ()
-        |> Jpipe.optional "pensively" (Jdec.null ()) ()
-        |> Jpipe.optional "pubigerous" (Jdec.null ()) ()
-        |> Jpipe.optional "rebellious" (Jdec.null ()) ()
-        |> Jpipe.optional "recodify" (Jdec.null ()) ()
-        |> Jpipe.optional "unpaced" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "adroitly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "bridehood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Castoroides" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Czechoslovak" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "diagenesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dihexahedron" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dopester" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "eumerism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flyness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "fouler" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laudanosine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lingulidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "minutary" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mitra" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "opisthorchiasis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pensively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pubigerous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rebellious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "recodify" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unpaced" (Jdec.null ()) ())
 
 encodeOutrivalClass : OutrivalClass -> Jenc.Value
 encodeOutrivalClass x =
@@ -1500,31 +1506,31 @@ encodePiaculumElement x = case x of
 piaculumClass : Jdec.Decoder PiaculumClass
 piaculumClass =
     Jdec.succeed PiaculumClass
-        |> Jpipe.optional "alada" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "amphistomous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "boysenberry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "decardinalize" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "discouragement" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "doitrified" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hexaspermous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "insinking" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "loathfulness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "miasmatical" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "neurofibril" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "phonendoscope" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pilferment" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "predismissory" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "preinscription" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "quotative" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sienna" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "thorax" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "yachting" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Zipper" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "alada" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "amphistomous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "boysenberry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "decardinalize" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "discouragement" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "doitrified" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hexaspermous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "insinking" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "loathfulness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "miasmatical" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "neurofibril" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "phonendoscope" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pilferment" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "predismissory" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "preinscription" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "quotative" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sienna" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "thorax" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "yachting" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Zipper" (Jdec.nullable Jdec.int) Nothing)
 
 encodePiaculumClass : PiaculumClass -> Jenc.Value
 encodePiaculumClass x =
@@ -1623,31 +1629,31 @@ encodePlectopterous x = case x of
 pneumocele : Jdec.Decoder Pneumocele
 pneumocele =
     Jdec.succeed Pneumocele
-        |> Jpipe.optional "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "cineolic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "cobbly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "congregation" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "entophytal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "herem" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "Koniga" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Micky" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "persuasively" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "replaceable" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "silex" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "taillight" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "unjealous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "visitorial" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "Carbonarism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "cineolic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "cobbly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "conchyliferous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "congregation" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enterotomy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "entophytal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "fewtrils" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "herem" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "Koniga" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "meticulosity" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Micky" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mismarriage" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "neurotrophic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "persuasively" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "replaceable" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "silex" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "taillight" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "unjealous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "visitorial" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodePneumocele : Pneumocele -> Jenc.Value
 encodePneumocele x =
@@ -1722,26 +1728,26 @@ encodePotwhiskyElement x = case x of
 potwhiskyClass : Jdec.Decoder PotwhiskyClass
 potwhiskyClass =
     Jdec.succeed PotwhiskyClass
-        |> Jpipe.optional "arciform" (Jdec.null ()) ()
-        |> Jpipe.optional "cresolin" (Jdec.null ()) ()
-        |> Jpipe.optional "disheartener" (Jdec.null ()) ()
-        |> Jpipe.optional "disproportionable" (Jdec.null ()) ()
-        |> Jpipe.optional "Euchorda" (Jdec.null ()) ()
-        |> Jpipe.optional "ferryway" (Jdec.null ()) ()
-        |> Jpipe.optional "filamentiferous" (Jdec.null ()) ()
-        |> Jpipe.optional "flemish" (Jdec.null ()) ()
-        |> Jpipe.optional "forgainst" (Jdec.null ()) ()
-        |> Jpipe.optional "grainering" (Jdec.null ()) ()
-        |> Jpipe.optional "irrevoluble" (Jdec.null ()) ()
-        |> Jpipe.optional "kindredship" (Jdec.null ()) ()
-        |> Jpipe.optional "pinguitudinous" (Jdec.null ()) ()
-        |> Jpipe.optional "simpletonic" (Jdec.null ()) ()
-        |> Jpipe.optional "singsong" (Jdec.null ()) ()
-        |> Jpipe.optional "submergement" (Jdec.null ()) ()
-        |> Jpipe.optional "supraoesophagal" (Jdec.null ()) ()
-        |> Jpipe.optional "thrashel" (Jdec.null ()) ()
-        |> Jpipe.optional "tyremesis" (Jdec.null ()) ()
-        |> Jpipe.optional "Yoruba" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "arciform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cresolin" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disheartener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "disproportionable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Euchorda" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ferryway" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "filamentiferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "flemish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "forgainst" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "grainering" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "irrevoluble" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kindredship" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pinguitudinous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "simpletonic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "singsong" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "submergement" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "supraoesophagal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "thrashel" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tyremesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Yoruba" (Jdec.null ()) ())
 
 encodePotwhiskyClass : PotwhiskyClass -> Jenc.Value
 encodePotwhiskyClass x =
@@ -1799,26 +1805,26 @@ encodePrefreshmanElement x = case x of
 prefreshmanClass : Jdec.Decoder PrefreshmanClass
 prefreshmanClass =
     Jdec.succeed PrefreshmanClass
-        |> Jpipe.optional "azorubine" (Jdec.null ()) ()
-        |> Jpipe.optional "choroiditis" (Jdec.null ()) ()
-        |> Jpipe.optional "coagulatory" (Jdec.null ()) ()
-        |> Jpipe.optional "cyclorama" (Jdec.null ()) ()
-        |> Jpipe.optional "Dolphus" (Jdec.null ()) ()
-        |> Jpipe.optional "duckhearted" (Jdec.null ()) ()
-        |> Jpipe.optional "Ficus" (Jdec.null ()) ()
-        |> Jpipe.optional "Gemaric" (Jdec.null ()) ()
-        |> Jpipe.optional "jugation" (Jdec.null ()) ()
-        |> Jpipe.optional "myoliposis" (Jdec.null ()) ()
-        |> Jpipe.optional "nonnomination" (Jdec.null ()) ()
-        |> Jpipe.optional "palay" (Jdec.null ()) ()
-        |> Jpipe.optional "pentactinal" (Jdec.null ()) ()
-        |> Jpipe.optional "Phaet" (Jdec.null ()) ()
-        |> Jpipe.optional "piquant" (Jdec.null ()) ()
-        |> Jpipe.optional "registration" (Jdec.null ()) ()
-        |> Jpipe.optional "remancipation" (Jdec.null ()) ()
-        |> Jpipe.optional "scutatiform" (Jdec.null ()) ()
-        |> Jpipe.optional "theodolite" (Jdec.null ()) ()
-        |> Jpipe.optional "underward" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "azorubine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "choroiditis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coagulatory" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cyclorama" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Dolphus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "duckhearted" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ficus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Gemaric" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jugation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "myoliposis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonnomination" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palay" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pentactinal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Phaet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "piquant" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "registration" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "remancipation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "scutatiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "theodolite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underward" (Jdec.null ()) ())
 
 encodePrefreshmanClass : PrefreshmanClass -> Jenc.Value
 encodePrefreshmanClass x =
diff --git a/base/elm/test/inputs/json/priority/combinations4.json/array-type-array--eed288b23e27/QuickType.elm b/head/elm/test/inputs/json/priority/combinations4.json/array-type-array--eed288b23e27/QuickType.elm
index adef1e5..aff828f 100644
--- a/base/elm/test/inputs/json/priority/combinations4.json/array-type-array--eed288b23e27/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations4.json/array-type-array--eed288b23e27/QuickType.elm
@@ -712,6 +712,12 @@ type alias WrothyClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -858,26 +864,26 @@ encodePulpitismElement x = case x of
 pulpitismClass : Jdec.Decoder PulpitismClass
 pulpitismClass =
     Jdec.succeed PulpitismClass
-        |> Jpipe.optional "abnet" (Jdec.null ()) ()
-        |> Jpipe.optional "buckhorn" (Jdec.null ()) ()
-        |> Jpipe.optional "calciform" (Jdec.null ()) ()
-        |> Jpipe.optional "chelophore" (Jdec.null ()) ()
-        |> Jpipe.optional "cogitation" (Jdec.null ()) ()
-        |> Jpipe.optional "decreeable" (Jdec.null ()) ()
-        |> Jpipe.optional "despicable" (Jdec.null ()) ()
-        |> Jpipe.optional "isodiazo" (Jdec.null ()) ()
-        |> Jpipe.optional "jadedly" (Jdec.null ()) ()
-        |> Jpipe.optional "leptochlorite" (Jdec.null ()) ()
-        |> Jpipe.optional "nursling" (Jdec.null ()) ()
-        |> Jpipe.optional "palamedean" (Jdec.null ()) ()
-        |> Jpipe.optional "photoheliograph" (Jdec.null ()) ()
-        |> Jpipe.optional "pipewood" (Jdec.null ()) ()
-        |> Jpipe.optional "roberd" (Jdec.null ()) ()
-        |> Jpipe.optional "statable" (Jdec.null ()) ()
-        |> Jpipe.optional "superassume" (Jdec.null ()) ()
-        |> Jpipe.optional "syllabe" (Jdec.null ()) ()
-        |> Jpipe.optional "toughhead" (Jdec.null ()) ()
-        |> Jpipe.optional "underburn" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "abnet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "buckhorn" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "calciform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "chelophore" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cogitation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "decreeable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "despicable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "isodiazo" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jadedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "leptochlorite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nursling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palamedean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "photoheliograph" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pipewood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "roberd" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "statable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "superassume" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "syllabe" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "toughhead" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underburn" (Jdec.null ()) ())
 
 encodePulpitismClass : PulpitismClass -> Jenc.Value
 encodePulpitismClass x =
@@ -919,26 +925,26 @@ encodePyodermiaElement x = case x of
 pyodermiaClass : Jdec.Decoder PyodermiaClass
 pyodermiaClass =
     Jdec.succeed PyodermiaClass
-        |> Jpipe.optional "aphoristically" (Jdec.null ()) ()
-        |> Jpipe.optional "apophyllous" (Jdec.null ()) ()
-        |> Jpipe.optional "cognize" (Jdec.null ()) ()
-        |> Jpipe.optional "dermonosology" (Jdec.null ()) ()
-        |> Jpipe.optional "Gyppo" (Jdec.null ()) ()
-        |> Jpipe.optional "ither" (Jdec.null ()) ()
-        |> Jpipe.optional "juglandaceous" (Jdec.null ()) ()
-        |> Jpipe.optional "litho" (Jdec.null ()) ()
-        |> Jpipe.optional "macropterous" (Jdec.null ()) ()
-        |> Jpipe.optional "photographer" (Jdec.null ()) ()
-        |> Jpipe.optional "romancing" (Jdec.null ()) ()
-        |> Jpipe.optional "rumness" (Jdec.null ()) ()
-        |> Jpipe.optional "somniloquist" (Jdec.null ()) ()
-        |> Jpipe.optional "stressfully" (Jdec.null ()) ()
-        |> Jpipe.optional "tactically" (Jdec.null ()) ()
-        |> Jpipe.optional "tracheophony" (Jdec.null ()) ()
-        |> Jpipe.optional "unappositely" (Jdec.null ()) ()
-        |> Jpipe.optional "unclothedly" (Jdec.null ()) ()
-        |> Jpipe.optional "unimplied" (Jdec.null ()) ()
-        |> Jpipe.optional "unsyncopated" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "aphoristically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "apophyllous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cognize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dermonosology" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Gyppo" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ither" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "juglandaceous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "litho" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "macropterous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "photographer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "romancing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rumness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "somniloquist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stressfully" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tactically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tracheophony" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unappositely" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unclothedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unimplied" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsyncopated" (Jdec.null ()) ())
 
 encodePyodermiaClass : PyodermiaClass -> Jenc.Value
 encodePyodermiaClass x =
@@ -986,7 +992,7 @@ quebrachineClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeQuebrachineClass : QuebrachineClass -> Jenc.Value
 encodeQuebrachineClass x =
@@ -1027,31 +1033,31 @@ encodeRebarbative x = case x of
 reimagine : Jdec.Decoder Reimagine
 reimagine =
     Jdec.succeed Reimagine
-        |> Jpipe.optional "adducible" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "anabolin" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "brainy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "glaucine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "grobianism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Hermo" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "icteroid" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "immortal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "impetulant" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "irrigate" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "myxedema" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "onyx" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "repasser" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subdie" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "adducible" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "anabolin" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "brainy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "glaucine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "grobianism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Hermo" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "icteroid" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "immortal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "impetulant" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "irrigate" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "myxedema" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "onyx" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "repasser" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subdie" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeReimagine : Reimagine -> Jenc.Value
 encodeReimagine x =
@@ -1173,26 +1179,26 @@ encodeRewriteElement x = case x of
 rewriteClass : Jdec.Decoder RewriteClass
 rewriteClass =
     Jdec.succeed RewriteClass
-        |> Jpipe.optional "accountancy" (Jdec.null ()) ()
-        |> Jpipe.optional "cacotrophic" (Jdec.null ()) ()
-        |> Jpipe.optional "contest" (Jdec.null ()) ()
-        |> Jpipe.optional "couthily" (Jdec.null ()) ()
-        |> Jpipe.optional "falculate" (Jdec.null ()) ()
-        |> Jpipe.optional "foreseize" (Jdec.null ()) ()
-        |> Jpipe.optional "Hyades" (Jdec.null ()) ()
-        |> Jpipe.optional "lemnad" (Jdec.null ()) ()
-        |> Jpipe.optional "monotheistically" (Jdec.null ()) ()
-        |> Jpipe.optional "nonflying" (Jdec.null ()) ()
-        |> Jpipe.optional "Ptenoglossa" (Jdec.null ()) ()
-        |> Jpipe.optional "repatch" (Jdec.null ()) ()
-        |> Jpipe.optional "rodman" (Jdec.null ()) ()
-        |> Jpipe.optional "strung" (Jdec.null ()) ()
-        |> Jpipe.optional "titmal" (Jdec.null ()) ()
-        |> Jpipe.optional "twalpennyworth" (Jdec.null ()) ()
-        |> Jpipe.optional "unblamable" (Jdec.null ()) ()
-        |> Jpipe.optional "vertical" (Jdec.null ()) ()
-        |> Jpipe.optional "Whiggification" (Jdec.null ()) ()
-        |> Jpipe.optional "yardman" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "accountancy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cacotrophic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "contest" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "couthily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "falculate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "foreseize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hyades" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lemnad" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monotheistically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonflying" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ptenoglossa" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "repatch" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rodman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "strung" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "titmal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "twalpennyworth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unblamable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vertical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Whiggification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "yardman" (Jdec.null ()) ())
 
 encodeRewriteClass : RewriteClass -> Jenc.Value
 encodeRewriteClass x =
@@ -1248,26 +1254,26 @@ encodeSantirElement x = case x of
 santirClass : Jdec.Decoder SantirClass
 santirClass =
     Jdec.succeed SantirClass
-        |> Jpipe.optional "admiredly" (Jdec.null ()) ()
-        |> Jpipe.optional "demicaponier" (Jdec.null ()) ()
-        |> Jpipe.optional "epitympanic" (Jdec.null ()) ()
-        |> Jpipe.optional "investitor" (Jdec.null ()) ()
-        |> Jpipe.optional "lupiform" (Jdec.null ()) ()
-        |> Jpipe.optional "monoflagellate" (Jdec.null ()) ()
-        |> Jpipe.optional "paleoethnic" (Jdec.null ()) ()
-        |> Jpipe.optional "prediscountable" (Jdec.null ()) ()
-        |> Jpipe.optional "rhetoricals" (Jdec.null ()) ()
-        |> Jpipe.optional "roomth" (Jdec.null ()) ()
-        |> Jpipe.optional "saccharose" (Jdec.null ()) ()
-        |> Jpipe.optional "septonasal" (Jdec.null ()) ()
-        |> Jpipe.optional "serpenticide" (Jdec.null ()) ()
-        |> Jpipe.optional "setarious" (Jdec.null ()) ()
-        |> Jpipe.optional "spaework" (Jdec.null ()) ()
-        |> Jpipe.optional "stylite" (Jdec.null ()) ()
-        |> Jpipe.optional "Suessiones" (Jdec.null ()) ()
-        |> Jpipe.optional "timelily" (Jdec.null ()) ()
-        |> Jpipe.optional "unprofaned" (Jdec.null ()) ()
-        |> Jpipe.optional "vorticular" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "admiredly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "demicaponier" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "epitympanic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "investitor" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lupiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monoflagellate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "paleoethnic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prediscountable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rhetoricals" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "roomth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "saccharose" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "septonasal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "serpenticide" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "setarious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "spaework" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stylite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Suessiones" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "timelily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unprofaned" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vorticular" (Jdec.null ()) ())
 
 encodeSantirClass : SantirClass -> Jenc.Value
 encodeSantirClass x =
@@ -1323,31 +1329,31 @@ encodeSaxtenElement x = case x of
 saxtenClass : Jdec.Decoder SaxtenClass
 saxtenClass =
     Jdec.succeed SaxtenClass
-        |> Jpipe.optional "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "flix" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "germanely" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "inhume" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lepidote" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nondeist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sancyite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tibiad" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "transonic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trunchman" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "urger" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "flix" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "germanely" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "inhume" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lepidote" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nondeist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sancyite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tibiad" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "transonic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trunchman" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "urger" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeSaxtenClass : SaxtenClass -> Jenc.Value
 encodeSaxtenClass x =
@@ -1382,26 +1388,26 @@ encodeSaxtenClass x =
 scatty : Jdec.Decoder Scatty
 scatty =
     Jdec.succeed Scatty
-        |> Jpipe.optional "aeriferous" (Jdec.null ()) ()
-        |> Jpipe.optional "antical" (Jdec.null ()) ()
-        |> Jpipe.optional "antighostism" (Jdec.null ()) ()
-        |> Jpipe.optional "arcanum" (Jdec.null ()) ()
-        |> Jpipe.optional "autotrophy" (Jdec.null ()) ()
-        |> Jpipe.optional "baronial" (Jdec.null ()) ()
-        |> Jpipe.optional "caffeine" (Jdec.null ()) ()
-        |> Jpipe.optional "gorgoniacean" (Jdec.null ()) ()
-        |> Jpipe.optional "heroical" (Jdec.null ()) ()
-        |> Jpipe.optional "hydropical" (Jdec.null ()) ()
-        |> Jpipe.optional "mechanology" (Jdec.null ()) ()
-        |> Jpipe.optional "musicopoetic" (Jdec.null ()) ()
-        |> Jpipe.optional "officiality" (Jdec.null ()) ()
-        |> Jpipe.optional "oftentimes" (Jdec.null ()) ()
-        |> Jpipe.optional "ophthalmotonometer" (Jdec.null ()) ()
-        |> Jpipe.optional "reflectively" (Jdec.null ()) ()
-        |> Jpipe.optional "springer" (Jdec.null ()) ()
-        |> Jpipe.optional "Tabasco" (Jdec.null ()) ()
-        |> Jpipe.optional "teleianthous" (Jdec.null ()) ()
-        |> Jpipe.optional "uncombated" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "aeriferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antighostism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "arcanum" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "autotrophy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "baronial" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "caffeine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gorgoniacean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heroical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hydropical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mechanology" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "musicopoetic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "officiality" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "oftentimes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ophthalmotonometer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reflectively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "springer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tabasco" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "teleianthous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncombated" (Jdec.null ()) ())
 
 encodeScatty : Scatty -> Jenc.Value
 encodeScatty x =
@@ -1497,26 +1503,26 @@ encodeSisteringElement x = case x of
 sisteringClass : Jdec.Decoder SisteringClass
 sisteringClass =
     Jdec.succeed SisteringClass
-        |> Jpipe.optional "amphicarpic" (Jdec.null ()) ()
-        |> Jpipe.optional "Chianti" (Jdec.null ()) ()
-        |> Jpipe.optional "frigorific" (Jdec.null ()) ()
-        |> Jpipe.optional "Haplomi" (Jdec.null ()) ()
-        |> Jpipe.optional "hyperkinesis" (Jdec.null ()) ()
-        |> Jpipe.optional "laudable" (Jdec.null ()) ()
-        |> Jpipe.optional "madwoman" (Jdec.null ()) ()
-        |> Jpipe.optional "maimedly" (Jdec.null ()) ()
-        |> Jpipe.optional "Micropterygidae" (Jdec.null ()) ()
-        |> Jpipe.optional "microrhabdus" (Jdec.null ()) ()
-        |> Jpipe.optional "nondense" (Jdec.null ()) ()
-        |> Jpipe.optional "phlebemphraxis" (Jdec.null ()) ()
-        |> Jpipe.optional "redsear" (Jdec.null ()) ()
-        |> Jpipe.optional "schismatical" (Jdec.null ()) ()
-        |> Jpipe.optional "tartryl" (Jdec.null ()) ()
-        |> Jpipe.optional "unabhorred" (Jdec.null ()) ()
-        |> Jpipe.optional "undeliberateness" (Jdec.null ()) ()
-        |> Jpipe.optional "unmixable" (Jdec.null ()) ()
-        |> Jpipe.optional "untruckling" (Jdec.null ()) ()
-        |> Jpipe.optional "vineal" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "amphicarpic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Chianti" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "frigorific" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Haplomi" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hyperkinesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laudable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "madwoman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "maimedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Micropterygidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "microrhabdus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nondense" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phlebemphraxis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "redsear" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "schismatical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tartryl" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unabhorred" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undeliberateness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmixable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "untruckling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vineal" (Jdec.null ()) ())
 
 encodeSisteringClass : SisteringClass -> Jenc.Value
 encodeSisteringClass x =
@@ -1546,31 +1552,31 @@ encodeSisteringClass x =
 staghunting : Jdec.Decoder Staghunting
 staghunting =
     Jdec.succeed Staghunting
-        |> Jpipe.optional "calorimetric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "canid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ditriglyphic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "floriferousness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gamelike" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "grig" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "interloan" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lithotomy" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "loric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "membranogenic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "overtrump" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scotino" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "seasonable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sephen" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "stigmarioid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tired" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "trifid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undefeatedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ungirlish" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "calorimetric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "canid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ditriglyphic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "floriferousness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gamelike" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "grig" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "interloan" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lithotomy" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "loric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "membranogenic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "overtrump" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scotino" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "seasonable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sephen" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "stigmarioid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tired" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "trifid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undefeatedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ungirlish" (Jdec.nullable Jdec.int) Nothing)
 
 encodeStaghunting : Staghunting -> Jenc.Value
 encodeStaghunting x =
@@ -1655,31 +1661,31 @@ encodeStrenuosityElement x = case x of
 strenuosityClass : Jdec.Decoder StrenuosityClass
 strenuosityClass =
     Jdec.succeed StrenuosityClass
-        |> Jpipe.optional "bliss" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "buccate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "bulletproof" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "crumblingness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "engagedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fightable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hoariness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "hypopodium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "luxurist" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mechanician" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Onopordon" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "podgily" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "reformableness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scatterbrains" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "seminuria" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Sodomite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tramp" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undueness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "worthily" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Yankeeist" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "bliss" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "buccate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "bulletproof" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "crumblingness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "engagedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fightable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hoariness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "hypopodium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "luxurist" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mechanician" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Onopordon" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "podgily" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "reformableness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scatterbrains" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "seminuria" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Sodomite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tramp" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undueness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "worthily" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Yankeeist" (Jdec.nullable Jdec.int) Nothing)
 
 encodeStrenuosityClass : StrenuosityClass -> Jenc.Value
 encodeStrenuosityClass x =
@@ -1778,31 +1784,31 @@ encodeTruantcyElement x = case x of
 truantcyClass : Jdec.Decoder TruantcyClass
 truantcyClass =
     Jdec.succeed TruantcyClass
-        |> Jpipe.optional "alfiona" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bungey" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chorology" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enmarble" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Epeira" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "germination" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "lev" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mouthing" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "philliloo" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "planetal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "poney" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "punctualist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "skelder" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Yuman" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "alfiona" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bungey" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chorology" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enmarble" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Epeira" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "germination" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "lev" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mouthing" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "philliloo" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "planetal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "poney" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "punctualist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "skelder" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Yuman" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeTruantcyClass : TruantcyClass -> Jenc.Value
 encodeTruantcyClass x =
@@ -1905,31 +1911,31 @@ encodeUnimpeachablyElement x = case x of
 unimpeachablyClass : Jdec.Decoder UnimpeachablyClass
 unimpeachablyClass =
     Jdec.succeed UnimpeachablyClass
-        |> Jpipe.optional "acerin" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Bobadil" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "conversational" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "demiowl" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ectorhinal" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gamblesomeness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "irrorate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "kindergartening" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lateritic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mespil" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "misconfiguration" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "planometry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Quiina" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Robert" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rot" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "subcinctorium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tussocker" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ultraproud" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsuggestedness" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "acerin" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Bobadil" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "conversational" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "demiowl" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ectorhinal" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gamblesomeness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "irrorate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "kindergartening" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lateritic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mespil" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "misconfiguration" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "planometry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Quiina" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Robert" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rot" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "subcinctorium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tussocker" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ultraproud" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsuggestedness" (Jdec.nullable Jdec.int) Nothing)
 
 encodeUnimpeachablyClass : UnimpeachablyClass -> Jenc.Value
 encodeUnimpeachablyClass x =
@@ -2034,26 +2040,26 @@ encodeUnstressedElement x = case x of
 unstressedClass : Jdec.Decoder UnstressedClass
 unstressedClass =
     Jdec.succeed UnstressedClass
-        |> Jpipe.optional "Alain" (Jdec.null ()) ()
-        |> Jpipe.optional "Amphirhina" (Jdec.null ()) ()
-        |> Jpipe.optional "antimachinery" (Jdec.null ()) ()
-        |> Jpipe.optional "coldish" (Jdec.null ()) ()
-        |> Jpipe.optional "crantara" (Jdec.null ()) ()
-        |> Jpipe.optional "distinguishing" (Jdec.null ()) ()
-        |> Jpipe.optional "elytroposis" (Jdec.null ()) ()
-        |> Jpipe.optional "gentianwort" (Jdec.null ()) ()
-        |> Jpipe.optional "heliosis" (Jdec.null ()) ()
-        |> Jpipe.optional "instrumental" (Jdec.null ()) ()
-        |> Jpipe.optional "introinflection" (Jdec.null ()) ()
-        |> Jpipe.optional "kala" (Jdec.null ()) ()
-        |> Jpipe.optional "Lincolnian" (Jdec.null ()) ()
-        |> Jpipe.optional "metad" (Jdec.null ()) ()
-        |> Jpipe.optional "Sarcophilus" (Jdec.null ()) ()
-        |> Jpipe.optional "swingingly" (Jdec.null ()) ()
-        |> Jpipe.optional "unconformity" (Jdec.null ()) ()
-        |> Jpipe.optional "undecreed" (Jdec.null ()) ()
-        |> Jpipe.optional "venerable" (Jdec.null ()) ()
-        |> Jpipe.optional "vowellessness" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Alain" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Amphirhina" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antimachinery" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coldish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "crantara" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "distinguishing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "elytroposis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gentianwort" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heliosis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "instrumental" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "introinflection" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kala" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lincolnian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metad" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Sarcophilus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "swingingly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unconformity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undecreed" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "venerable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vowellessness" (Jdec.null ()) ())
 
 encodeUnstressedClass : UnstressedClass -> Jenc.Value
 encodeUnstressedClass x =
@@ -2149,26 +2155,26 @@ encodeWrothyElement x = case x of
 wrothyClass : Jdec.Decoder WrothyClass
 wrothyClass =
     Jdec.succeed WrothyClass
-        |> Jpipe.optional "Aeschynanthus" (Jdec.null ()) ()
-        |> Jpipe.optional "aquiferous" (Jdec.null ()) ()
-        |> Jpipe.optional "cheapener" (Jdec.null ()) ()
-        |> Jpipe.optional "enumeration" (Jdec.null ()) ()
-        |> Jpipe.optional "Ephesine" (Jdec.null ()) ()
-        |> Jpipe.optional "escadrille" (Jdec.null ()) ()
-        |> Jpipe.optional "estrous" (Jdec.null ()) ()
-        |> Jpipe.optional "interestedly" (Jdec.null ()) ()
-        |> Jpipe.optional "katakinetomer" (Jdec.null ()) ()
-        |> Jpipe.optional "mortification" (Jdec.null ()) ()
-        |> Jpipe.optional "morula" (Jdec.null ()) ()
-        |> Jpipe.optional "orthosymmetrical" (Jdec.null ()) ()
-        |> Jpipe.optional "overbark" (Jdec.null ()) ()
-        |> Jpipe.optional "politist" (Jdec.null ()) ()
-        |> Jpipe.optional "qualified" (Jdec.null ()) ()
-        |> Jpipe.optional "sphenomalar" (Jdec.null ()) ()
-        |> Jpipe.optional "throatful" (Jdec.null ()) ()
-        |> Jpipe.optional "transhumance" (Jdec.null ()) ()
-        |> Jpipe.optional "triandrian" (Jdec.null ()) ()
-        |> Jpipe.optional "unbooked" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Aeschynanthus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aquiferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cheapener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enumeration" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ephesine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "escadrille" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "estrous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "interestedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "katakinetomer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mortification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "morula" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "orthosymmetrical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overbark" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "politist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "qualified" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sphenomalar" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "throatful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "transhumance" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "triandrian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unbooked" (Jdec.null ()) ())
 
 encodeWrothyClass : WrothyClass -> Jenc.Value
 encodeWrothyClass x =
diff --git a/base/elm/test/inputs/json/priority/combinations4.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/combinations4.json/default/QuickType.elm
index 0586064..7505637 100644
--- a/base/elm/test/inputs/json/priority/combinations4.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combinations4.json/default/QuickType.elm
@@ -711,6 +711,12 @@ type alias WrothyClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -857,26 +863,26 @@ encodePulpitismElement x = case x of
 pulpitismClass : Jdec.Decoder PulpitismClass
 pulpitismClass =
     Jdec.succeed PulpitismClass
-        |> Jpipe.optional "abnet" (Jdec.null ()) ()
-        |> Jpipe.optional "buckhorn" (Jdec.null ()) ()
-        |> Jpipe.optional "calciform" (Jdec.null ()) ()
-        |> Jpipe.optional "chelophore" (Jdec.null ()) ()
-        |> Jpipe.optional "cogitation" (Jdec.null ()) ()
-        |> Jpipe.optional "decreeable" (Jdec.null ()) ()
-        |> Jpipe.optional "despicable" (Jdec.null ()) ()
-        |> Jpipe.optional "isodiazo" (Jdec.null ()) ()
-        |> Jpipe.optional "jadedly" (Jdec.null ()) ()
-        |> Jpipe.optional "leptochlorite" (Jdec.null ()) ()
-        |> Jpipe.optional "nursling" (Jdec.null ()) ()
-        |> Jpipe.optional "palamedean" (Jdec.null ()) ()
-        |> Jpipe.optional "photoheliograph" (Jdec.null ()) ()
-        |> Jpipe.optional "pipewood" (Jdec.null ()) ()
-        |> Jpipe.optional "roberd" (Jdec.null ()) ()
-        |> Jpipe.optional "statable" (Jdec.null ()) ()
-        |> Jpipe.optional "superassume" (Jdec.null ()) ()
-        |> Jpipe.optional "syllabe" (Jdec.null ()) ()
-        |> Jpipe.optional "toughhead" (Jdec.null ()) ()
-        |> Jpipe.optional "underburn" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "abnet" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "buckhorn" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "calciform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "chelophore" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cogitation" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "decreeable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "despicable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "isodiazo" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "jadedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "leptochlorite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nursling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "palamedean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "photoheliograph" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "pipewood" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "roberd" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "statable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "superassume" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "syllabe" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "toughhead" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "underburn" (Jdec.null ()) ())
 
 encodePulpitismClass : PulpitismClass -> Jenc.Value
 encodePulpitismClass x =
@@ -918,26 +924,26 @@ encodePyodermiaElement x = case x of
 pyodermiaClass : Jdec.Decoder PyodermiaClass
 pyodermiaClass =
     Jdec.succeed PyodermiaClass
-        |> Jpipe.optional "aphoristically" (Jdec.null ()) ()
-        |> Jpipe.optional "apophyllous" (Jdec.null ()) ()
-        |> Jpipe.optional "cognize" (Jdec.null ()) ()
-        |> Jpipe.optional "dermonosology" (Jdec.null ()) ()
-        |> Jpipe.optional "Gyppo" (Jdec.null ()) ()
-        |> Jpipe.optional "ither" (Jdec.null ()) ()
-        |> Jpipe.optional "juglandaceous" (Jdec.null ()) ()
-        |> Jpipe.optional "litho" (Jdec.null ()) ()
-        |> Jpipe.optional "macropterous" (Jdec.null ()) ()
-        |> Jpipe.optional "photographer" (Jdec.null ()) ()
-        |> Jpipe.optional "romancing" (Jdec.null ()) ()
-        |> Jpipe.optional "rumness" (Jdec.null ()) ()
-        |> Jpipe.optional "somniloquist" (Jdec.null ()) ()
-        |> Jpipe.optional "stressfully" (Jdec.null ()) ()
-        |> Jpipe.optional "tactically" (Jdec.null ()) ()
-        |> Jpipe.optional "tracheophony" (Jdec.null ()) ()
-        |> Jpipe.optional "unappositely" (Jdec.null ()) ()
-        |> Jpipe.optional "unclothedly" (Jdec.null ()) ()
-        |> Jpipe.optional "unimplied" (Jdec.null ()) ()
-        |> Jpipe.optional "unsyncopated" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "aphoristically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "apophyllous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cognize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "dermonosology" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Gyppo" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ither" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "juglandaceous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "litho" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "macropterous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "photographer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "romancing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rumness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "somniloquist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stressfully" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tactically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tracheophony" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unappositely" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unclothedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unimplied" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unsyncopated" (Jdec.null ()) ())
 
 encodePyodermiaClass : PyodermiaClass -> Jenc.Value
 encodePyodermiaClass x =
@@ -985,7 +991,7 @@ quebrachineClass =
         |> Jpipe.required "Chirotherium" Jdec.int
         |> Jpipe.required "disdiapason" Jdec.string
         |> Jpipe.required "homocerc" Jdec.bool
-        |> Jpipe.optional "nonbookish" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.null ()) ())
 
 encodeQuebrachineClass : QuebrachineClass -> Jenc.Value
 encodeQuebrachineClass x =
@@ -1026,31 +1032,31 @@ encodeRebarbative x = case x of
 reimagine : Jdec.Decoder Reimagine
 reimagine =
     Jdec.succeed Reimagine
-        |> Jpipe.optional "adducible" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "anabolin" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "brainy" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "glaucine" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "grobianism" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Hermo" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "icteroid" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "immortal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "impetulant" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "irrigate" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "myxedema" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "onyx" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "repasser" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subdie" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "adducible" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "anabolin" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "brainy" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chrysamine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "fluxweed" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "glaucine" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "grobianism" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Hermo" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hieroglyphist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "icteroid" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "immortal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "impetulant" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "irrigate" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "myxedema" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "onyx" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "repasser" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "septomarginal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subdie" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tibiometatarsal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "waltzlike" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeReimagine : Reimagine -> Jenc.Value
 encodeReimagine x =
@@ -1172,26 +1178,26 @@ encodeRewriteElement x = case x of
 rewriteClass : Jdec.Decoder RewriteClass
 rewriteClass =
     Jdec.succeed RewriteClass
-        |> Jpipe.optional "accountancy" (Jdec.null ()) ()
-        |> Jpipe.optional "cacotrophic" (Jdec.null ()) ()
-        |> Jpipe.optional "contest" (Jdec.null ()) ()
-        |> Jpipe.optional "couthily" (Jdec.null ()) ()
-        |> Jpipe.optional "falculate" (Jdec.null ()) ()
-        |> Jpipe.optional "foreseize" (Jdec.null ()) ()
-        |> Jpipe.optional "Hyades" (Jdec.null ()) ()
-        |> Jpipe.optional "lemnad" (Jdec.null ()) ()
-        |> Jpipe.optional "monotheistically" (Jdec.null ()) ()
-        |> Jpipe.optional "nonflying" (Jdec.null ()) ()
-        |> Jpipe.optional "Ptenoglossa" (Jdec.null ()) ()
-        |> Jpipe.optional "repatch" (Jdec.null ()) ()
-        |> Jpipe.optional "rodman" (Jdec.null ()) ()
-        |> Jpipe.optional "strung" (Jdec.null ()) ()
-        |> Jpipe.optional "titmal" (Jdec.null ()) ()
-        |> Jpipe.optional "twalpennyworth" (Jdec.null ()) ()
-        |> Jpipe.optional "unblamable" (Jdec.null ()) ()
-        |> Jpipe.optional "vertical" (Jdec.null ()) ()
-        |> Jpipe.optional "Whiggification" (Jdec.null ()) ()
-        |> Jpipe.optional "yardman" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "accountancy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cacotrophic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "contest" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "couthily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "falculate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "foreseize" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Hyades" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lemnad" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monotheistically" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nonflying" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ptenoglossa" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "repatch" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rodman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "strung" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "titmal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "twalpennyworth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unblamable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vertical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Whiggification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "yardman" (Jdec.null ()) ())
 
 encodeRewriteClass : RewriteClass -> Jenc.Value
 encodeRewriteClass x =
@@ -1247,26 +1253,26 @@ encodeSantirElement x = case x of
 santirClass : Jdec.Decoder SantirClass
 santirClass =
     Jdec.succeed SantirClass
-        |> Jpipe.optional "admiredly" (Jdec.null ()) ()
-        |> Jpipe.optional "demicaponier" (Jdec.null ()) ()
-        |> Jpipe.optional "epitympanic" (Jdec.null ()) ()
-        |> Jpipe.optional "investitor" (Jdec.null ()) ()
-        |> Jpipe.optional "lupiform" (Jdec.null ()) ()
-        |> Jpipe.optional "monoflagellate" (Jdec.null ()) ()
-        |> Jpipe.optional "paleoethnic" (Jdec.null ()) ()
-        |> Jpipe.optional "prediscountable" (Jdec.null ()) ()
-        |> Jpipe.optional "rhetoricals" (Jdec.null ()) ()
-        |> Jpipe.optional "roomth" (Jdec.null ()) ()
-        |> Jpipe.optional "saccharose" (Jdec.null ()) ()
-        |> Jpipe.optional "septonasal" (Jdec.null ()) ()
-        |> Jpipe.optional "serpenticide" (Jdec.null ()) ()
-        |> Jpipe.optional "setarious" (Jdec.null ()) ()
-        |> Jpipe.optional "spaework" (Jdec.null ()) ()
-        |> Jpipe.optional "stylite" (Jdec.null ()) ()
-        |> Jpipe.optional "Suessiones" (Jdec.null ()) ()
-        |> Jpipe.optional "timelily" (Jdec.null ()) ()
-        |> Jpipe.optional "unprofaned" (Jdec.null ()) ()
-        |> Jpipe.optional "vorticular" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "admiredly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "demicaponier" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "epitympanic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "investitor" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "lupiform" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "monoflagellate" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "paleoethnic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "prediscountable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "rhetoricals" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "roomth" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "saccharose" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "septonasal" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "serpenticide" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "setarious" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "spaework" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "stylite" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Suessiones" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "timelily" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unprofaned" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vorticular" (Jdec.null ()) ())
 
 encodeSantirClass : SantirClass -> Jenc.Value
 encodeSantirClass x =
@@ -1322,31 +1328,31 @@ encodeSaxtenElement x = case x of
 saxtenClass : Jdec.Decoder SaxtenClass
 saxtenClass =
     Jdec.succeed SaxtenClass
-        |> Jpipe.optional "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "flix" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "germanely" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "inhume" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "lepidote" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nondeist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "sancyite" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tibiad" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "transonic" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "trunchman" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "urger" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "algarrobilla" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bowgrace" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Centaurid" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "flix" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "germanely" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "inhume" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "lepidote" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "megalochirous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ninepenny" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nondeist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nymphaeaceous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "parietofrontal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "sancyite" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "subjectivist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tibiad" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "transonic" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "tripetalous" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "trunchman" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "urger" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "withdrawnness" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeSaxtenClass : SaxtenClass -> Jenc.Value
 encodeSaxtenClass x =
@@ -1381,26 +1387,26 @@ encodeSaxtenClass x =
 scatty : Jdec.Decoder Scatty
 scatty =
     Jdec.succeed Scatty
-        |> Jpipe.optional "aeriferous" (Jdec.null ()) ()
-        |> Jpipe.optional "antical" (Jdec.null ()) ()
-        |> Jpipe.optional "antighostism" (Jdec.null ()) ()
-        |> Jpipe.optional "arcanum" (Jdec.null ()) ()
-        |> Jpipe.optional "autotrophy" (Jdec.null ()) ()
-        |> Jpipe.optional "baronial" (Jdec.null ()) ()
-        |> Jpipe.optional "caffeine" (Jdec.null ()) ()
-        |> Jpipe.optional "gorgoniacean" (Jdec.null ()) ()
-        |> Jpipe.optional "heroical" (Jdec.null ()) ()
-        |> Jpipe.optional "hydropical" (Jdec.null ()) ()
-        |> Jpipe.optional "mechanology" (Jdec.null ()) ()
-        |> Jpipe.optional "musicopoetic" (Jdec.null ()) ()
-        |> Jpipe.optional "officiality" (Jdec.null ()) ()
-        |> Jpipe.optional "oftentimes" (Jdec.null ()) ()
-        |> Jpipe.optional "ophthalmotonometer" (Jdec.null ()) ()
-        |> Jpipe.optional "reflectively" (Jdec.null ()) ()
-        |> Jpipe.optional "springer" (Jdec.null ()) ()
-        |> Jpipe.optional "Tabasco" (Jdec.null ()) ()
-        |> Jpipe.optional "teleianthous" (Jdec.null ()) ()
-        |> Jpipe.optional "uncombated" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "aeriferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antighostism" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "arcanum" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "autotrophy" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "baronial" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "caffeine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gorgoniacean" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heroical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hydropical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mechanology" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "musicopoetic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "officiality" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "oftentimes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "ophthalmotonometer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "reflectively" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "springer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Tabasco" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "teleianthous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "uncombated" (Jdec.null ()) ())
 
 encodeScatty : Scatty -> Jenc.Value
 encodeScatty x =
@@ -1496,26 +1502,26 @@ encodeSisteringElement x = case x of
 sisteringClass : Jdec.Decoder SisteringClass
 sisteringClass =
     Jdec.succeed SisteringClass
-        |> Jpipe.optional "amphicarpic" (Jdec.null ()) ()
-        |> Jpipe.optional "Chianti" (Jdec.null ()) ()
-        |> Jpipe.optional "frigorific" (Jdec.null ()) ()
-        |> Jpipe.optional "Haplomi" (Jdec.null ()) ()
-        |> Jpipe.optional "hyperkinesis" (Jdec.null ()) ()
-        |> Jpipe.optional "laudable" (Jdec.null ()) ()
-        |> Jpipe.optional "madwoman" (Jdec.null ()) ()
-        |> Jpipe.optional "maimedly" (Jdec.null ()) ()
-        |> Jpipe.optional "Micropterygidae" (Jdec.null ()) ()
-        |> Jpipe.optional "microrhabdus" (Jdec.null ()) ()
-        |> Jpipe.optional "nondense" (Jdec.null ()) ()
-        |> Jpipe.optional "phlebemphraxis" (Jdec.null ()) ()
-        |> Jpipe.optional "redsear" (Jdec.null ()) ()
-        |> Jpipe.optional "schismatical" (Jdec.null ()) ()
-        |> Jpipe.optional "tartryl" (Jdec.null ()) ()
-        |> Jpipe.optional "unabhorred" (Jdec.null ()) ()
-        |> Jpipe.optional "undeliberateness" (Jdec.null ()) ()
-        |> Jpipe.optional "unmixable" (Jdec.null ()) ()
-        |> Jpipe.optional "untruckling" (Jdec.null ()) ()
-        |> Jpipe.optional "vineal" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "amphicarpic" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Chianti" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "frigorific" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Haplomi" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "hyperkinesis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "laudable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "madwoman" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "maimedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Micropterygidae" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "microrhabdus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nondense" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "phlebemphraxis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "redsear" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "schismatical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "tartryl" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unabhorred" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undeliberateness" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unmixable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "untruckling" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vineal" (Jdec.null ()) ())
 
 encodeSisteringClass : SisteringClass -> Jenc.Value
 encodeSisteringClass x =
@@ -1545,31 +1551,31 @@ encodeSisteringClass x =
 staghunting : Jdec.Decoder Staghunting
 staghunting =
     Jdec.succeed Staghunting
-        |> Jpipe.optional "calorimetric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "canid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ditriglyphic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "floriferousness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gamelike" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "grig" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "interloan" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lithotomy" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "loric" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "membranogenic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "overtrump" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scotino" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "seasonable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "sephen" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "stigmarioid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tired" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "trifid" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undefeatedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ungirlish" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "calorimetric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "canid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ditriglyphic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "floriferousness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gamelike" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "grig" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "interloan" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lithotomy" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "loric" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "membranocoriaceous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "membranogenic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "overtrump" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scotino" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "seasonable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "sephen" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "stigmarioid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tired" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "trifid" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undefeatedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ungirlish" (Jdec.nullable Jdec.int) Nothing)
 
 encodeStaghunting : Staghunting -> Jenc.Value
 encodeStaghunting x =
@@ -1654,31 +1660,31 @@ encodeStrenuosityElement x = case x of
 strenuosityClass : Jdec.Decoder StrenuosityClass
 strenuosityClass =
     Jdec.succeed StrenuosityClass
-        |> Jpipe.optional "bliss" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "buccate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "bulletproof" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "crumblingness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "engagedly" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "fightable" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "hoariness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "hypopodium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "luxurist" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mechanician" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Onopordon" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "podgily" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "reformableness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "scatterbrains" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "seminuria" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Sodomite" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tramp" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "undueness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "worthily" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Yankeeist" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "bliss" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "buccate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "bulletproof" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "crumblingness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "engagedly" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "fightable" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "hoariness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "hypopodium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "luxurist" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mechanician" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Onopordon" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "podgily" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "reformableness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "scatterbrains" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "seminuria" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Sodomite" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tramp" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "undueness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "worthily" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Yankeeist" (Jdec.nullable Jdec.int) Nothing)
 
 encodeStrenuosityClass : StrenuosityClass -> Jenc.Value
 encodeStrenuosityClass x =
@@ -1777,31 +1783,31 @@ encodeTruantcyElement x = case x of
 truantcyClass : Jdec.Decoder TruantcyClass
 truantcyClass =
     Jdec.succeed TruantcyClass
-        |> Jpipe.optional "alfiona" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "bungey" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chorology" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "enmarble" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Epeira" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "germination" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "lev" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "mouthing" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "philliloo" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "planetal" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "poney" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "punctualist" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "skelder" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "Yuman" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "alfiona" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "ascaridiasis" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "bungey" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "ceroxyle" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chorology" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "enmarble" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Epeira" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Eurylaimi" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "germination" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "hallelujah" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "lev" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "mouthing" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "philliloo" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "planetal" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "poney" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "punctualist" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "returnlessly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "skelder" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "windwaywardly" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "Yuman" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeTruantcyClass : TruantcyClass -> Jenc.Value
 encodeTruantcyClass x =
@@ -1904,31 +1910,31 @@ encodeUnimpeachablyElement x = case x of
 unimpeachablyClass : Jdec.Decoder UnimpeachablyClass
 unimpeachablyClass =
     Jdec.succeed UnimpeachablyClass
-        |> Jpipe.optional "acerin" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Bobadil" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "catharticalness" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "Chirotherium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "conversational" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "demiowl" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "disdiapason" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ectorhinal" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "gamblesomeness" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "homocerc" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "irrorate" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "kindergartening" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "lateritic" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "mespil" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "misconfiguration" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing
-        |> Jpipe.optional "planometry" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Quiina" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "Robert" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "rot" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "subcinctorium" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "tussocker" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "ultraproud" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "unsuggestedness" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "acerin" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Bobadil" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "catharticalness" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "Chirotherium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "chlorophylligenous" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "conversational" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "demiowl" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "disdiapason" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ectorhinal" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "gamblesomeness" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "homocerc" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "irrorate" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "kindergartening" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "lateritic" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "mespil" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "misconfiguration" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "nonbookish" (Jdec.nullable (Jdec.null ())) Nothing)
+        |> Jpipe.custom (optionalField "planometry" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Quiina" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "Robert" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "rot" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "subcinctorium" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "tussocker" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "ultraproud" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "unsuggestedness" (Jdec.nullable Jdec.int) Nothing)
 
 encodeUnimpeachablyClass : UnimpeachablyClass -> Jenc.Value
 encodeUnimpeachablyClass x =
@@ -2033,26 +2039,26 @@ encodeUnstressedElement x = case x of
 unstressedClass : Jdec.Decoder UnstressedClass
 unstressedClass =
     Jdec.succeed UnstressedClass
-        |> Jpipe.optional "Alain" (Jdec.null ()) ()
-        |> Jpipe.optional "Amphirhina" (Jdec.null ()) ()
-        |> Jpipe.optional "antimachinery" (Jdec.null ()) ()
-        |> Jpipe.optional "coldish" (Jdec.null ()) ()
-        |> Jpipe.optional "crantara" (Jdec.null ()) ()
-        |> Jpipe.optional "distinguishing" (Jdec.null ()) ()
-        |> Jpipe.optional "elytroposis" (Jdec.null ()) ()
-        |> Jpipe.optional "gentianwort" (Jdec.null ()) ()
-        |> Jpipe.optional "heliosis" (Jdec.null ()) ()
-        |> Jpipe.optional "instrumental" (Jdec.null ()) ()
-        |> Jpipe.optional "introinflection" (Jdec.null ()) ()
-        |> Jpipe.optional "kala" (Jdec.null ()) ()
-        |> Jpipe.optional "Lincolnian" (Jdec.null ()) ()
-        |> Jpipe.optional "metad" (Jdec.null ()) ()
-        |> Jpipe.optional "Sarcophilus" (Jdec.null ()) ()
-        |> Jpipe.optional "swingingly" (Jdec.null ()) ()
-        |> Jpipe.optional "unconformity" (Jdec.null ()) ()
-        |> Jpipe.optional "undecreed" (Jdec.null ()) ()
-        |> Jpipe.optional "venerable" (Jdec.null ()) ()
-        |> Jpipe.optional "vowellessness" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Alain" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Amphirhina" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "antimachinery" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "coldish" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "crantara" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "distinguishing" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "elytroposis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "gentianwort" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "heliosis" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "instrumental" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "introinflection" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "kala" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Lincolnian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "metad" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Sarcophilus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "swingingly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unconformity" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "undecreed" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "venerable" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "vowellessness" (Jdec.null ()) ())
 
 encodeUnstressedClass : UnstressedClass -> Jenc.Value
 encodeUnstressedClass x =
@@ -2148,26 +2154,26 @@ encodeWrothyElement x = case x of
 wrothyClass : Jdec.Decoder WrothyClass
 wrothyClass =
     Jdec.succeed WrothyClass
-        |> Jpipe.optional "Aeschynanthus" (Jdec.null ()) ()
-        |> Jpipe.optional "aquiferous" (Jdec.null ()) ()
-        |> Jpipe.optional "cheapener" (Jdec.null ()) ()
-        |> Jpipe.optional "enumeration" (Jdec.null ()) ()
-        |> Jpipe.optional "Ephesine" (Jdec.null ()) ()
-        |> Jpipe.optional "escadrille" (Jdec.null ()) ()
-        |> Jpipe.optional "estrous" (Jdec.null ()) ()
-        |> Jpipe.optional "interestedly" (Jdec.null ()) ()
-        |> Jpipe.optional "katakinetomer" (Jdec.null ()) ()
-        |> Jpipe.optional "mortification" (Jdec.null ()) ()
-        |> Jpipe.optional "morula" (Jdec.null ()) ()
-        |> Jpipe.optional "orthosymmetrical" (Jdec.null ()) ()
-        |> Jpipe.optional "overbark" (Jdec.null ()) ()
-        |> Jpipe.optional "politist" (Jdec.null ()) ()
-        |> Jpipe.optional "qualified" (Jdec.null ()) ()
-        |> Jpipe.optional "sphenomalar" (Jdec.null ()) ()
-        |> Jpipe.optional "throatful" (Jdec.null ()) ()
-        |> Jpipe.optional "transhumance" (Jdec.null ()) ()
-        |> Jpipe.optional "triandrian" (Jdec.null ()) ()
-        |> Jpipe.optional "unbooked" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "Aeschynanthus" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "aquiferous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "cheapener" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "enumeration" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "Ephesine" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "escadrille" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "estrous" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "interestedly" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "katakinetomer" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "mortification" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "morula" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "orthosymmetrical" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "overbark" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "politist" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "qualified" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "sphenomalar" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "throatful" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "transhumance" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "triandrian" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "unbooked" (Jdec.null ()) ())
 
 encodeWrothyClass : WrothyClass -> Jenc.Value
 encodeWrothyClass x =
diff --git a/base/elm/test/inputs/json/priority/combined-enum.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/combined-enum.json/default/QuickType.elm
index 406bfc2..a6c6ccd 100644
--- a/base/elm/test/inputs/json/priority/combined-enum.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/combined-enum.json/default/QuickType.elm
@@ -39,6 +39,12 @@ type X
     | Two
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/empty-enum.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/empty-enum.json/default/QuickType.elm
index e253104..160b5bd 100644
--- a/base/elm/test/inputs/json/priority/empty-enum.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/empty-enum.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias Foo =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -50,7 +56,7 @@ encodeQuickType x =
 foo : Jdec.Decoder Foo
 foo =
     Jdec.succeed Foo
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing)
 
 encodeFoo : Foo -> Jenc.Value
 encodeFoo x =
diff --git a/base/elm/test/inputs/json/priority/identifiers.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/identifiers.json/default/QuickType.elm
index 1356b5e..e223d41 100644
--- a/base/elm/test/inputs/json/priority/identifiers.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/identifiers.json/default/QuickType.elm
@@ -65,6 +65,12 @@ type alias ThisIsAToughOne =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/issue2680-object-array.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/issue2680-object-array.json/default/QuickType.elm
index abbfc80..861a73c 100644
--- a/base/elm/test/inputs/json/priority/issue2680-object-array.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/issue2680-object-array.json/default/QuickType.elm
@@ -30,6 +30,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/priority/issue2680-scalar-array.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/issue2680-scalar-array.json/default/QuickType.elm
index a89e8c5..419965b 100644
--- a/base/elm/test/inputs/json/priority/issue2680-scalar-array.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/issue2680-scalar-array.json/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = List Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list Jdec.int
diff --git a/base/elm/test/inputs/json/priority/keywords.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/keywords.json/default/QuickType.elm
index 91c6222..77707ee 100644
--- a/base/elm/test/inputs/json/priority/keywords.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/keywords.json/default/QuickType.elm
@@ -1731,6 +1731,12 @@ type alias Yield =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/QuickType.elm
index a53bdc4..d3c1c6c 100644
--- a/base/elm/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type CategoryEnum
     | Category
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
diff --git a/base/elm/test/inputs/json/priority/name-style.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/name-style.json/default/QuickType.elm
index e614b20..9510a0a 100644
--- a/base/elm/test/inputs/json/priority/name-style.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/name-style.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/nbl-stats.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/nbl-stats.json/default/QuickType.elm
index 4b05b2d..021b3ab 100644
--- a/base/elm/test/inputs/json/priority/nbl-stats.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/nbl-stats.json/default/QuickType.elm
@@ -384,6 +384,12 @@ type alias Totallds =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -535,15 +541,15 @@ pbp : Jdec.Decoder Pbp
 pbp =
     Jdec.succeed Pbp
         |> Jpipe.required "actionType" actionType
-        |> Jpipe.optional "familyName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing
-        |> Jpipe.optional "firstName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing
+        |> Jpipe.custom (optionalField "familyName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "firstName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing)
         |> Jpipe.required "gt" Jdec.string
-        |> Jpipe.optional "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing
-        |> Jpipe.optional "internationalFirstName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing
+        |> Jpipe.custom (optionalField "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "internationalFirstName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing)
         |> Jpipe.required "lead" Jdec.int
         |> Jpipe.required "period" Jdec.int
         |> Jpipe.required "periodType" perType
@@ -552,7 +558,7 @@ pbp =
         |> Jpipe.required "qualifier" Jdec.string
         |> Jpipe.required "s1" Jdec.int
         |> Jpipe.required "s2" Jdec.int
-        |> Jpipe.optional "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing
+        |> Jpipe.custom (optionalField "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing)
         |> Jpipe.required "scoring" Jdec.int
         |> Jpipe.required "shirtNumber" Jdec.string
         |> Jpipe.required "subType" Jdec.string
@@ -727,26 +733,26 @@ encodeScoreboardNameEnum x = case x of
 scorer : Jdec.Decoder Scorer
 scorer =
     Jdec.succeed Scorer
-        |> Jpipe.optional "familyName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing
-        |> Jpipe.optional "firstName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing
-        |> Jpipe.optional "gt" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing
-        |> Jpipe.optional "internationalFirstName" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing
-        |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "per" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "perType" (Jdec.nullable perType) Nothing
-        |> Jpipe.optional "player" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "familyName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "familyNameInitial" (Jdec.nullable familyNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "firstName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "firstNameInitial" (Jdec.nullable firstNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "gt" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "internationalFamilyName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "internationalFamilyNameInitial" (Jdec.nullable familyNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "internationalFirstName" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "internationalFirstNameInitial" (Jdec.nullable firstNameInitial) Nothing)
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "per" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "perType" (Jdec.nullable perType) Nothing)
+        |> Jpipe.custom (optionalField "player" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "pno" Jdec.int
-        |> Jpipe.optional "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing
+        |> Jpipe.custom (optionalField "scoreboardName" (Jdec.nullable scoreboardNameEnum) Nothing)
         |> Jpipe.required "shirtNumber" Jdec.string
-        |> Jpipe.optional "summary" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "times" (Jdec.nullable (Jdec.list time)) Nothing
+        |> Jpipe.custom (optionalField "summary" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "times" (Jdec.nullable (Jdec.list time)) Nothing)
         |> Jpipe.required "tno" Jdec.int
-        |> Jpipe.optional "tot" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "tot" (Jdec.nullable Jdec.int) Nothing)
 
 encodeScorer : Scorer -> Jenc.Value
 encodeScorer x =
@@ -961,8 +967,8 @@ pl : Jdec.Decoder Pl
 pl =
     Jdec.succeed Pl
         |> Jpipe.required "active" Jdec.int
-        |> Jpipe.optional "captain" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "comp" (Jdec.nullable comp) Nothing
+        |> Jpipe.custom (optionalField "captain" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "comp" (Jdec.nullable comp) Nothing)
         |> Jpipe.required "eff_1" Jdec.int
         |> Jpipe.required "eff_2" Jdec.int
         |> Jpipe.required "eff_3" Jdec.float
diff --git a/base/elm/test/inputs/json/priority/nested-objects.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/nested-objects.json/default/QuickType.elm
index 392a02e..7b4fab7 100644
--- a/base/elm/test/inputs/json/priority/nested-objects.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/nested-objects.json/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/no-classes.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/no-classes.json/default/QuickType.elm
index 3dbb5e5..3f93d89 100644
--- a/base/elm/test/inputs/json/priority/no-classes.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/no-classes.json/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.int
diff --git a/base/elm/test/inputs/json/priority/nst-test-suite.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/nst-test-suite.json/default/QuickType.elm
index bed6c16..cde57c3 100644
--- a/base/elm/test/inputs/json/priority/nst-test-suite.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/nst-test-suite.json/default/QuickType.elm
@@ -184,6 +184,12 @@ type alias YObjectWithNewlinesJSON =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -277,7 +283,7 @@ quickType =
         |> Jpipe.required "y_structure_lonely_false.json" Jdec.bool
         |> Jpipe.required "y_structure_lonely_int.json" Jdec.int
         |> Jpipe.required "y_structure_lonely_negative_real.json" Jdec.float
-        |> Jpipe.optional "y_structure_lonely_null.json" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "y_structure_lonely_null.json" (Jdec.null ()) ())
         |> Jpipe.required "y_structure_lonely_string.json" Jdec.string
         |> Jpipe.required "y_structure_lonely_true.json" Jdec.bool
         |> Jpipe.required "y_structure_string_empty.json" Jdec.string
diff --git a/base/elm/test/inputs/json/priority/number-map.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/number-map.json/default/QuickType.elm
index 62be42f..5f50911 100644
--- a/base/elm/test/inputs/json/priority/number-map.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/number-map.json/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/omit-empty.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/omit-empty.json/default/QuickType.elm
index 87931b5..b43cdbd 100644
--- a/base/elm/test/inputs/json/priority/omit-empty.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/omit-empty.json/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Result =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -52,7 +58,7 @@ result : Jdec.Decoder Result
 result =
     Jdec.succeed Result
         |> Jpipe.required "age" Jdec.int
-        |> Jpipe.optional "name" (Jdec.nullable (Jdec.null ())) Nothing
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable (Jdec.null ())) Nothing)
 
 encodeResult : Result -> Jenc.Value
 encodeResult x =
diff --git a/base/elm/test/inputs/json/priority/optional-union.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/optional-union.json/default/QuickType.elm
index 471e773..774bf7c 100644
--- a/base/elm/test/inputs/json/priority/optional-union.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/optional-union.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type A
     | StringInA String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -45,7 +51,7 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r)
 quickTypeElement : Jdec.Decoder QuickTypeElement
 quickTypeElement =
     Jdec.succeed QuickTypeElement
-        |> Jpipe.optional "a" (Jdec.nullable a) Nothing
+        |> Jpipe.custom (optionalField "a" (Jdec.nullable a) Nothing)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
 encodeQuickTypeElement x =
diff --git a/base/elm/test/inputs/json/priority/php-mixed-union.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/php-mixed-union.json/default/QuickType.elm
index 146ee0c..9c0fa7c 100644
--- a/base/elm/test/inputs/json/priority/php-mixed-union.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/php-mixed-union.json/default/QuickType.elm
@@ -40,6 +40,12 @@ type alias MixedClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/php-validation.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/php-validation.json/default/QuickType.elm
index 586c997..f9fb61b 100644
--- a/base/elm/test/inputs/json/priority/php-validation.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/php-validation.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/simple-identifiers.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/simple-identifiers.json/default/QuickType.elm
index 4c18937..34ceef4 100644
--- a/base/elm/test/inputs/json/priority/simple-identifiers.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/simple-identifiers.json/default/QuickType.elm
@@ -35,6 +35,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/union-constructor-clash.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/union-constructor-clash.json/default/QuickType.elm
index 39c661e..497beee 100644
--- a/base/elm/test/inputs/json/priority/union-constructor-clash.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/union-constructor-clash.json/default/QuickType.elm
@@ -38,6 +38,12 @@ type Union
     | PurpleBoolInUnion Bool
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/unions.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/unions.json/default/QuickType.elm
index 82ee8e8..b269f5f 100644
--- a/base/elm/test/inputs/json/priority/unions.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/unions.json/default/QuickType.elm
@@ -46,6 +46,12 @@ type alias ZClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/url.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/url.json/default/QuickType.elm
index e7d8a6b..8c1eefc 100644
--- a/base/elm/test/inputs/json/priority/url.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/url.json/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/priority/uuids.json/default/QuickType.elm b/head/elm/test/inputs/json/priority/uuids.json/default/QuickType.elm
index 2563c35..fb8b328 100644
--- a/base/elm/test/inputs/json/priority/uuids.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/priority/uuids.json/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/samples/bitcoin-block.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/bitcoin-block.json/default/QuickType.elm
index 6eb1888..45c81bc 100644
--- a/base/elm/test/inputs/json/samples/bitcoin-block.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/bitcoin-block.json/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/samples/getting-started.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/getting-started.json/default/QuickType.elm
index 20607cd..a94a184 100644
--- a/base/elm/test/inputs/json/samples/getting-started.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/getting-started.json/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/samples/github-events.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/github-events.json/default/QuickType.elm
index d3a3186..4b4164c 100644
--- a/base/elm/test/inputs/json/samples/github-events.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/github-events.json/default/QuickType.elm
@@ -333,6 +333,12 @@ type alias QuickTypeRepo =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -346,7 +352,7 @@ quickTypeElement =
         |> Jpipe.required "actor" actor
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "id" Jdec.string
-        |> Jpipe.optional "org" (Jdec.nullable actor) Nothing
+        |> Jpipe.custom (optionalField "org" (Jdec.nullable actor) Nothing)
         |> Jpipe.required "payload" payload
         |> Jpipe.required "public" Jdec.bool
         |> Jpipe.required "type" Jdec.string
@@ -369,7 +375,7 @@ actor : Jdec.Decoder Actor
 actor =
     Jdec.succeed Actor
         |> Jpipe.required "avatar_url" Jdec.string
-        |> Jpipe.optional "display_login" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "display_login" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "gravatar_id" Jdec.string
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "login" Jdec.string
@@ -389,22 +395,22 @@ encodeActor x =
 payload : Jdec.Decoder Payload
 payload =
     Jdec.succeed Payload
-        |> Jpipe.optional "action" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "before" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "comment" (Jdec.nullable comment) Nothing
-        |> Jpipe.optional "commits" (Jdec.nullable (Jdec.list commit)) Nothing
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "distinct_size" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "head" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "issue" (Jdec.nullable issue) Nothing
-        |> Jpipe.optional "master_branch" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "number" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pull_request" (Jdec.nullable payloadPullRequest) Nothing
-        |> Jpipe.optional "push_id" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "pusher_type" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ref" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "ref_type" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "size" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "action" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "before" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "comment" (Jdec.nullable comment) Nothing)
+        |> Jpipe.custom (optionalField "commits" (Jdec.nullable (Jdec.list commit)) Nothing)
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "distinct_size" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "head" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "issue" (Jdec.nullable issue) Nothing)
+        |> Jpipe.custom (optionalField "master_branch" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "number" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable payloadPullRequest) Nothing)
+        |> Jpipe.custom (optionalField "push_id" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "pusher_type" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ref" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "ref_type" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "size" (Jdec.nullable Jdec.int) Nothing)
 
 encodePayload : Payload -> Jenc.Value
 encodePayload x =
@@ -545,10 +551,10 @@ encodeAuthor x =
 issue : Jdec.Decoder Issue
 issue =
     Jdec.succeed Issue
-        |> Jpipe.optional "assignee" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ())
         |> Jpipe.required "assignees" (Jdec.list Jdec.value)
         |> Jpipe.required "body" Jdec.string
-        |> Jpipe.optional "closed_at" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "closed_at" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "comments" Jdec.int
         |> Jpipe.required "comments_url" Jdec.string
         |> Jpipe.required "created_at" Jdec.string
@@ -558,9 +564,9 @@ issue =
         |> Jpipe.required "labels" (Jdec.list label)
         |> Jpipe.required "labels_url" Jdec.string
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "milestone" (Jdec.nullable milestone) Nothing
+        |> Jpipe.custom (optionalField "milestone" (Jdec.nullable milestone) Nothing)
         |> Jpipe.required "number" Jdec.int
-        |> Jpipe.optional "pull_request" (Jdec.nullable issuePullRequest) Nothing
+        |> Jpipe.custom (optionalField "pull_request" (Jdec.nullable issuePullRequest) Nothing)
         |> Jpipe.required "repository_url" Jdec.string
         |> Jpipe.required "state" Jdec.string
         |> Jpipe.required "title" Jdec.string
@@ -617,12 +623,12 @@ encodeLabel x =
 milestone : Jdec.Decoder Milestone
 milestone =
     Jdec.succeed Milestone
-        |> Jpipe.optional "closed_at" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "closed_at" (Jdec.null ()) ())
         |> Jpipe.required "closed_issues" Jdec.int
         |> Jpipe.required "created_at" Jdec.string
         |> Jpipe.required "creator" userClass
         |> Jpipe.required "description" Jdec.string
-        |> Jpipe.optional "due_on" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "due_on" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "html_url" Jdec.string
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "labels_url" Jdec.string
@@ -674,7 +680,7 @@ payloadPullRequest : Jdec.Decoder PayloadPullRequest
 payloadPullRequest =
     Jdec.succeed PayloadPullRequest
         |> Jpipe.required "additions" Jdec.int
-        |> Jpipe.optional "assignee" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "assignee" (Jdec.null ()) ())
         |> Jpipe.required "assignees" (Jdec.list Jdec.value)
         |> Jpipe.required "base" base
         |> Jpipe.required "body" Jdec.string
@@ -695,15 +701,15 @@ payloadPullRequest =
         |> Jpipe.required "locked" Jdec.bool
         |> Jpipe.required "maintainer_can_modify" Jdec.bool
         |> Jpipe.required "merge_commit_sha" Jdec.string
-        |> Jpipe.optional "mergeable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "mergeable" (Jdec.null ()) ())
         |> Jpipe.required "mergeable_state" Jdec.string
         |> Jpipe.required "merged" Jdec.bool
         |> Jpipe.required "merged_at" Jdec.string
         |> Jpipe.required "merged_by" userClass
-        |> Jpipe.optional "milestone" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "milestone" (Jdec.null ()) ())
         |> Jpipe.required "number" Jdec.int
         |> Jpipe.required "patch_url" Jdec.string
-        |> Jpipe.optional "rebaseable" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "rebaseable" (Jdec.null ()) ())
         |> Jpipe.required "requested_reviewers" (Jdec.list Jdec.value)
         |> Jpipe.required "review_comment_url" Jdec.string
         |> Jpipe.required "review_comments" Jdec.int
@@ -827,7 +833,7 @@ baseRepo =
         |> Jpipe.required "languages_url" Jdec.string
         |> Jpipe.required "merges_url" Jdec.string
         |> Jpipe.required "milestones_url" Jdec.string
-        |> Jpipe.optional "mirror_url" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "mirror_url" (Jdec.null ()) ())
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "notifications_url" Jdec.string
         |> Jpipe.required "open_issues" Jdec.int
diff --git a/base/elm/test/inputs/json/samples/kitchen-sink.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/kitchen-sink.json/default/QuickType.elm
index 702480c..655575d 100644
--- a/base/elm/test/inputs/json/samples/kitchen-sink.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/kitchen-sink.json/default/QuickType.elm
@@ -69,6 +69,12 @@ type alias PurplePerson =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -82,8 +88,8 @@ quickType =
         |> Jpipe.required "doubleValue" Jdec.float
         |> Jpipe.required "intValue" Jdec.int
         |> Jpipe.required "mapValue" (Jdec.dict (Jdec.nullable Jdec.int))
-        |> Jpipe.optional "name with spaces" (Jdec.null ()) ()
-        |> Jpipe.optional "nullValue" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "name with spaces" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "nullValue" (Jdec.null ()) ())
         |> Jpipe.required "nullableMapValue" (Jdec.dict (Jdec.nullable Jdec.int))
         |> Jpipe.required "people" (Jdec.list personElement)
         |> Jpipe.required "person" purplePerson
@@ -140,7 +146,7 @@ personElement =
     Jdec.succeed PersonElement
         |> Jpipe.required "intOrString" intOrString
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "optionalValue" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.custom (optionalField "optionalValue" (Jdec.nullable Jdec.bool) Nothing)
 
 encodePersonElement : PersonElement -> Jenc.Value
 encodePersonElement x =
diff --git a/base/elm/test/inputs/json/samples/null-safe.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/null-safe.json/default/QuickType.elm
index d0a3ec3..656062c 100644
--- a/base/elm/test/inputs/json/samples/null-safe.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/null-safe.json/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias Address =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -60,10 +66,10 @@ encodeQuickType x =
 item : Jdec.Decoder Item
 item =
     Jdec.succeed Item
-        |> Jpipe.optional "address" (Jdec.nullable address) Nothing
-        |> Jpipe.optional "created_at" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "address" (Jdec.nullable address) Nothing)
+        |> Jpipe.custom (optionalField "created_at" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "sex" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "sex" (Jdec.nullable Jdec.int) Nothing)
 
 encodeItem : Item -> Jenc.Value
 encodeItem x =
diff --git a/base/elm/test/inputs/json/samples/pokedex.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/pokedex.json/default/QuickType.elm
index a644240..a065d4b 100644
--- a/base/elm/test/inputs/json/samples/pokedex.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/pokedex.json/default/QuickType.elm
@@ -83,6 +83,12 @@ type Type
     | Normal
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -103,17 +109,17 @@ pokemon =
     Jdec.succeed Pokemon
         |> Jpipe.required "avg_spawns" Jdec.float
         |> Jpipe.required "candy" Jdec.string
-        |> Jpipe.optional "candy_count" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "candy_count" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "egg" egg
         |> Jpipe.required "height" Jdec.string
         |> Jpipe.required "id" Jdec.int
         |> Jpipe.required "img" Jdec.string
-        |> Jpipe.optional "multipliers" (Jdec.nullable (Jdec.list Jdec.float)) Nothing
+        |> Jpipe.custom (optionalField "multipliers" (Jdec.nullable (Jdec.list Jdec.float)) Nothing)
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "next_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing
+        |> Jpipe.custom (optionalField "next_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing)
         |> Jpipe.required "num" Jdec.string
         |> Jpipe.required "type" (Jdec.list purpleType)
-        |> Jpipe.optional "prev_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing
+        |> Jpipe.custom (optionalField "prev_evolution" (Jdec.nullable (Jdec.list evolution)) Nothing)
         |> Jpipe.required "spawn_chance" Jdec.float
         |> Jpipe.required "spawn_time" Jdec.string
         |> Jpipe.required "weaknesses" (Jdec.list purpleType)
diff --git a/base/elm/test/inputs/json/samples/reddit.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/reddit.json/default/QuickType.elm
index bbd51c3..542481c 100644
--- a/base/elm/test/inputs/json/samples/reddit.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/reddit.json/default/QuickType.elm
@@ -186,6 +186,12 @@ type Kind
     = T3
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -207,7 +213,7 @@ quickTypeData : Jdec.Decoder QuickTypeData
 quickTypeData =
     Jdec.succeed QuickTypeData
         |> Jpipe.required "after" Jdec.string
-        |> Jpipe.optional "before" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "before" (Jdec.null ()) ())
         |> Jpipe.required "children" (Jdec.list child)
         |> Jpipe.required "modhash" Jdec.string
 
@@ -236,14 +242,14 @@ encodeChild x =
 childData : Jdec.Decoder ChildData
 childData =
     Jdec.succeed ChildData
-        |> Jpipe.optional "approved_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "approved_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "approved_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "approved_by" (Jdec.null ()) ())
         |> Jpipe.required "archived" Jdec.bool
         |> Jpipe.required "author" Jdec.string
-        |> Jpipe.optional "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "author_flair_text" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "banned_at_utc" (Jdec.null ()) ()
-        |> Jpipe.optional "banned_by" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "author_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "author_flair_text" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "banned_at_utc" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "banned_by" (Jdec.null ()) ())
         |> Jpipe.required "brand_safe" Jdec.bool
         |> Jpipe.required "can_gild" Jdec.bool
         |> Jpipe.required "can_mod_post" Jdec.bool
@@ -251,7 +257,7 @@ childData =
         |> Jpipe.required "contest_mode" Jdec.bool
         |> Jpipe.required "created" Jdec.int
         |> Jpipe.required "created_utc" Jdec.int
-        |> Jpipe.optional "distinguished" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "distinguished" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "domain" domain
         |> Jpipe.required "downs" Jdec.int
         |> Jpipe.required "edited" Jdec.bool
@@ -261,37 +267,37 @@ childData =
         |> Jpipe.required "id" Jdec.string
         |> Jpipe.required "is_self" Jdec.bool
         |> Jpipe.required "is_video" Jdec.bool
-        |> Jpipe.optional "likes" (Jdec.null ()) ()
-        |> Jpipe.optional "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "link_flair_text" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "likes" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "link_flair_css_class" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "link_flair_text" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "locked" Jdec.bool
-        |> Jpipe.optional "media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "media" (Jdec.null ()) ())
         |> Jpipe.required "media_embed" mediaEmbed
         |> Jpipe.required "mod_reports" (Jdec.list Jdec.value)
         |> Jpipe.required "name" Jdec.string
         |> Jpipe.required "num_comments" Jdec.int
-        |> Jpipe.optional "num_reports" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "num_reports" (Jdec.null ()) ())
         |> Jpipe.required "over_18" Jdec.bool
         |> Jpipe.required "parent_whitelist_status" whitelistStatus
         |> Jpipe.required "permalink" Jdec.string
         |> Jpipe.required "post_hint" postHint
         |> Jpipe.required "preview" preview
         |> Jpipe.required "quarantine" Jdec.bool
-        |> Jpipe.optional "removal_reason" (Jdec.null ()) ()
-        |> Jpipe.optional "report_reasons" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "removal_reason" (Jdec.null ()) ())
+        |> Jpipe.custom (optionalField "report_reasons" (Jdec.null ()) ())
         |> Jpipe.required "saved" Jdec.bool
         |> Jpipe.required "score" Jdec.int
-        |> Jpipe.optional "secure_media" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "secure_media" (Jdec.null ()) ())
         |> Jpipe.required "secure_media_embed" mediaEmbed
         |> Jpipe.required "selftext" Jdec.string
-        |> Jpipe.optional "selftext_html" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "selftext_html" (Jdec.null ()) ())
         |> Jpipe.required "spoiler" Jdec.bool
         |> Jpipe.required "stickied" Jdec.bool
         |> Jpipe.required "subreddit" subreddit
         |> Jpipe.required "subreddit_id" subredditID
         |> Jpipe.required "subreddit_name_prefixed" subredditNamePrefixed
         |> Jpipe.required "subreddit_type" subredditType
-        |> Jpipe.optional "suggested_sort" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "suggested_sort" (Jdec.null ()) ())
         |> Jpipe.required "thumbnail" Jdec.string
         |> Jpipe.required "thumbnail_height" Jdec.int
         |> Jpipe.required "thumbnail_width" Jdec.int
@@ -299,7 +305,7 @@ childData =
         |> Jpipe.required "ups" Jdec.int
         |> Jpipe.required "url" Jdec.string
         |> Jpipe.required "user_reports" (Jdec.list Jdec.value)
-        |> Jpipe.optional "view_count" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "view_count" (Jdec.null ()) ())
         |> Jpipe.required "visited" Jdec.bool
         |> Jpipe.required "whitelist_status" whitelistStatus
 
@@ -479,8 +485,8 @@ encodeSource x =
 variants : Jdec.Decoder Variants
 variants =
     Jdec.succeed Variants
-        |> Jpipe.optional "gif" (Jdec.nullable gif) Nothing
-        |> Jpipe.optional "mp4" (Jdec.nullable gif) Nothing
+        |> Jpipe.custom (optionalField "gif" (Jdec.nullable gif) Nothing)
+        |> Jpipe.custom (optionalField "mp4" (Jdec.nullable gif) Nothing)
 
 encodeVariants : Variants -> Jenc.Value
 encodeVariants x =
diff --git a/base/elm/test/inputs/json/samples/simple-object.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/simple-object.json/default/QuickType.elm
index 39e4a2b..2375767 100644
--- a/base/elm/test/inputs/json/samples/simple-object.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/simple-object.json/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/samples/spotify-album.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/spotify-album.json/default/QuickType.elm
index ea0e725..c3cc562 100644
--- a/base/elm/test/inputs/json/samples/spotify-album.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/spotify-album.json/default/QuickType.elm
@@ -104,6 +104,12 @@ type alias Item =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -228,9 +234,9 @@ tracks =
         |> Jpipe.required "href" Jdec.string
         |> Jpipe.required "items" (Jdec.list item)
         |> Jpipe.required "limit" Jdec.int
-        |> Jpipe.optional "next" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "next" (Jdec.null ()) ())
         |> Jpipe.required "offset" Jdec.int
-        |> Jpipe.optional "previous" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "previous" (Jdec.null ()) ())
         |> Jpipe.required "total" Jdec.int
 
 encodeTracks : Tracks -> Jenc.Value
diff --git a/base/elm/test/inputs/json/samples/us-avg-temperatures.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/us-avg-temperatures.json/default/QuickType.elm
index ce460e2..b7adef0 100644
--- a/base/elm/test/inputs/json/samples/us-avg-temperatures.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/us-avg-temperatures.json/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias Description =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/elm/test/inputs/json/samples/us-senators.json/default/QuickType.elm b/head/elm/test/inputs/json/samples/us-senators.json/default/QuickType.elm
index 0c55cea..2c1f22e 100644
--- a/base/elm/test/inputs/json/samples/us-senators.json/default/QuickType.elm
+++ b/head/elm/test/inputs/json/samples/us-senators.json/default/QuickType.elm
@@ -147,6 +147,12 @@ type Title
     = Sen
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -182,14 +188,14 @@ encodeMeta x =
 object : Jdec.Decoder Object
 object =
     Jdec.succeed Object
-        |> Jpipe.optional "caucus" (Jdec.nullable party) Nothing
+        |> Jpipe.custom (optionalField "caucus" (Jdec.nullable party) Nothing)
         |> Jpipe.required "congress_numbers" (Jdec.list Jdec.int)
         |> Jpipe.required "current" Jdec.bool
         |> Jpipe.required "description" Jdec.string
-        |> Jpipe.optional "district" (Jdec.null ()) ()
+        |> Jpipe.custom (optionalField "district" (Jdec.null ()) ())
         |> Jpipe.required "enddate" Jdec.string
         |> Jpipe.required "extra" extra
-        |> Jpipe.optional "leadership_title" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "leadership_title" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "party" party
         |> Jpipe.required "person" person
         |> Jpipe.required "phone" Jdec.string
@@ -254,9 +260,9 @@ extra =
     Jdec.succeed Extra
         |> Jpipe.required "address" Jdec.string
         |> Jpipe.required "contact_form" Jdec.string
-        |> Jpipe.optional "fax" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "fax" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "office" Jdec.string
-        |> Jpipe.optional "rss_url" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "rss_url" (Jdec.nullable Jdec.string) Nothing)
 
 encodeExtra : Extra -> Jenc.Value
 encodeExtra x =
@@ -286,8 +292,8 @@ person =
         |> Jpipe.required "osid" Jdec.string
         |> Jpipe.required "pvsid" Jdec.string
         |> Jpipe.required "sortname" Jdec.string
-        |> Jpipe.optional "twitterid" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "youtubeid" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "twitterid" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "youtubeid" (Jdec.nullable Jdec.string) Nothing)
 
 encodePerson : Person -> Jenc.Value
 encodePerson x =
diff --git a/base/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
index f2fb976..d690b11 100644
--- a/base/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/accessors.schema/default/QuickType.elm
@@ -41,6 +41,12 @@ type Union
     | Presence Bool
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
index 4d9a171..c3dc443 100644
--- a/base/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/all-of-additional-properties-false.schema/default/QuickType.elm
@@ -41,6 +41,12 @@ type Type
     | Overtime
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -50,7 +56,7 @@ quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "amount" Jdec.float
         |> Jpipe.required "frequency" frequency
-        |> Jpipe.optional "description" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "description" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "type" purpleType
 
 encodeQuickType : QuickType -> Jenc.Value
diff --git a/base/schema-elm/test/inputs/schema/any.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/any.schema/default/QuickType.elm
index e6b8a95..3f06795 100644
--- a/base/schema-elm/test/inputs/schema/any.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/any.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
index b71a28c..ff264a4 100644
--- a/base/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/bool-string.schema/default/QuickType.elm
@@ -38,6 +38,12 @@ type UnionWithBool
     | StringInUnionWithBool String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -45,11 +51,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing)
+        |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "one" Jdec.string
-        |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "unionWithBool" unionWithBool
         |> Jpipe.required "unionWithBoolAndEnum" unionWithBool
 
diff --git a/base/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
index fb77fb7..84542d6 100644
--- a/base/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/boolean-subschema.schema/default/QuickType.elm
@@ -30,6 +30,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -37,10 +43,10 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "disallowed" (Jdec.nullable Jdec.value) Nothing
+        |> Jpipe.custom (optionalField "disallowed" (Jdec.nullable Jdec.value) Nothing)
         |> Jpipe.required "empty" (Jdec.list Jdec.value)
         |> Jpipe.required "foo" Jdec.string
-        |> Jpipe.optional "impossible" (Jdec.nullable Jdec.value) Nothing
+        |> Jpipe.custom (optionalField "impossible" (Jdec.nullable Jdec.value) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/camelCase.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/camelCase.schema/default/QuickType.elm
index c8be357..8ed563d 100644
--- a/base/schema-elm/test/inputs/schema/camelCase.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/camelCase.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -35,8 +41,8 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "myProperty" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "secondProperty" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "myProperty" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "secondProperty" (Jdec.nullable Jdec.string) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/class-map-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/class-map-union.schema/default/QuickType.elm
index f441fab..cb076cf 100644
--- a/base/schema-elm/test/inputs/schema/class-map-union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/class-map-union.schema/default/QuickType.elm
@@ -39,6 +39,12 @@ type alias UnionClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -46,7 +52,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "union" (Jdec.nullable (Jdec.dict unionValue)) Nothing
+        |> Jpipe.custom (optionalField "union" (Jdec.nullable (Jdec.dict unionValue)) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
@@ -73,7 +79,7 @@ encodeUnionValue x = case x of
 unionClass : Jdec.Decoder UnionClass
 unionClass =
     Jdec.succeed UnionClass
-        |> Jpipe.optional "quux" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "quux" (Jdec.nullable Jdec.int) Nothing)
 
 encodeUnionClass : UnionClass -> Jenc.Value
 encodeUnionClass x =
diff --git a/base/schema-elm/test/inputs/schema/class-with-additional.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/class-with-additional.schema/default/QuickType.elm
index a24df56..e4ae899 100644
--- a/base/schema-elm/test/inputs/schema/class-with-additional.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/class-with-additional.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type Map
     | DoubleInMap Float
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -39,7 +45,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "map" (Jdec.nullable (Jdec.dict map)) Nothing
+        |> Jpipe.custom (optionalField "map" (Jdec.nullable (Jdec.dict map)) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/QuickType.elm
index dd112bb..0069ec3 100644
--- a/base/schema-elm/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/QuickType.elm
@@ -42,6 +42,12 @@ type Kind
     = Ok
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/comment-injection-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/comment-injection-enum.schema/default/QuickType.elm
index ea9af17..3b8ab49 100644
--- a/base/schema-elm/test/inputs/schema/comment-injection-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/comment-injection-enum.schema/default/QuickType.elm
@@ -48,6 +48,12 @@ type Kind
     = Ok
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/comment-injection-nested-comment.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/comment-injection-nested-comment.schema/default/QuickType.elm
index 5d68b7d..fd09215 100644
--- a/base/schema-elm/test/inputs/schema/comment-injection-nested-comment.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/comment-injection-nested-comment.schema/default/QuickType.elm
@@ -38,6 +38,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
index 5f65cb7..2c4dd87 100644
--- a/base/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/comment-injection.schema/default/QuickType.elm
@@ -66,6 +66,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -73,9 +79,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "trailingBackslash" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "trailingQuote" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "trailingTripleQuote" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "trailingBackslash" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "trailingQuote" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "trailingTripleQuote" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "value" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
diff --git a/base/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
index 6303317..9cc5ace 100644
--- a/base/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/const-non-string.schema/default/QuickType.elm
@@ -35,6 +35,12 @@ type Kind
     = Widget
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/head/schema-elm/test/inputs/schema/constructor.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/constructor.schema/default/QuickType.elm
new file mode 100644
index 0000000..df05460
--- /dev/null
+++ b/head/schema-elm/test/inputs/schema/constructor.schema/default/QuickType.elm
@@ -0,0 +1,89 @@
+-- To decode the JSON data, add this file to your project, run
+--
+--     elm install NoRedInk/elm-json-decode-pipeline
+--
+-- add these imports
+--
+--     import Json.Decode exposing (decodeString)
+--     import QuickType exposing (quickType)
+--
+-- and you're off to the races with
+--
+--     decodeString quickType myJsonString
+
+module QuickType exposing
+    ( QuickType
+    , quickTypeToString
+    , quickType
+    , Constructor
+    , UnionConstructor(..)
+    )
+
+import Json.Decode as Jdec
+import Json.Decode.Pipeline as Jpipe
+import Json.Encode as Jenc
+import Dict exposing (Dict)
+
+type alias QuickType =
+    { constructor : Maybe UnionConstructor
+    }
+
+type UnionConstructor
+    = ConstructorInUnionConstructor Constructor
+    | DoubleInUnionConstructor Float
+
+type alias Constructor =
+    {
+    }
+
+-- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
+
+quickTypeToString : QuickType -> String
+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
+
+quickType : Jdec.Decoder QuickType
+quickType =
+    Jdec.succeed QuickType
+        |> Jpipe.custom (optionalField "constructor" (Jdec.nullable unionConstructor) Nothing)
+
+encodeQuickType : QuickType -> Jenc.Value
+encodeQuickType x =
+    Jenc.object
+        [ ("constructor", makeNullableEncoder encodeUnionConstructor x.constructor)
+        ]
+
+unionConstructor : Jdec.Decoder UnionConstructor
+unionConstructor =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConstructor Jdec.float
+        , Jdec.map ConstructorInUnionConstructor constructor
+        ]
+
+encodeUnionConstructor : UnionConstructor -> Jenc.Value
+encodeUnionConstructor x = case x of
+    DoubleInUnionConstructor y -> Jenc.float y
+    ConstructorInUnionConstructor y -> encodeConstructor y
+
+constructor : Jdec.Decoder Constructor
+constructor =
+    Jdec.succeed Constructor
+
+encodeConstructor : Constructor -> Jenc.Value
+encodeConstructor x =
+    Jenc.object
+        [
+        ]
+
+--- encoder helpers
+
+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
+makeNullableEncoder f m =
+    case m of
+    Just x -> f x
+    Nothing -> Jenc.null
diff --git a/base/schema-elm/test/inputs/schema/cut-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/cut-enum.schema/default/QuickType.elm
index be08b20..8cb921a 100644
--- a/base/schema-elm/test/inputs/schema/cut-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/cut-enum.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
index ab86de8..4ff9005 100644
--- a/base/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/date-time-or-string.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
index ba670b3..9ec9551 100644
--- a/base/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/date-time.schema/default/QuickType.elm
@@ -36,6 +36,12 @@ type ComplexUnionArray
     | StringInComplexUnionArray String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/default-value.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/default-value.schema/default/QuickType.elm
index f149994..38cdf21 100644
--- a/base/schema-elm/test/inputs/schema/default-value.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/default-value.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/description-with-double-quotes.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/description-with-double-quotes.schema/default/QuickType.elm
index b969c81..3336538 100644
--- a/base/schema-elm/test/inputs/schema/description-with-double-quotes.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/description-with-double-quotes.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -36,7 +42,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "foo" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.bool) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
index c235a93..1d1a142 100644
--- a/base/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/description.schema/default/QuickType.elm
@@ -70,6 +70,12 @@ type Union
     | StringInUnion String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -77,9 +83,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.bool) Nothing)
         |> Jpipe.required "enum" enum
-        |> Jpipe.optional "foo" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.float) Nothing)
         |> Jpipe.required "object-or-string" objectOrStringUnion
         |> Jpipe.required "union" union
 
diff --git a/base/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
index fa51c66..492a14c 100644
--- a/base/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/direct-union.schema/default/QuickType.elm
@@ -43,6 +43,12 @@ type Anything
     | StringInAnything String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -61,7 +67,7 @@ encodeQuickType x =
 thing : Jdec.Decoder Thing
 thing =
     Jdec.succeed Thing
-        |> Jpipe.optional "optional" (Jdec.nullable anything) Nothing
+        |> Jpipe.custom (optionalField "optional" (Jdec.nullable anything) Nothing)
         |> Jpipe.required "required" anything
 
 encodeThing : Thing -> Jenc.Value
diff --git a/base/schema-elm/test/inputs/schema/empty-object.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/empty-object.schema/default/QuickType.elm
index 3d3a75f..e1250b9 100644
--- a/base/schema-elm/test/inputs/schema/empty-object.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/empty-object.schema/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = Dict String Jdec.Value
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.dict Jdec.value
diff --git a/base/schema-elm/test/inputs/schema/enum-large.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/enum-large.schema/default/QuickType.elm
index cb57bdd..26b1613 100644
--- a/base/schema-elm/test/inputs/schema/enum-large.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/enum-large.schema/default/QuickType.elm
@@ -57,6 +57,12 @@ type Priority
     | High
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/enum-with-null.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/enum-with-null.schema/default/QuickType.elm
index 4dc7b64..ecfcf64 100644
--- a/base/schema-elm/test/inputs/schema/enum-with-null.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/enum-with-null.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type Enum
     | Bar
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -39,7 +45,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "enum" (Jdec.nullable enum) Nothing
+        |> Jpipe.custom (optionalField "enum" (Jdec.nullable enum) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/enum-with-values.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/enum-with-values.schema/default/QuickType.elm
index ba4aafd..1f2fa88 100644
--- a/base/schema-elm/test/inputs/schema/enum-with-values.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/enum-with-values.schema/default/QuickType.elm
@@ -37,6 +37,12 @@ type Weekdays
     | Sunday
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
index d413658..b2ac92c 100644
--- a/base/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/enum.schema/default/QuickType.elm
@@ -54,6 +54,12 @@ type Lvc
     | Chaotic
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -61,11 +67,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arr" (Jdec.nullable (Jdec.list arr)) Nothing
-        |> Jpipe.optional "for" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "arr" (Jdec.nullable (Jdec.list arr)) Nothing)
+        |> Jpipe.custom (optionalField "for" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "gve" gve
-        |> Jpipe.optional "lvc" (Jdec.nullable lvc) Nothing
-        |> Jpipe.optional "otherArr" (Jdec.nullable (Jdec.list otherArr)) Nothing
+        |> Jpipe.custom (optionalField "lvc" (Jdec.nullable lvc) Nothing)
+        |> Jpipe.custom (optionalField "otherArr" (Jdec.nullable (Jdec.list otherArr)) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/go-schema-pattern-properties.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/go-schema-pattern-properties.schema/default/QuickType.elm
index f05c3f1..dd84bf9 100644
--- a/base/schema-elm/test/inputs/schema/go-schema-pattern-properties.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/go-schema-pattern-properties.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/haskell-enum-forbidden.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/haskell-enum-forbidden.schema/default/QuickType.elm
index c76647b..0eb2189 100644
--- a/base/schema-elm/test/inputs/schema/haskell-enum-forbidden.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/haskell-enum-forbidden.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type Health
     | Error
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/id-no-address.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/id-no-address.schema/default/QuickType.elm
index cba95b5..4ebccfc 100644
--- a/base/schema-elm/test/inputs/schema/id-no-address.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/id-no-address.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/id-root.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/id-root.schema/default/QuickType.elm
index 7fac236..f2f21f1 100644
--- a/base/schema-elm/test/inputs/schema/id-root.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/id-root.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/ie-suffix-singularization.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/ie-suffix-singularization.schema/default/QuickType.elm
index 2f40067..2905834 100644
--- a/base/schema-elm/test/inputs/schema/ie-suffix-singularization.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/ie-suffix-singularization.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Cookie =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/implicit-all-of.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/implicit-all-of.schema/default/QuickType.elm
index 53d7fe3..4c1d2d2 100644
--- a/base/schema-elm/test/inputs/schema/implicit-all-of.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/implicit-all-of.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/implicit-class-array-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/implicit-class-array-union.schema/default/QuickType.elm
index f265a97..f2786ad 100644
--- a/base/schema-elm/test/inputs/schema/implicit-class-array-union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/implicit-class-array-union.schema/default/QuickType.elm
@@ -42,6 +42,12 @@ type alias FooClass =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/implicit-one-of.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/implicit-one-of.schema/default/QuickType.elm
index c5d2186..1d27de7 100644
--- a/base/schema-elm/test/inputs/schema/implicit-one-of.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/implicit-one-of.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -37,8 +43,8 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "foo" Jdec.int
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "quux" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "quux" (Jdec.nullable Jdec.string) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/integer-float-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/integer-float-union.schema/default/QuickType.elm
index 85c3e76..26971ae 100644
--- a/base/schema-elm/test/inputs/schema/integer-float-union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/integer-float-union.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type Number
     | IntegerInNumber Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
index 9de3975..b85447a 100644
--- a/base/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/integer-string.schema/default/QuickType.elm
@@ -38,6 +38,12 @@ type UnionWithInt
     | StringInUnionWithInt String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -45,11 +51,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing)
+        |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "one" Jdec.string
-        |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "unionWithInt" unionWithInt
         |> Jpipe.required "unionWithIntAndEnum" unionWithInt
 
diff --git a/base/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
index c7ecdaf..97fa01f 100644
--- a/base/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/integer-type.schema/default/QuickType.elm
@@ -35,6 +35,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/intersection-nested.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/intersection-nested.schema/default/QuickType.elm
index c4e0bd9..0862186 100644
--- a/base/schema-elm/test/inputs/schema/intersection-nested.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/intersection-nested.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -34,7 +40,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "intersection" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "intersection" (Jdec.nullable Jdec.float) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/intersection.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/intersection.schema/default/QuickType.elm
index 69a5dfc..2ecd307 100644
--- a/base/schema-elm/test/inputs/schema/intersection.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/intersection.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type alias Intersection =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -40,7 +46,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "intersection" (Jdec.nullable intersection) Nothing
+        |> Jpipe.custom (optionalField "intersection" (Jdec.nullable intersection) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
@@ -52,7 +58,7 @@ intersection : Jdec.Decoder Intersection
 intersection =
     Jdec.succeed Intersection
         |> Jpipe.required "foo" Jdec.float
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing)
 
 encodeIntersection : Intersection -> Jenc.Value
 encodeIntersection x =
diff --git a/base/schema-elm/test/inputs/schema/issue2680-top-level-array.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/issue2680-top-level-array.schema/default/QuickType.elm
index a89e8c5..419965b 100644
--- a/base/schema-elm/test/inputs/schema/issue2680-top-level-array.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/issue2680-top-level-array.schema/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = List Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list Jdec.int
diff --git a/base/schema-elm/test/inputs/schema/keyword-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/keyword-enum.schema/default/QuickType.elm
index 7006bb7..0cf5be9 100644
--- a/base/schema-elm/test/inputs/schema/keyword-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/keyword-enum.schema/default/QuickType.elm
@@ -307,6 +307,12 @@ type EnumEnum
     | Dummy
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -314,7 +320,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "enum" (Jdec.nullable enumEnum) Nothing
+        |> Jpipe.custom (optionalField "enum" (Jdec.nullable enumEnum) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/head/schema-elm/test/inputs/schema/keyword-unions.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/keyword-unions.schema/default/QuickType.elm
new file mode 100644
index 0000000..7f784bb
--- /dev/null
+++ b/head/schema-elm/test/inputs/schema/keyword-unions.schema/default/QuickType.elm
@@ -0,0 +1,9717 @@
+-- To decode the JSON data, add this file to your project, run
+--
+--     elm install NoRedInk/elm-json-decode-pipeline
+--
+-- add these imports
+--
+--     import Json.Decode exposing (decodeString)
+--     import QuickType exposing (quickType)
+--
+-- and you're off to the races with
+--
+--     decodeString quickType myJsonString
+
+module QuickType exposing
+    ( QuickType
+    , quickTypeToString
+    , quickType
+    , Abstract
+    , Alignas
+    , Alignof
+    , And
+    , AndEq
+    , Any
+    , ArrayClass
+    , ASM
+    , Assert
+    , Associatedtype
+    , Associativity
+    , Async
+    , Atomic
+    , AtomicCancel
+    , AtomicCommit
+    , AtomicNoexcept
+    , Auto
+    , Await
+    , Base
+    , Bitand
+    , Bitor
+    , Boolean
+    , Break
+    , Bycopy
+    , Byref
+    , Byte
+    , Catch
+    , Chan
+    , Char
+    , Char16T
+    , Char32T
+    , Checked
+    , Class
+    , CoAwait
+    , CoReturn
+    , CoYield
+    , Compl
+    , Complex
+    , Concept
+    , Console
+    , Const
+    , ConstCast
+    , Constexpr
+    , Constructor
+    , Continue
+    , Convenience
+    , Convert
+    , Converter
+    , Date
+    , DateParseHandling
+    , Debugger
+    , Decimal
+    , Declare
+    , Decltype
+    , DecodeString
+    , Def
+    , Default
+    , Defer
+    , Deinit
+    , Del
+    , Delegate
+    , Delete
+    , DictClass
+    , Dictionary
+    , DidSet
+    , Do
+    , Double
+    , Dynamic
+    , DynamicCast
+    , Elif
+    , Empty
+    , EncodeQuickType
+    , Enum
+    , Event
+    , Except
+    , Exception
+    , Explicit
+    , Export
+    , Extends
+    , Extension
+    , Extern
+    , Fallthrough
+    , FalseClass
+    , Fileprivate
+    , Final
+    , Finally
+    , Fixed
+    , For
+    , Foreach
+    , Friend
+    , From
+    , FromJSON
+    , Func
+    , Function
+    , Get
+    , Global
+    , Go
+    , Goto
+    , Guard
+    , HasOwnProperty
+    , ID
+    , Imaginery
+    , Imp
+    , Implements
+    , Implicit
+    , Indirect
+    , Init
+    , Inline
+    , Inout
+    , Instanceof
+    , Interface
+    , Internal
+    , Is
+    , Iterable
+    , JdecClass
+    , JencClass
+    , JpipeClass
+    , JSON
+    , JSONConverter
+    , JSONSerializer
+    , JSONToken
+    , JSONWriter
+    , Lambda
+    , Lazy
+    , Left
+    , ListClass
+    , Lock
+    , Long
+    , Map
+    , MetadataPropertyHandling
+    , Mutable
+    , Mutating
+    , Namespace
+    , Native
+    , New
+    , Newtonsoft
+    , Nil
+    , No
+    , Noexcept
+    , Nonatomic
+    , None
+    , Nonlocal
+    , Nonmutating
+    , Not
+    , NotEq
+    , NSString
+    , Null
+    , Nullptr
+    , Number
+    , Object
+    , Oneway
+    , Open
+    , Operator
+    , Optional
+    , Or
+    , OrEq
+    , Out
+    , Override
+    , Package
+    , Params
+    , Pass
+    , Postfix
+    , Precedence
+    , Prefix
+    , Print
+    , Printf
+    , Private
+    , Protected
+    , Protocol
+    , Public
+    , UnionBoolBool
+    , TypeClass
+    , AnyClass
+    , As
+    , Bool
+    , BoolClass
+    , Case
+    , ClassClass
+    , Else
+    , Exposing
+    , UnionFalseFalse
+    , FloatClass
+    , If
+    , Import
+    , In
+    , Infix
+    , IntClass
+    , Let
+    , Module
+    , NoneClass
+    , NullClass
+    , Of
+    , Port
+    , ProtocolClass
+    , SelfClass
+    , StringClass
+    , Then
+    , UnionTrueTrue
+    , Type
+    , Where
+    , Quicktype
+    , Raise
+    , Range
+    , Readonly
+    , Ref
+    , Register
+    , ReinterpretCast
+    , Repeat
+    , Require
+    , Required
+    , Requires
+    , Restrict
+    , Retain
+    , Rethrows
+    , Return
+    , Right
+    , Sbyte
+    , Sealed
+    , Sel
+    , Select
+    , Self
+    , Serialize
+    , Set
+    , Short
+    , Signed
+    , Sizeof
+    , Stackalloc
+    , Static
+    , StaticAssert
+    , StaticCast
+    , Strictfp
+    , Struct
+    , Subscript
+    , Super
+    , Switch
+    , Symbol
+    , Synchronized
+    , System
+    , Template
+    , This
+    , ThreadLocal
+    , Throw
+    , Throws
+    , ToJSON
+    , TopLevel
+    , Transient
+    , TrueClass
+    , Try
+    , Typealias
+    , Typedef
+    , Typeid
+    , Typename
+    , Typeof
+    , Uint
+    , Ulong
+    , Unchecked
+    , Undefined
+    , Union
+    , Unowned
+    , Unsafe
+    , Unsigned
+    , Ushort
+    , Using
+    , Var
+    , Virtual
+    , Void
+    , Volatile
+    , WcharT
+    , Weak
+    , While
+    , WillSet
+    , With
+    , Xor
+    , XorEq
+    , Yes
+    , Yield
+    , UnionAbstract(..)
+    , UnionAlignas(..)
+    , UnionAlignof(..)
+    , UnionAnd(..)
+    , UnionAndEq(..)
+    , UnionAny(..)
+    , UnionArray(..)
+    , UnionASM(..)
+    , UnionAssert(..)
+    , UnionAssociatedtype(..)
+    , UnionAssociativity(..)
+    , UnionAsync(..)
+    , UnionAtomic(..)
+    , UnionAtomicCancel(..)
+    , UnionAtomicCommit(..)
+    , UnionAtomicNoexcept(..)
+    , UnionAuto(..)
+    , UnionAwait(..)
+    , UnionBase(..)
+    , UnionBitand(..)
+    , UnionBitor(..)
+    , UnionBoolean(..)
+    , UnionBreak(..)
+    , UnionBycopy(..)
+    , UnionByref(..)
+    , UnionByte(..)
+    , UnionCatch(..)
+    , UnionChan(..)
+    , UnionChar(..)
+    , UnionChar16T(..)
+    , UnionChar32T(..)
+    , UnionChecked(..)
+    , UnionClass(..)
+    , UnionCoAwait(..)
+    , UnionCoReturn(..)
+    , UnionCoYield(..)
+    , UnionCompl(..)
+    , UnionComplex(..)
+    , UnionConcept(..)
+    , UnionConsole(..)
+    , UnionConst(..)
+    , UnionConstCast(..)
+    , UnionConstexpr(..)
+    , UnionConstructor(..)
+    , UnionContinue(..)
+    , UnionConvenience(..)
+    , UnionConvert(..)
+    , UnionConverter(..)
+    , UnionDate(..)
+    , UnionDateParseHandling(..)
+    , UnionDebugger(..)
+    , UnionDecimal(..)
+    , UnionDeclare(..)
+    , UnionDecltype(..)
+    , UnionDecodeString(..)
+    , UnionDef(..)
+    , UnionDefault(..)
+    , UnionDefer(..)
+    , UnionDeinit(..)
+    , UnionDel(..)
+    , UnionDelegate(..)
+    , UnionDelete(..)
+    , UnionDict(..)
+    , UnionDictionary(..)
+    , UnionDidSet(..)
+    , UnionDo(..)
+    , UnionDouble(..)
+    , UnionDynamic(..)
+    , UnionDynamicCast(..)
+    , UnionElif(..)
+    , UnionUnion(..)
+    , UnionEncodeQuickType(..)
+    , UnionEnum(..)
+    , UnionEvent(..)
+    , UnionExcept(..)
+    , UnionException(..)
+    , UnionExplicit(..)
+    , UnionExport(..)
+    , UnionExtends(..)
+    , UnionExtension(..)
+    , UnionExtern(..)
+    , UnionFallthrough(..)
+    , UnionFalse(..)
+    , UnionFileprivate(..)
+    , UnionFinal(..)
+    , UnionFinally(..)
+    , UnionFixed(..)
+    , UnionFor(..)
+    , UnionForeach(..)
+    , UnionFriend(..)
+    , UnionFrom(..)
+    , UnionFromJSON(..)
+    , UnionFunc(..)
+    , UnionFunction(..)
+    , UnionGet(..)
+    , UnionGlobal(..)
+    , UnionGo(..)
+    , UnionGoto(..)
+    , UnionGuard(..)
+    , UnionHasOwnProperty(..)
+    , UnionID(..)
+    , UnionImaginery(..)
+    , UnionIMP(..)
+    , UnionImplements(..)
+    , UnionImplicit(..)
+    , UnionIndirect(..)
+    , UnionInit(..)
+    , UnionInline(..)
+    , UnionInout(..)
+    , UnionInstanceof(..)
+    , UnionInterface(..)
+    , UnionInternal(..)
+    , UnionIs(..)
+    , UnionIterable(..)
+    , UnionJdec(..)
+    , UnionJenc(..)
+    , UnionJpipe(..)
+    , UnionJSON(..)
+    , UnionJSONConverter(..)
+    , UnionJSONSerializer(..)
+    , UnionJSONToken(..)
+    , UnionJSONWriter(..)
+    , UnionLambda(..)
+    , UnionLazy(..)
+    , UnionLeft(..)
+    , UnionList(..)
+    , UnionLock(..)
+    , UnionLong(..)
+    , UnionMap(..)
+    , UnionMetadataPropertyHandling(..)
+    , UnionMutable(..)
+    , UnionMutating(..)
+    , UnionNamespace(..)
+    , UnionNative(..)
+    , UnionNew(..)
+    , UnionNewtonsoft(..)
+    , UnionNil(..)
+    , UnionNO(..)
+    , UnionNoexcept(..)
+    , UnionNonatomic(..)
+    , UnionNone(..)
+    , UnionNonlocal(..)
+    , UnionNonmutating(..)
+    , UnionNot(..)
+    , UnionNotEq(..)
+    , UnionNSString(..)
+    , UnionNULL(..)
+    , UnionNullptr(..)
+    , UnionNumber(..)
+    , UnionObject(..)
+    , UnionOneway(..)
+    , UnionOpen(..)
+    , UnionOperator(..)
+    , UnionOptional(..)
+    , UnionOr(..)
+    , UnionOrEq(..)
+    , UnionOut(..)
+    , UnionOverride(..)
+    , UnionPackage(..)
+    , UnionParams(..)
+    , UnionPass(..)
+    , UnionPostfix(..)
+    , UnionPrecedence(..)
+    , UnionPrefix(..)
+    , UnionPrint(..)
+    , UnionPrintf(..)
+    , UnionPrivate(..)
+    , UnionProtected(..)
+    , UnionProtocol(..)
+    , UnionPublic(..)
+    , UnionBoolUnion(..)
+    , UnionTypeUnion(..)
+    , UnionAnyUnion(..)
+    , UnionAs(..)
+    , UnionBOOL(..)
+    , UnionBool(..)
+    , UnionCase(..)
+    , UnionClassUnion(..)
+    , UnionElse(..)
+    , UnionExposing(..)
+    , UnionFalseUnion(..)
+    , UnionFloat(..)
+    , UnionIf(..)
+    , UnionImport(..)
+    , UnionIn(..)
+    , UnionInfix(..)
+    , UnionInt(..)
+    , UnionLet(..)
+    , UnionModule(..)
+    , UnionNoneUnion(..)
+    , UnionNull(..)
+    , UnionOf(..)
+    , UnionPort(..)
+    , UnionProtocolUnion(..)
+    , UnionSelfUnion(..)
+    , UnionString(..)
+    , UnionThen(..)
+    , UnionTrueUnion(..)
+    , UnionType(..)
+    , UnionWhere(..)
+    , UnionQuicktype(..)
+    , UnionRaise(..)
+    , UnionRange(..)
+    , UnionReadonly(..)
+    , UnionRef(..)
+    , UnionRegister(..)
+    , UnionReinterpretCast(..)
+    , UnionRepeat(..)
+    , UnionRequire(..)
+    , UnionRequired(..)
+    , UnionRequires(..)
+    , UnionRestrict(..)
+    , UnionRetain(..)
+    , UnionRethrows(..)
+    , UnionReturn(..)
+    , UnionRight(..)
+    , UnionSbyte(..)
+    , UnionSealed(..)
+    , UnionSEL(..)
+    , UnionSelect(..)
+    , UnionSelf(..)
+    , UnionSerialize(..)
+    , UnionSet(..)
+    , UnionShort(..)
+    , UnionSigned(..)
+    , UnionSizeof(..)
+    , UnionStackalloc(..)
+    , UnionStatic(..)
+    , UnionStaticAssert(..)
+    , UnionStaticCast(..)
+    , UnionStrictfp(..)
+    , UnionStruct(..)
+    , UnionSubscript(..)
+    , UnionSuper(..)
+    , UnionSwitch(..)
+    , UnionSymbol(..)
+    , UnionSynchronized(..)
+    , UnionSystem(..)
+    , UnionTemplate(..)
+    , UnionThis(..)
+    , UnionThreadLocal(..)
+    , UnionThrow(..)
+    , UnionThrows(..)
+    , UnionToJSON(..)
+    , UnionTopLevel(..)
+    , UnionTransient(..)
+    , UnionTrue(..)
+    , UnionTry(..)
+    , UnionTypealias(..)
+    , UnionTypedef(..)
+    , UnionTypeid(..)
+    , UnionTypename(..)
+    , UnionTypeof(..)
+    , UnionUint(..)
+    , UnionUlong(..)
+    , UnionUnchecked(..)
+    , UnionUndefined(..)
+    , UnionUnionUnion(..)
+    , UnionUnowned(..)
+    , UnionUnsafe(..)
+    , UnionUnsigned(..)
+    , UnionUshort(..)
+    , UnionUsing(..)
+    , UnionVar(..)
+    , UnionVirtual(..)
+    , UnionVoid(..)
+    , UnionVolatile(..)
+    , UnionWcharT(..)
+    , UnionWeak(..)
+    , UnionWhile(..)
+    , UnionWillSet(..)
+    , UnionWith(..)
+    , UnionXor(..)
+    , UnionXorEq(..)
+    , UnionYES(..)
+    , UnionYield(..)
+    )
+
+import Json.Decode as Jdec
+import Json.Decode.Pipeline as Jpipe
+import Json.Encode as Jenc
+import Dict exposing (Dict)
+
+type alias QuickType =
+    { empty : Maybe UnionUnion
+    , quickTypeBool : Maybe UnionBool
+    , complex : Maybe UnionComplex
+    , imaginery : Maybe UnionImaginery
+    , abstract : Maybe UnionAbstract
+    , alignas : Maybe UnionAlignas
+    , alignof : Maybe UnionAlignof
+    , and : Maybe UnionAnd
+    , andEq : Maybe UnionAndEq
+    , quickTypeAny : Maybe UnionAnyUnion
+    , any : Maybe UnionAny
+    , array : Maybe UnionArray
+    , quickTypeAs : Maybe UnionAs
+    , asm : Maybe UnionASM
+    , assert : Maybe UnionAssert
+    , associatedtype : Maybe UnionAssociatedtype
+    , associativity : Maybe UnionAssociativity
+    , async : Maybe UnionAsync
+    , atomic : Maybe UnionAtomic
+    , atomicCancel : Maybe UnionAtomicCancel
+    , atomicCommit : Maybe UnionAtomicCommit
+    , atomicNoexcept : Maybe UnionAtomicNoexcept
+    , auto : Maybe UnionAuto
+    , await : Maybe UnionAwait
+    , base : Maybe UnionBase
+    , bitand : Maybe UnionBitand
+    , bitor : Maybe UnionBitor
+    , quickTypeBOOL : Maybe UnionBOOL
+    , purpleBool : Maybe UnionBoolUnion
+    , boolean : Maybe UnionBoolean
+    , break : Maybe UnionBreak
+    , bycopy : Maybe UnionBycopy
+    , byref : Maybe UnionByref
+    , byte : Maybe UnionByte
+    , quickTypeCase : Maybe UnionCase
+    , catch : Maybe UnionCatch
+    , chan : Maybe UnionChan
+    , char : Maybe UnionChar
+    , char16T : Maybe UnionChar16T
+    , char32T : Maybe UnionChar32T
+    , checked : Maybe UnionChecked
+    , quickTypeClass : Maybe UnionClassUnion
+    , class : Maybe UnionClass
+    , coAwait : Maybe UnionCoAwait
+    , coReturn : Maybe UnionCoReturn
+    , coYield : Maybe UnionCoYield
+    , compl : Maybe UnionCompl
+    , concept : Maybe UnionConcept
+    , console : Maybe UnionConsole
+    , const : Maybe UnionConst
+    , constCast : Maybe UnionConstCast
+    , constexpr : Maybe UnionConstexpr
+    , constructor : Maybe UnionConstructor
+    , continue : Maybe UnionContinue
+    , convenience : Maybe UnionConvenience
+    , convert : Maybe UnionConvert
+    , converter : Maybe UnionConverter
+    , date : Maybe UnionDate
+    , dateParseHandling : Maybe UnionDateParseHandling
+    , debugger : Maybe UnionDebugger
+    , decimal : Maybe UnionDecimal
+    , declare : Maybe UnionDeclare
+    , decltype : Maybe UnionDecltype
+    , decodeString : Maybe UnionDecodeString
+    , def : Maybe UnionDef
+    , default : Maybe UnionDefault
+    , defer : Maybe UnionDefer
+    , deinit : Maybe UnionDeinit
+    , del : Maybe UnionDel
+    , delegate : Maybe UnionDelegate
+    , delete : Maybe UnionDelete
+    , dict : Maybe UnionDict
+    , dictionary : Maybe UnionDictionary
+    , didSet : Maybe UnionDidSet
+    , do : Maybe UnionDo
+    , double : Maybe UnionDouble
+    , dummy : Maybe Float
+    , dynamic : Maybe UnionDynamic
+    , dynamicCast : Maybe UnionDynamicCast
+    , elif : Maybe UnionElif
+    , quickTypeElse : Maybe UnionElse
+    , encodeQuickType : Maybe UnionEncodeQuickType
+    , enum : Maybe UnionEnum
+    , event : Maybe UnionEvent
+    , except : Maybe UnionExcept
+    , exception : Maybe UnionException
+    , explicit : Maybe UnionExplicit
+    , export : Maybe UnionExport
+    , quickTypeExposing : Maybe UnionExposing
+    , extends : Maybe UnionExtends
+    , extension : Maybe UnionExtension
+    , extern : Maybe UnionExtern
+    , fallthrough : Maybe UnionFallthrough
+    , quickTypeFalse : Maybe UnionFalseUnion
+    , false : Maybe UnionFalse
+    , fileprivate : Maybe UnionFileprivate
+    , final : Maybe UnionFinal
+    , finally : Maybe UnionFinally
+    , fixed : Maybe UnionFixed
+    , quickTypeFloat : Maybe UnionFloat
+    , for : Maybe UnionFor
+    , foreach : Maybe UnionForeach
+    , friend : Maybe UnionFriend
+    , from : Maybe UnionFrom
+    , fromJSON : Maybe UnionFromJSON
+    , func : Maybe UnionFunc
+    , function : Maybe UnionFunction
+    , get : Maybe UnionGet
+    , global : Maybe UnionGlobal
+    , go : Maybe UnionGo
+    , goto : Maybe UnionGoto
+    , guard : Maybe UnionGuard
+    , hasOwnProperty : Maybe UnionHasOwnProperty
+    , id : Maybe UnionID
+    , quickTypeIf : Maybe UnionIf
+    , imp : Maybe UnionIMP
+    , implements : Maybe UnionImplements
+    , implicit : Maybe UnionImplicit
+    , quickTypeImport : Maybe UnionImport
+    , quickTypeIn : Maybe UnionIn
+    , indirect : Maybe UnionIndirect
+    , quickTypeInfix : Maybe UnionInfix
+    , init : Maybe UnionInit
+    , inline : Maybe UnionInline
+    , inout : Maybe UnionInout
+    , instanceof : Maybe UnionInstanceof
+    , quickTypeInt : Maybe UnionInt
+    , interface : Maybe UnionInterface
+    , internal : Maybe UnionInternal
+    , is : Maybe UnionIs
+    , iterable : Maybe UnionIterable
+    , jdec : Maybe UnionJdec
+    , jenc : Maybe UnionJenc
+    , jpipe : Maybe UnionJpipe
+    , json : Maybe UnionJSON
+    , jsonConverter : Maybe UnionJSONConverter
+    , jsonSerializer : Maybe UnionJSONSerializer
+    , jsonToken : Maybe UnionJSONToken
+    , jsonWriter : Maybe UnionJSONWriter
+    , lambda : Maybe UnionLambda
+    , lazy : Maybe UnionLazy
+    , left : Maybe UnionLeft
+    , quickTypeLet : Maybe UnionLet
+    , list : Maybe UnionList
+    , lock : Maybe UnionLock
+    , long : Maybe UnionLong
+    , map : Maybe UnionMap
+    , metadataPropertyHandling : Maybe UnionMetadataPropertyHandling
+    , quickTypeModule : Maybe UnionModule
+    , mutable : Maybe UnionMutable
+    , mutating : Maybe UnionMutating
+    , namespace : Maybe UnionNamespace
+    , native : Maybe UnionNative
+    , new : Maybe UnionNew
+    , newtonsoft : Maybe UnionNewtonsoft
+    , nil : Maybe UnionNil
+    , no : Maybe UnionNO
+    , noexcept : Maybe UnionNoexcept
+    , nonatomic : Maybe UnionNonatomic
+    , quickTypeNone : Maybe UnionNoneUnion
+    , none : Maybe UnionNone
+    , nonlocal : Maybe UnionNonlocal
+    , nonmutating : Maybe UnionNonmutating
+    , not : Maybe UnionNot
+    , notEq : Maybe UnionNotEq
+    , nsString : Maybe UnionNSString
+    , null : Maybe UnionNULL
+    , quickTypeNull : Maybe UnionNull
+    , nullptr : Maybe UnionNullptr
+    , number : Maybe UnionNumber
+    , object : Maybe UnionObject
+    , quickTypeOf : Maybe UnionOf
+    , oneway : Maybe UnionOneway
+    , open : Maybe UnionOpen
+    , operator : Maybe UnionOperator
+    , optional : Maybe UnionOptional
+    , or : Maybe UnionOr
+    , orEq : Maybe UnionOrEq
+    , out : Maybe UnionOut
+    , override : Maybe UnionOverride
+    , package : Maybe UnionPackage
+    , params : Maybe UnionParams
+    , pass : Maybe UnionPass
+    , quickTypePort : Maybe UnionPort
+    , postfix : Maybe UnionPostfix
+    , precedence : Maybe UnionPrecedence
+    , prefix : Maybe UnionPrefix
+    , print : Maybe UnionPrint
+    , printf : Maybe UnionPrintf
+    , private : Maybe UnionPrivate
+    , protected : Maybe UnionProtected
+    , protocol : Maybe UnionProtocol
+    , quickTypeProtocol : Maybe UnionProtocolUnion
+    , public : Maybe UnionPublic
+    , quicktype : Maybe UnionQuicktype
+    , raise : Maybe UnionRaise
+    , range : Maybe UnionRange
+    , readonly : Maybe UnionReadonly
+    , ref : Maybe UnionRef
+    , register : Maybe UnionRegister
+    , reinterpretCast : Maybe UnionReinterpretCast
+    , repeat : Maybe UnionRepeat
+    , require : Maybe UnionRequire
+    , required : Maybe UnionRequired
+    , requires : Maybe UnionRequires
+    , restrict : Maybe UnionRestrict
+    , retain : Maybe UnionRetain
+    , rethrows : Maybe UnionRethrows
+    , return : Maybe UnionReturn
+    , right : Maybe UnionRight
+    , sbyte : Maybe UnionSbyte
+    , sealed : Maybe UnionSealed
+    , sel : Maybe UnionSEL
+    , select : Maybe UnionSelect
+    , self : Maybe UnionSelf
+    , quickTypeSelf : Maybe UnionSelfUnion
+    , serialize : Maybe UnionSerialize
+    , set : Maybe UnionSet
+    , short : Maybe UnionShort
+    , signed : Maybe UnionSigned
+    , sizeof : Maybe UnionSizeof
+    , stackalloc : Maybe UnionStackalloc
+    , static : Maybe UnionStatic
+    , staticAssert : Maybe UnionStaticAssert
+    , staticCast : Maybe UnionStaticCast
+    , strictfp : Maybe UnionStrictfp
+    , quickTypeString : Maybe UnionString
+    , struct : Maybe UnionStruct
+    , subscript : Maybe UnionSubscript
+    , super : Maybe UnionSuper
+    , switch : Maybe UnionSwitch
+    , symbol : Maybe UnionSymbol
+    , synchronized : Maybe UnionSynchronized
+    , system : Maybe UnionSystem
+    , template : Maybe UnionTemplate
+    , quickTypeThen : Maybe UnionThen
+    , this : Maybe UnionThis
+    , threadLocal : Maybe UnionThreadLocal
+    , throw : Maybe UnionThrow
+    , throws : Maybe UnionThrows
+    , toJSON : Maybe UnionToJSON
+    , topLevel : Maybe UnionTopLevel
+    , transient : Maybe UnionTransient
+    , true : Maybe UnionTrue
+    , quickTypeTrue : Maybe UnionTrueUnion
+    , try : Maybe UnionTry
+    , quickTypeType : Maybe UnionType
+    , purpleType : Maybe UnionTypeUnion
+    , typealias : Maybe UnionTypealias
+    , typedef : Maybe UnionTypedef
+    , typeid : Maybe UnionTypeid
+    , typename : Maybe UnionTypename
+    , typeof : Maybe UnionTypeof
+    , uint : Maybe UnionUint
+    , ulong : Maybe UnionUlong
+    , unchecked : Maybe UnionUnchecked
+    , undefined : Maybe UnionUndefined
+    , union : Maybe UnionUnionUnion
+    , unowned : Maybe UnionUnowned
+    , unsafe : Maybe UnionUnsafe
+    , unsigned : Maybe UnionUnsigned
+    , ushort : Maybe UnionUshort
+    , using : Maybe UnionUsing
+    , var : Maybe UnionVar
+    , virtual : Maybe UnionVirtual
+    , void : Maybe UnionVoid
+    , volatile : Maybe UnionVolatile
+    , wcharT : Maybe UnionWcharT
+    , weak : Maybe UnionWeak
+    , quickTypeWhere : Maybe UnionWhere
+    , while : Maybe UnionWhile
+    , willSet : Maybe UnionWillSet
+    , with : Maybe UnionWith
+    , xor : Maybe UnionXor
+    , xorEq : Maybe UnionXorEq
+    , yes : Maybe UnionYES
+    , yield : Maybe UnionYield
+    }
+
+type UnionAbstract
+    = AbstractInUnionAbstract Abstract
+    | DoubleInUnionAbstract Float
+
+type alias Abstract =
+    {
+    }
+
+type UnionAlignas
+    = AlignasInUnionAlignas Alignas
+    | DoubleInUnionAlignas Float
+
+type alias Alignas =
+    {
+    }
+
+type UnionAlignof
+    = AlignofInUnionAlignof Alignof
+    | DoubleInUnionAlignof Float
+
+type alias Alignof =
+    {
+    }
+
+type UnionAnd
+    = AndInUnionAnd And
+    | DoubleInUnionAnd Float
+
+type alias And =
+    {
+    }
+
+type UnionAndEq
+    = AndEqInUnionAndEq AndEq
+    | DoubleInUnionAndEq Float
+
+type alias AndEq =
+    {
+    }
+
+type UnionAny
+    = AnyInUnionAny Any
+    | DoubleInUnionAny Float
+
+type alias Any =
+    {
+    }
+
+type UnionArray
+    = ArrayClassInUnionArray ArrayClass
+    | DoubleInUnionArray Float
+
+type alias ArrayClass =
+    {
+    }
+
+type UnionASM
+    = ASMInUnionASM ASM
+    | DoubleInUnionASM Float
+
+type alias ASM =
+    {
+    }
+
+type UnionAssert
+    = AssertInUnionAssert Assert
+    | DoubleInUnionAssert Float
+
+type alias Assert =
+    {
+    }
+
+type UnionAssociatedtype
+    = AssociatedtypeInUnionAssociatedtype Associatedtype
+    | DoubleInUnionAssociatedtype Float
+
+type alias Associatedtype =
+    {
+    }
+
+type UnionAssociativity
+    = AssociativityInUnionAssociativity Associativity
+    | DoubleInUnionAssociativity Float
+
+type alias Associativity =
+    {
+    }
+
+type UnionAsync
+    = AsyncInUnionAsync Async
+    | DoubleInUnionAsync Float
+
+type alias Async =
+    {
+    }
+
+type UnionAtomic
+    = AtomicInUnionAtomic Atomic
+    | DoubleInUnionAtomic Float
+
+type alias Atomic =
+    {
+    }
+
+type UnionAtomicCancel
+    = AtomicCancelInUnionAtomicCancel AtomicCancel
+    | DoubleInUnionAtomicCancel Float
+
+type alias AtomicCancel =
+    {
+    }
+
+type UnionAtomicCommit
+    = AtomicCommitInUnionAtomicCommit AtomicCommit
+    | DoubleInUnionAtomicCommit Float
+
+type alias AtomicCommit =
+    {
+    }
+
+type UnionAtomicNoexcept
+    = AtomicNoexceptInUnionAtomicNoexcept AtomicNoexcept
+    | DoubleInUnionAtomicNoexcept Float
+
+type alias AtomicNoexcept =
+    {
+    }
+
+type UnionAuto
+    = AutoInUnionAuto Auto
+    | DoubleInUnionAuto Float
+
+type alias Auto =
+    {
+    }
+
+type UnionAwait
+    = AwaitInUnionAwait Await
+    | DoubleInUnionAwait Float
+
+type alias Await =
+    {
+    }
+
+type UnionBase
+    = BaseInUnionBase Base
+    | DoubleInUnionBase Float
+
+type alias Base =
+    {
+    }
+
+type UnionBitand
+    = BitandInUnionBitand Bitand
+    | DoubleInUnionBitand Float
+
+type alias Bitand =
+    {
+    }
+
+type UnionBitor
+    = BitorInUnionBitor Bitor
+    | DoubleInUnionBitor Float
+
+type alias Bitor =
+    {
+    }
+
+type UnionBoolean
+    = BooleanInUnionBoolean Boolean
+    | DoubleInUnionBoolean Float
+
+type alias Boolean =
+    {
+    }
+
+type UnionBreak
+    = BreakInUnionBreak Break
+    | DoubleInUnionBreak Float
+
+type alias Break =
+    {
+    }
+
+type UnionBycopy
+    = BycopyInUnionBycopy Bycopy
+    | DoubleInUnionBycopy Float
+
+type alias Bycopy =
+    {
+    }
+
+type UnionByref
+    = ByrefInUnionByref Byref
+    | DoubleInUnionByref Float
+
+type alias Byref =
+    {
+    }
+
+type UnionByte
+    = ByteInUnionByte Byte
+    | DoubleInUnionByte Float
+
+type alias Byte =
+    {
+    }
+
+type UnionCatch
+    = CatchInUnionCatch Catch
+    | DoubleInUnionCatch Float
+
+type alias Catch =
+    {
+    }
+
+type UnionChan
+    = ChanInUnionChan Chan
+    | DoubleInUnionChan Float
+
+type alias Chan =
+    {
+    }
+
+type UnionChar
+    = CharInUnionChar Char
+    | DoubleInUnionChar Float
+
+type alias Char =
+    {
+    }
+
+type UnionChar16T
+    = Char16TInUnionChar16T Char16T
+    | DoubleInUnionChar16T Float
+
+type alias Char16T =
+    {
+    }
+
+type UnionChar32T
+    = Char32TInUnionChar32T Char32T
+    | DoubleInUnionChar32T Float
+
+type alias Char32T =
+    {
+    }
+
+type UnionChecked
+    = CheckedInUnionChecked Checked
+    | DoubleInUnionChecked Float
+
+type alias Checked =
+    {
+    }
+
+type UnionClass
+    = ClassInUnionClass Class
+    | DoubleInUnionClass Float
+
+type alias Class =
+    {
+    }
+
+type UnionCoAwait
+    = CoAwaitInUnionCoAwait CoAwait
+    | DoubleInUnionCoAwait Float
+
+type alias CoAwait =
+    {
+    }
+
+type UnionCoReturn
+    = CoReturnInUnionCoReturn CoReturn
+    | DoubleInUnionCoReturn Float
+
+type alias CoReturn =
+    {
+    }
+
+type UnionCoYield
+    = CoYieldInUnionCoYield CoYield
+    | DoubleInUnionCoYield Float
+
+type alias CoYield =
+    {
+    }
+
+type UnionCompl
+    = ComplInUnionCompl Compl
+    | DoubleInUnionCompl Float
+
+type alias Compl =
+    {
+    }
+
+type UnionComplex
+    = ComplexInUnionComplex Complex
+    | DoubleInUnionComplex Float
+
+type alias Complex =
+    {
+    }
+
+type UnionConcept
+    = ConceptInUnionConcept Concept
+    | DoubleInUnionConcept Float
+
+type alias Concept =
+    {
+    }
+
+type UnionConsole
+    = ConsoleInUnionConsole Console
+    | DoubleInUnionConsole Float
+
+type alias Console =
+    {
+    }
+
+type UnionConst
+    = ConstInUnionConst Const
+    | DoubleInUnionConst Float
+
+type alias Const =
+    {
+    }
+
+type UnionConstCast
+    = ConstCastInUnionConstCast ConstCast
+    | DoubleInUnionConstCast Float
+
+type alias ConstCast =
+    {
+    }
+
+type UnionConstexpr
+    = ConstexprInUnionConstexpr Constexpr
+    | DoubleInUnionConstexpr Float
+
+type alias Constexpr =
+    {
+    }
+
+type UnionConstructor
+    = ConstructorInUnionConstructor Constructor
+    | DoubleInUnionConstructor Float
+
+type alias Constructor =
+    {
+    }
+
+type UnionContinue
+    = ContinueInUnionContinue Continue
+    | DoubleInUnionContinue Float
+
+type alias Continue =
+    {
+    }
+
+type UnionConvenience
+    = ConvenienceInUnionConvenience Convenience
+    | DoubleInUnionConvenience Float
+
+type alias Convenience =
+    {
+    }
+
+type UnionConvert
+    = ConvertInUnionConvert Convert
+    | DoubleInUnionConvert Float
+
+type alias Convert =
+    {
+    }
+
+type UnionConverter
+    = ConverterInUnionConverter Converter
+    | DoubleInUnionConverter Float
+
+type alias Converter =
+    {
+    }
+
+type UnionDate
+    = DateInUnionDate Date
+    | DoubleInUnionDate Float
+
+type alias Date =
+    {
+    }
+
+type UnionDateParseHandling
+    = DateParseHandlingInUnionDateParseHandling DateParseHandling
+    | DoubleInUnionDateParseHandling Float
+
+type alias DateParseHandling =
+    {
+    }
+
+type UnionDebugger
+    = DebuggerInUnionDebugger Debugger
+    | DoubleInUnionDebugger Float
+
+type alias Debugger =
+    {
+    }
+
+type UnionDecimal
+    = DecimalInUnionDecimal Decimal
+    | DoubleInUnionDecimal Float
+
+type alias Decimal =
+    {
+    }
+
+type UnionDeclare
+    = DeclareInUnionDeclare Declare
+    | DoubleInUnionDeclare Float
+
+type alias Declare =
+    {
+    }
+
+type UnionDecltype
+    = DecltypeInUnionDecltype Decltype
+    | DoubleInUnionDecltype Float
+
+type alias Decltype =
+    {
+    }
+
+type UnionDecodeString
+    = DecodeStringInUnionDecodeString DecodeString
+    | DoubleInUnionDecodeString Float
+
+type alias DecodeString =
+    {
+    }
+
+type UnionDef
+    = DefInUnionDef Def
+    | DoubleInUnionDef Float
+
+type alias Def =
+    {
+    }
+
+type UnionDefault
+    = DefaultInUnionDefault Default
+    | DoubleInUnionDefault Float
+
+type alias Default =
+    {
+    }
+
+type UnionDefer
+    = DeferInUnionDefer Defer
+    | DoubleInUnionDefer Float
+
+type alias Defer =
+    {
+    }
+
+type UnionDeinit
+    = DeinitInUnionDeinit Deinit
+    | DoubleInUnionDeinit Float
+
+type alias Deinit =
+    {
+    }
+
+type UnionDel
+    = DelInUnionDel Del
+    | DoubleInUnionDel Float
+
+type alias Del =
+    {
+    }
+
+type UnionDelegate
+    = DelegateInUnionDelegate Delegate
+    | DoubleInUnionDelegate Float
+
+type alias Delegate =
+    {
+    }
+
+type UnionDelete
+    = DeleteInUnionDelete Delete
+    | DoubleInUnionDelete Float
+
+type alias Delete =
+    {
+    }
+
+type UnionDict
+    = DictClassInUnionDict DictClass
+    | DoubleInUnionDict Float
+
+type alias DictClass =
+    {
+    }
+
+type UnionDictionary
+    = DictionaryInUnionDictionary Dictionary
+    | DoubleInUnionDictionary Float
+
+type alias Dictionary =
+    {
+    }
+
+type UnionDidSet
+    = DidSetInUnionDidSet DidSet
+    | DoubleInUnionDidSet Float
+
+type alias DidSet =
+    {
+    }
+
+type UnionDo
+    = DoInUnionDo Do
+    | DoubleInUnionDo Float
+
+type alias Do =
+    {
+    }
+
+type UnionDouble
+    = DoubleInUnionDouble Float
+    | PurpleDoubleInUnionDouble Double
+
+type alias Double =
+    {
+    }
+
+type UnionDynamic
+    = DoubleInUnionDynamic Float
+    | DynamicInUnionDynamic Dynamic
+
+type alias Dynamic =
+    {
+    }
+
+type UnionDynamicCast
+    = DoubleInUnionDynamicCast Float
+    | DynamicCastInUnionDynamicCast DynamicCast
+
+type alias DynamicCast =
+    {
+    }
+
+type UnionElif
+    = DoubleInUnionElif Float
+    | ElifInUnionElif Elif
+
+type alias Elif =
+    {
+    }
+
+type UnionUnion
+    = DoubleInUnionUnion Float
+    | EmptyInUnionUnion Empty
+
+type alias Empty =
+    {
+    }
+
+type UnionEncodeQuickType
+    = DoubleInUnionEncodeQuickType Float
+    | EncodeQuickTypeInUnionEncodeQuickType EncodeQuickType
+
+type alias EncodeQuickType =
+    {
+    }
+
+type UnionEnum
+    = DoubleInUnionEnum Float
+    | EnumInUnionEnum Enum
+
+type alias Enum =
+    {
+    }
+
+type UnionEvent
+    = DoubleInUnionEvent Float
+    | EventInUnionEvent Event
+
+type alias Event =
+    {
+    }
+
+type UnionExcept
+    = DoubleInUnionExcept Float
+    | ExceptInUnionExcept Except
+
+type alias Except =
+    {
+    }
+
+type UnionException
+    = DoubleInUnionException Float
+    | ExceptionInUnionException Exception
+
+type alias Exception =
+    {
+    }
+
+type UnionExplicit
+    = DoubleInUnionExplicit Float
+    | ExplicitInUnionExplicit Explicit
+
+type alias Explicit =
+    {
+    }
+
+type UnionExport
+    = DoubleInUnionExport Float
+    | ExportInUnionExport Export
+
+type alias Export =
+    {
+    }
+
+type UnionExtends
+    = DoubleInUnionExtends Float
+    | ExtendsInUnionExtends Extends
+
+type alias Extends =
+    {
+    }
+
+type UnionExtension
+    = DoubleInUnionExtension Float
+    | ExtensionInUnionExtension Extension
+
+type alias Extension =
+    {
+    }
+
+type UnionExtern
+    = DoubleInUnionExtern Float
+    | ExternInUnionExtern Extern
+
+type alias Extern =
+    {
+    }
+
+type UnionFallthrough
+    = DoubleInUnionFallthrough Float
+    | FallthroughInUnionFallthrough Fallthrough
+
+type alias Fallthrough =
+    {
+    }
+
+type UnionFalse
+    = DoubleInUnionFalse Float
+    | FalseClassInUnionFalse FalseClass
+
+type alias FalseClass =
+    {
+    }
+
+type UnionFileprivate
+    = DoubleInUnionFileprivate Float
+    | FileprivateInUnionFileprivate Fileprivate
+
+type alias Fileprivate =
+    {
+    }
+
+type UnionFinal
+    = DoubleInUnionFinal Float
+    | FinalInUnionFinal Final
+
+type alias Final =
+    {
+    }
+
+type UnionFinally
+    = DoubleInUnionFinally Float
+    | FinallyInUnionFinally Finally
+
+type alias Finally =
+    {
+    }
+
+type UnionFixed
+    = DoubleInUnionFixed Float
+    | FixedInUnionFixed Fixed
+
+type alias Fixed =
+    {
+    }
+
+type UnionFor
+    = DoubleInUnionFor Float
+    | ForInUnionFor For
+
+type alias For =
+    {
+    }
+
+type UnionForeach
+    = DoubleInUnionForeach Float
+    | ForeachInUnionForeach Foreach
+
+type alias Foreach =
+    {
+    }
+
+type UnionFriend
+    = DoubleInUnionFriend Float
+    | FriendInUnionFriend Friend
+
+type alias Friend =
+    {
+    }
+
+type UnionFrom
+    = DoubleInUnionFrom Float
+    | FromInUnionFrom From
+
+type alias From =
+    {
+    }
+
+type UnionFromJSON
+    = DoubleInUnionFromJSON Float
+    | FromJSONInUnionFromJSON FromJSON
+
+type alias FromJSON =
+    {
+    }
+
+type UnionFunc
+    = DoubleInUnionFunc Float
+    | FuncInUnionFunc Func
+
+type alias Func =
+    {
+    }
+
+type UnionFunction
+    = DoubleInUnionFunction Float
+    | FunctionInUnionFunction Function
+
+type alias Function =
+    {
+    }
+
+type UnionGet
+    = DoubleInUnionGet Float
+    | GetInUnionGet Get
+
+type alias Get =
+    {
+    }
+
+type UnionGlobal
+    = DoubleInUnionGlobal Float
+    | GlobalInUnionGlobal Global
+
+type alias Global =
+    {
+    }
+
+type UnionGo
+    = DoubleInUnionGo Float
+    | GoInUnionGo Go
+
+type alias Go =
+    {
+    }
+
+type UnionGoto
+    = DoubleInUnionGoto Float
+    | GotoInUnionGoto Goto
+
+type alias Goto =
+    {
+    }
+
+type UnionGuard
+    = DoubleInUnionGuard Float
+    | GuardInUnionGuard Guard
+
+type alias Guard =
+    {
+    }
+
+type UnionHasOwnProperty
+    = DoubleInUnionHasOwnProperty Float
+    | HasOwnPropertyInUnionHasOwnProperty HasOwnProperty
+
+type alias HasOwnProperty =
+    {
+    }
+
+type UnionID
+    = DoubleInUnionID Float
+    | IDInUnionID ID
+
+type alias ID =
+    {
+    }
+
+type UnionImaginery
+    = DoubleInUnionImaginery Float
+    | ImagineryInUnionImaginery Imaginery
+
+type alias Imaginery =
+    {
+    }
+
+type UnionIMP
+    = DoubleInUnionIMP Float
+    | ImpInUnionIMP Imp
+
+type alias Imp =
+    {
+    }
+
+type UnionImplements
+    = DoubleInUnionImplements Float
+    | ImplementsInUnionImplements Implements
+
+type alias Implements =
+    {
+    }
+
+type UnionImplicit
+    = DoubleInUnionImplicit Float
+    | ImplicitInUnionImplicit Implicit
+
+type alias Implicit =
+    {
+    }
+
+type UnionIndirect
+    = DoubleInUnionIndirect Float
+    | IndirectInUnionIndirect Indirect
+
+type alias Indirect =
+    {
+    }
+
+type UnionInit
+    = DoubleInUnionInit Float
+    | InitInUnionInit Init
+
+type alias Init =
+    {
+    }
+
+type UnionInline
+    = DoubleInUnionInline Float
+    | InlineInUnionInline Inline
+
+type alias Inline =
+    {
+    }
+
+type UnionInout
+    = DoubleInUnionInout Float
+    | InoutInUnionInout Inout
+
+type alias Inout =
+    {
+    }
+
+type UnionInstanceof
+    = DoubleInUnionInstanceof Float
+    | InstanceofInUnionInstanceof Instanceof
+
+type alias Instanceof =
+    {
+    }
+
+type UnionInterface
+    = DoubleInUnionInterface Float
+    | InterfaceInUnionInterface Interface
+
+type alias Interface =
+    {
+    }
+
+type UnionInternal
+    = DoubleInUnionInternal Float
+    | InternalInUnionInternal Internal
+
+type alias Internal =
+    {
+    }
+
+type UnionIs
+    = DoubleInUnionIs Float
+    | IsInUnionIs Is
+
+type alias Is =
+    {
+    }
+
+type UnionIterable
+    = DoubleInUnionIterable Float
+    | IterableInUnionIterable Iterable
+
+type alias Iterable =
+    {
+    }
+
+type UnionJdec
+    = DoubleInUnionJdec Float
+    | JdecClassInUnionJdec JdecClass
+
+type alias JdecClass =
+    {
+    }
+
+type UnionJenc
+    = DoubleInUnionJenc Float
+    | JencClassInUnionJenc JencClass
+
+type alias JencClass =
+    {
+    }
+
+type UnionJpipe
+    = DoubleInUnionJpipe Float
+    | JpipeClassInUnionJpipe JpipeClass
+
+type alias JpipeClass =
+    {
+    }
+
+type UnionJSON
+    = DoubleInUnionJSON Float
+    | JSONInUnionJSON JSON
+
+type alias JSON =
+    {
+    }
+
+type UnionJSONConverter
+    = DoubleInUnionJSONConverter Float
+    | JSONConverterInUnionJSONConverter JSONConverter
+
+type alias JSONConverter =
+    {
+    }
+
+type UnionJSONSerializer
+    = DoubleInUnionJSONSerializer Float
+    | JSONSerializerInUnionJSONSerializer JSONSerializer
+
+type alias JSONSerializer =
+    {
+    }
+
+type UnionJSONToken
+    = DoubleInUnionJSONToken Float
+    | JSONTokenInUnionJSONToken JSONToken
+
+type alias JSONToken =
+    {
+    }
+
+type UnionJSONWriter
+    = DoubleInUnionJSONWriter Float
+    | JSONWriterInUnionJSONWriter JSONWriter
+
+type alias JSONWriter =
+    {
+    }
+
+type UnionLambda
+    = DoubleInUnionLambda Float
+    | LambdaInUnionLambda Lambda
+
+type alias Lambda =
+    {
+    }
+
+type UnionLazy
+    = DoubleInUnionLazy Float
+    | LazyInUnionLazy Lazy
+
+type alias Lazy =
+    {
+    }
+
+type UnionLeft
+    = DoubleInUnionLeft Float
+    | LeftInUnionLeft Left
+
+type alias Left =
+    {
+    }
+
+type UnionList
+    = DoubleInUnionList Float
+    | ListClassInUnionList ListClass
+
+type alias ListClass =
+    {
+    }
+
+type UnionLock
+    = DoubleInUnionLock Float
+    | LockInUnionLock Lock
+
+type alias Lock =
+    {
+    }
+
+type UnionLong
+    = DoubleInUnionLong Float
+    | LongInUnionLong Long
+
+type alias Long =
+    {
+    }
+
+type UnionMap
+    = DoubleInUnionMap Float
+    | MapInUnionMap Map
+
+type alias Map =
+    {
+    }
+
+type UnionMetadataPropertyHandling
+    = DoubleInUnionMetadataPropertyHandling Float
+    | MetadataPropertyHandlingInUnionMetadataPropertyHandling MetadataPropertyHandling
+
+type alias MetadataPropertyHandling =
+    {
+    }
+
+type UnionMutable
+    = DoubleInUnionMutable Float
+    | MutableInUnionMutable Mutable
+
+type alias Mutable =
+    {
+    }
+
+type UnionMutating
+    = DoubleInUnionMutating Float
+    | MutatingInUnionMutating Mutating
+
+type alias Mutating =
+    {
+    }
+
+type UnionNamespace
+    = DoubleInUnionNamespace Float
+    | NamespaceInUnionNamespace Namespace
+
+type alias Namespace =
+    {
+    }
+
+type UnionNative
+    = DoubleInUnionNative Float
+    | NativeInUnionNative Native
+
+type alias Native =
+    {
+    }
+
+type UnionNew
+    = DoubleInUnionNew Float
+    | NewInUnionNew New
+
+type alias New =
+    {
+    }
+
+type UnionNewtonsoft
+    = DoubleInUnionNewtonsoft Float
+    | NewtonsoftInUnionNewtonsoft Newtonsoft
+
+type alias Newtonsoft =
+    {
+    }
+
+type UnionNil
+    = DoubleInUnionNil Float
+    | NilInUnionNil Nil
+
+type alias Nil =
+    {
+    }
+
+type UnionNO
+    = DoubleInUnionNO Float
+    | NoInUnionNO No
+
+type alias No =
+    {
+    }
+
+type UnionNoexcept
+    = DoubleInUnionNoexcept Float
+    | NoexceptInUnionNoexcept Noexcept
+
+type alias Noexcept =
+    {
+    }
+
+type UnionNonatomic
+    = DoubleInUnionNonatomic Float
+    | NonatomicInUnionNonatomic Nonatomic
+
+type alias Nonatomic =
+    {
+    }
+
+type UnionNone
+    = DoubleInUnionNone Float
+    | NoneInUnionNone None
+
+type alias None =
+    {
+    }
+
+type UnionNonlocal
+    = DoubleInUnionNonlocal Float
+    | NonlocalInUnionNonlocal Nonlocal
+
+type alias Nonlocal =
+    {
+    }
+
+type UnionNonmutating
+    = DoubleInUnionNonmutating Float
+    | NonmutatingInUnionNonmutating Nonmutating
+
+type alias Nonmutating =
+    {
+    }
+
+type UnionNot
+    = DoubleInUnionNot Float
+    | NotInUnionNot Not
+
+type alias Not =
+    {
+    }
+
+type UnionNotEq
+    = DoubleInUnionNotEq Float
+    | NotEqInUnionNotEq NotEq
+
+type alias NotEq =
+    {
+    }
+
+type UnionNSString
+    = DoubleInUnionNSString Float
+    | NSStringInUnionNSString NSString
+
+type alias NSString =
+    {
+    }
+
+type UnionNULL
+    = DoubleInUnionNULL Float
+    | NullInUnionNULL Null
+
+type alias Null =
+    {
+    }
+
+type UnionNullptr
+    = DoubleInUnionNullptr Float
+    | NullptrInUnionNullptr Nullptr
+
+type alias Nullptr =
+    {
+    }
+
+type UnionNumber
+    = DoubleInUnionNumber Float
+    | NumberInUnionNumber Number
+
+type alias Number =
+    {
+    }
+
+type UnionObject
+    = DoubleInUnionObject Float
+    | ObjectInUnionObject Object
+
+type alias Object =
+    {
+    }
+
+type UnionOneway
+    = DoubleInUnionOneway Float
+    | OnewayInUnionOneway Oneway
+
+type alias Oneway =
+    {
+    }
+
+type UnionOpen
+    = DoubleInUnionOpen Float
+    | OpenInUnionOpen Open
+
+type alias Open =
+    {
+    }
+
+type UnionOperator
+    = DoubleInUnionOperator Float
+    | OperatorInUnionOperator Operator
+
+type alias Operator =
+    {
+    }
+
+type UnionOptional
+    = DoubleInUnionOptional Float
+    | OptionalInUnionOptional Optional
+
+type alias Optional =
+    {
+    }
+
+type UnionOr
+    = DoubleInUnionOr Float
+    | OrInUnionOr Or
+
+type alias Or =
+    {
+    }
+
+type UnionOrEq
+    = DoubleInUnionOrEq Float
+    | OrEqInUnionOrEq OrEq
+
+type alias OrEq =
+    {
+    }
+
+type UnionOut
+    = DoubleInUnionOut Float
+    | OutInUnionOut Out
+
+type alias Out =
+    {
+    }
+
+type UnionOverride
+    = DoubleInUnionOverride Float
+    | OverrideInUnionOverride Override
+
+type alias Override =
+    {
+    }
+
+type UnionPackage
+    = DoubleInUnionPackage Float
+    | PackageInUnionPackage Package
+
+type alias Package =
+    {
+    }
+
+type UnionParams
+    = DoubleInUnionParams Float
+    | ParamsInUnionParams Params
+
+type alias Params =
+    {
+    }
+
+type UnionPass
+    = DoubleInUnionPass Float
+    | PassInUnionPass Pass
+
+type alias Pass =
+    {
+    }
+
+type UnionPostfix
+    = DoubleInUnionPostfix Float
+    | PostfixInUnionPostfix Postfix
+
+type alias Postfix =
+    {
+    }
+
+type UnionPrecedence
+    = DoubleInUnionPrecedence Float
+    | PrecedenceInUnionPrecedence Precedence
+
+type alias Precedence =
+    {
+    }
+
+type UnionPrefix
+    = DoubleInUnionPrefix Float
+    | PrefixInUnionPrefix Prefix
+
+type alias Prefix =
+    {
+    }
+
+type UnionPrint
+    = DoubleInUnionPrint Float
+    | PrintInUnionPrint Print
+
+type alias Print =
+    {
+    }
+
+type UnionPrintf
+    = DoubleInUnionPrintf Float
+    | PrintfInUnionPrintf Printf
+
+type alias Printf =
+    {
+    }
+
+type UnionPrivate
+    = DoubleInUnionPrivate Float
+    | PrivateInUnionPrivate Private
+
+type alias Private =
+    {
+    }
+
+type UnionProtected
+    = DoubleInUnionProtected Float
+    | ProtectedInUnionProtected Protected
+
+type alias Protected =
+    {
+    }
+
+type UnionProtocol
+    = DoubleInUnionProtocol Float
+    | ProtocolInUnionProtocol Protocol
+
+type alias Protocol =
+    {
+    }
+
+type UnionPublic
+    = DoubleInUnionPublic Float
+    | PublicInUnionPublic Public
+
+type alias Public =
+    {
+    }
+
+type UnionBoolUnion
+    = DoubleInUnionBoolUnion Float
+    | UnionBoolBoolInUnionBoolUnion UnionBoolBool
+
+type alias UnionBoolBool =
+    {
+    }
+
+type UnionTypeUnion
+    = DoubleInUnionTypeUnion Float
+    | TypeClassInUnionTypeUnion TypeClass
+
+type alias TypeClass =
+    {
+    }
+
+type UnionAnyUnion
+    = AnyClassInUnionAnyUnion AnyClass
+    | DoubleInUnionAnyUnion Float
+
+type alias AnyClass =
+    {
+    }
+
+type UnionAs
+    = AsInUnionAs As
+    | DoubleInUnionAs Float
+
+type alias As =
+    {
+    }
+
+type UnionBOOL
+    = BoolInUnionBOOL Bool
+    | DoubleInUnionBOOL Float
+
+type alias Bool =
+    {
+    }
+
+type UnionBool
+    = BoolClassInUnionBool BoolClass
+    | DoubleInUnionBool Float
+
+type alias BoolClass =
+    {
+    }
+
+type UnionCase
+    = CaseInUnionCase Case
+    | DoubleInUnionCase Float
+
+type alias Case =
+    {
+    }
+
+type UnionClassUnion
+    = ClassClassInUnionClassUnion ClassClass
+    | DoubleInUnionClassUnion Float
+
+type alias ClassClass =
+    {
+    }
+
+type UnionElse
+    = DoubleInUnionElse Float
+    | ElseInUnionElse Else
+
+type alias Else =
+    {
+    }
+
+type UnionExposing
+    = DoubleInUnionExposing Float
+    | ExposingInUnionExposing Exposing
+
+type alias Exposing =
+    {
+    }
+
+type UnionFalseUnion
+    = DoubleInUnionFalseUnion Float
+    | UnionFalseFalseInUnionFalseUnion UnionFalseFalse
+
+type alias UnionFalseFalse =
+    {
+    }
+
+type UnionFloat
+    = DoubleInUnionFloat Float
+    | FloatClassInUnionFloat FloatClass
+
+type alias FloatClass =
+    {
+    }
+
+type UnionIf
+    = DoubleInUnionIf Float
+    | IfInUnionIf If
+
+type alias If =
+    {
+    }
+
+type UnionImport
+    = DoubleInUnionImport Float
+    | ImportInUnionImport Import
+
+type alias Import =
+    {
+    }
+
+type UnionIn
+    = DoubleInUnionIn Float
+    | InInUnionIn In
+
+type alias In =
+    {
+    }
+
+type UnionInfix
+    = DoubleInUnionInfix Float
+    | InfixInUnionInfix Infix
+
+type alias Infix =
+    {
+    }
+
+type UnionInt
+    = DoubleInUnionInt Float
+    | IntClassInUnionInt IntClass
+
+type alias IntClass =
+    {
+    }
+
+type UnionLet
+    = DoubleInUnionLet Float
+    | LetInUnionLet Let
+
+type alias Let =
+    {
+    }
+
+type UnionModule
+    = DoubleInUnionModule Float
+    | ModuleInUnionModule Module
+
+type alias Module =
+    {
+    }
+
+type UnionNoneUnion
+    = DoubleInUnionNoneUnion Float
+    | NoneClassInUnionNoneUnion NoneClass
+
+type alias NoneClass =
+    {
+    }
+
+type UnionNull
+    = DoubleInUnionNull Float
+    | NullClassInUnionNull NullClass
+
+type alias NullClass =
+    {
+    }
+
+type UnionOf
+    = DoubleInUnionOf Float
+    | OfInUnionOf Of
+
+type alias Of =
+    {
+    }
+
+type UnionPort
+    = DoubleInUnionPort Float
+    | PortInUnionPort Port
+
+type alias Port =
+    {
+    }
+
+type UnionProtocolUnion
+    = DoubleInUnionProtocolUnion Float
+    | ProtocolClassInUnionProtocolUnion ProtocolClass
+
+type alias ProtocolClass =
+    {
+    }
+
+type UnionSelfUnion
+    = DoubleInUnionSelfUnion Float
+    | SelfClassInUnionSelfUnion SelfClass
+
+type alias SelfClass =
+    {
+    }
+
+type UnionString
+    = DoubleInUnionString Float
+    | StringClassInUnionString StringClass
+
+type alias StringClass =
+    {
+    }
+
+type UnionThen
+    = DoubleInUnionThen Float
+    | ThenInUnionThen Then
+
+type alias Then =
+    {
+    }
+
+type UnionTrueUnion
+    = DoubleInUnionTrueUnion Float
+    | UnionTrueTrueInUnionTrueUnion UnionTrueTrue
+
+type alias UnionTrueTrue =
+    {
+    }
+
+type UnionType
+    = DoubleInUnionType Float
+    | TypeInUnionType Type
+
+type alias Type =
+    {
+    }
+
+type UnionWhere
+    = DoubleInUnionWhere Float
+    | WhereInUnionWhere Where
+
+type alias Where =
+    {
+    }
+
+type UnionQuicktype
+    = DoubleInUnionQuicktype Float
+    | QuicktypeInUnionQuicktype Quicktype
+
+type alias Quicktype =
+    {
+    }
+
+type UnionRaise
+    = DoubleInUnionRaise Float
+    | RaiseInUnionRaise Raise
+
+type alias Raise =
+    {
+    }
+
+type UnionRange
+    = DoubleInUnionRange Float
+    | RangeInUnionRange Range
+
+type alias Range =
+    {
+    }
+
+type UnionReadonly
+    = DoubleInUnionReadonly Float
+    | ReadonlyInUnionReadonly Readonly
+
+type alias Readonly =
+    {
+    }
+
+type UnionRef
+    = DoubleInUnionRef Float
+    | RefInUnionRef Ref
+
+type alias Ref =
+    {
+    }
+
+type UnionRegister
+    = DoubleInUnionRegister Float
+    | RegisterInUnionRegister Register
+
+type alias Register =
+    {
+    }
+
+type UnionReinterpretCast
+    = DoubleInUnionReinterpretCast Float
+    | ReinterpretCastInUnionReinterpretCast ReinterpretCast
+
+type alias ReinterpretCast =
+    {
+    }
+
+type UnionRepeat
+    = DoubleInUnionRepeat Float
+    | RepeatInUnionRepeat Repeat
+
+type alias Repeat =
+    {
+    }
+
+type UnionRequire
+    = DoubleInUnionRequire Float
+    | RequireInUnionRequire Require
+
+type alias Require =
+    {
+    }
+
+type UnionRequired
+    = DoubleInUnionRequired Float
+    | RequiredInUnionRequired Required
+
+type alias Required =
+    {
+    }
+
+type UnionRequires
+    = DoubleInUnionRequires Float
+    | RequiresInUnionRequires Requires
+
+type alias Requires =
+    {
+    }
+
+type UnionRestrict
+    = DoubleInUnionRestrict Float
+    | RestrictInUnionRestrict Restrict
+
+type alias Restrict =
+    {
+    }
+
+type UnionRetain
+    = DoubleInUnionRetain Float
+    | RetainInUnionRetain Retain
+
+type alias Retain =
+    {
+    }
+
+type UnionRethrows
+    = DoubleInUnionRethrows Float
+    | RethrowsInUnionRethrows Rethrows
+
+type alias Rethrows =
+    {
+    }
+
+type UnionReturn
+    = DoubleInUnionReturn Float
+    | ReturnInUnionReturn Return
+
+type alias Return =
+    {
+    }
+
+type UnionRight
+    = DoubleInUnionRight Float
+    | RightInUnionRight Right
+
+type alias Right =
+    {
+    }
+
+type UnionSbyte
+    = DoubleInUnionSbyte Float
+    | SbyteInUnionSbyte Sbyte
+
+type alias Sbyte =
+    {
+    }
+
+type UnionSealed
+    = DoubleInUnionSealed Float
+    | SealedInUnionSealed Sealed
+
+type alias Sealed =
+    {
+    }
+
+type UnionSEL
+    = DoubleInUnionSEL Float
+    | SelInUnionSEL Sel
+
+type alias Sel =
+    {
+    }
+
+type UnionSelect
+    = DoubleInUnionSelect Float
+    | SelectInUnionSelect Select
+
+type alias Select =
+    {
+    }
+
+type UnionSelf
+    = DoubleInUnionSelf Float
+    | SelfInUnionSelf Self
+
+type alias Self =
+    {
+    }
+
+type UnionSerialize
+    = DoubleInUnionSerialize Float
+    | SerializeInUnionSerialize Serialize
+
+type alias Serialize =
+    {
+    }
+
+type UnionSet
+    = DoubleInUnionSet Float
+    | SetInUnionSet Set
+
+type alias Set =
+    {
+    }
+
+type UnionShort
+    = DoubleInUnionShort Float
+    | ShortInUnionShort Short
+
+type alias Short =
+    {
+    }
+
+type UnionSigned
+    = DoubleInUnionSigned Float
+    | SignedInUnionSigned Signed
+
+type alias Signed =
+    {
+    }
+
+type UnionSizeof
+    = DoubleInUnionSizeof Float
+    | SizeofInUnionSizeof Sizeof
+
+type alias Sizeof =
+    {
+    }
+
+type UnionStackalloc
+    = DoubleInUnionStackalloc Float
+    | StackallocInUnionStackalloc Stackalloc
+
+type alias Stackalloc =
+    {
+    }
+
+type UnionStatic
+    = DoubleInUnionStatic Float
+    | StaticInUnionStatic Static
+
+type alias Static =
+    {
+    }
+
+type UnionStaticAssert
+    = DoubleInUnionStaticAssert Float
+    | StaticAssertInUnionStaticAssert StaticAssert
+
+type alias StaticAssert =
+    {
+    }
+
+type UnionStaticCast
+    = DoubleInUnionStaticCast Float
+    | StaticCastInUnionStaticCast StaticCast
+
+type alias StaticCast =
+    {
+    }
+
+type UnionStrictfp
+    = DoubleInUnionStrictfp Float
+    | StrictfpInUnionStrictfp Strictfp
+
+type alias Strictfp =
+    {
+    }
+
+type UnionStruct
+    = DoubleInUnionStruct Float
+    | StructInUnionStruct Struct
+
+type alias Struct =
+    {
+    }
+
+type UnionSubscript
+    = DoubleInUnionSubscript Float
+    | SubscriptInUnionSubscript Subscript
+
+type alias Subscript =
+    {
+    }
+
+type UnionSuper
+    = DoubleInUnionSuper Float
+    | SuperInUnionSuper Super
+
+type alias Super =
+    {
+    }
+
+type UnionSwitch
+    = DoubleInUnionSwitch Float
+    | SwitchInUnionSwitch Switch
+
+type alias Switch =
+    {
+    }
+
+type UnionSymbol
+    = DoubleInUnionSymbol Float
+    | SymbolInUnionSymbol Symbol
+
+type alias Symbol =
+    {
+    }
+
+type UnionSynchronized
+    = DoubleInUnionSynchronized Float
+    | SynchronizedInUnionSynchronized Synchronized
+
+type alias Synchronized =
+    {
+    }
+
+type UnionSystem
+    = DoubleInUnionSystem Float
+    | SystemInUnionSystem System
+
+type alias System =
+    {
+    }
+
+type UnionTemplate
+    = DoubleInUnionTemplate Float
+    | TemplateInUnionTemplate Template
+
+type alias Template =
+    {
+    }
+
+type UnionThis
+    = DoubleInUnionThis Float
+    | ThisInUnionThis This
+
+type alias This =
+    {
+    }
+
+type UnionThreadLocal
+    = DoubleInUnionThreadLocal Float
+    | ThreadLocalInUnionThreadLocal ThreadLocal
+
+type alias ThreadLocal =
+    {
+    }
+
+type UnionThrow
+    = DoubleInUnionThrow Float
+    | ThrowInUnionThrow Throw
+
+type alias Throw =
+    {
+    }
+
+type UnionThrows
+    = DoubleInUnionThrows Float
+    | ThrowsInUnionThrows Throws
+
+type alias Throws =
+    {
+    }
+
+type UnionToJSON
+    = DoubleInUnionToJSON Float
+    | ToJSONInUnionToJSON ToJSON
+
+type alias ToJSON =
+    {
+    }
+
+type UnionTopLevel
+    = DoubleInUnionTopLevel Float
+    | TopLevelInUnionTopLevel TopLevel
+
+type alias TopLevel =
+    {
+    }
+
+type UnionTransient
+    = DoubleInUnionTransient Float
+    | TransientInUnionTransient Transient
+
+type alias Transient =
+    {
+    }
+
+type UnionTrue
+    = DoubleInUnionTrue Float
+    | TrueClassInUnionTrue TrueClass
+
+type alias TrueClass =
+    {
+    }
+
+type UnionTry
+    = DoubleInUnionTry Float
+    | TryInUnionTry Try
+
+type alias Try =
+    {
+    }
+
+type UnionTypealias
+    = DoubleInUnionTypealias Float
+    | TypealiasInUnionTypealias Typealias
+
+type alias Typealias =
+    {
+    }
+
+type UnionTypedef
+    = DoubleInUnionTypedef Float
+    | TypedefInUnionTypedef Typedef
+
+type alias Typedef =
+    {
+    }
+
+type UnionTypeid
+    = DoubleInUnionTypeid Float
+    | TypeidInUnionTypeid Typeid
+
+type alias Typeid =
+    {
+    }
+
+type UnionTypename
+    = DoubleInUnionTypename Float
+    | TypenameInUnionTypename Typename
+
+type alias Typename =
+    {
+    }
+
+type UnionTypeof
+    = DoubleInUnionTypeof Float
+    | TypeofInUnionTypeof Typeof
+
+type alias Typeof =
+    {
+    }
+
+type UnionUint
+    = DoubleInUnionUint Float
+    | UintInUnionUint Uint
+
+type alias Uint =
+    {
+    }
+
+type UnionUlong
+    = DoubleInUnionUlong Float
+    | UlongInUnionUlong Ulong
+
+type alias Ulong =
+    {
+    }
+
+type UnionUnchecked
+    = DoubleInUnionUnchecked Float
+    | UncheckedInUnionUnchecked Unchecked
+
+type alias Unchecked =
+    {
+    }
+
+type UnionUndefined
+    = DoubleInUnionUndefined Float
+    | UndefinedInUnionUndefined Undefined
+
+type alias Undefined =
+    {
+    }
+
+type UnionUnionUnion
+    = DoubleInUnionUnionUnion Float
+    | UnionInUnionUnionUnion Union
+
+type alias Union =
+    {
+    }
+
+type UnionUnowned
+    = DoubleInUnionUnowned Float
+    | UnownedInUnionUnowned Unowned
+
+type alias Unowned =
+    {
+    }
+
+type UnionUnsafe
+    = DoubleInUnionUnsafe Float
+    | UnsafeInUnionUnsafe Unsafe
+
+type alias Unsafe =
+    {
+    }
+
+type UnionUnsigned
+    = DoubleInUnionUnsigned Float
+    | UnsignedInUnionUnsigned Unsigned
+
+type alias Unsigned =
+    {
+    }
+
+type UnionUshort
+    = DoubleInUnionUshort Float
+    | UshortInUnionUshort Ushort
+
+type alias Ushort =
+    {
+    }
+
+type UnionUsing
+    = DoubleInUnionUsing Float
+    | UsingInUnionUsing Using
+
+type alias Using =
+    {
+    }
+
+type UnionVar
+    = DoubleInUnionVar Float
+    | VarInUnionVar Var
+
+type alias Var =
+    {
+    }
+
+type UnionVirtual
+    = DoubleInUnionVirtual Float
+    | VirtualInUnionVirtual Virtual
+
+type alias Virtual =
+    {
+    }
+
+type UnionVoid
+    = DoubleInUnionVoid Float
+    | VoidInUnionVoid Void
+
+type alias Void =
+    {
+    }
+
+type UnionVolatile
+    = DoubleInUnionVolatile Float
+    | VolatileInUnionVolatile Volatile
+
+type alias Volatile =
+    {
+    }
+
+type UnionWcharT
+    = DoubleInUnionWcharT Float
+    | WcharTInUnionWcharT WcharT
+
+type alias WcharT =
+    {
+    }
+
+type UnionWeak
+    = DoubleInUnionWeak Float
+    | WeakInUnionWeak Weak
+
+type alias Weak =
+    {
+    }
+
+type UnionWhile
+    = DoubleInUnionWhile Float
+    | WhileInUnionWhile While
+
+type alias While =
+    {
+    }
+
+type UnionWillSet
+    = DoubleInUnionWillSet Float
+    | WillSetInUnionWillSet WillSet
+
+type alias WillSet =
+    {
+    }
+
+type UnionWith
+    = DoubleInUnionWith Float
+    | WithInUnionWith With
+
+type alias With =
+    {
+    }
+
+type UnionXor
+    = DoubleInUnionXor Float
+    | XorInUnionXor Xor
+
+type alias Xor =
+    {
+    }
+
+type UnionXorEq
+    = DoubleInUnionXorEq Float
+    | XorEqInUnionXorEq XorEq
+
+type alias XorEq =
+    {
+    }
+
+type UnionYES
+    = DoubleInUnionYES Float
+    | YesInUnionYES Yes
+
+type alias Yes =
+    {
+    }
+
+type UnionYield
+    = DoubleInUnionYield Float
+    | YieldInUnionYield Yield
+
+type alias Yield =
+    {
+    }
+
+-- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
+
+quickTypeToString : QuickType -> String
+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
+
+quickType : Jdec.Decoder QuickType
+quickType =
+    Jdec.succeed QuickType
+        |> Jpipe.custom (optionalField "_" (Jdec.nullable unionUnion) Nothing)
+        |> Jpipe.custom (optionalField "_Bool" (Jdec.nullable unionBool) Nothing)
+        |> Jpipe.custom (optionalField "_Complex" (Jdec.nullable unionComplex) Nothing)
+        |> Jpipe.custom (optionalField "_Imaginery" (Jdec.nullable unionImaginery) Nothing)
+        |> Jpipe.custom (optionalField "abstract" (Jdec.nullable unionAbstract) Nothing)
+        |> Jpipe.custom (optionalField "alignas" (Jdec.nullable unionAlignas) Nothing)
+        |> Jpipe.custom (optionalField "alignof" (Jdec.nullable unionAlignof) Nothing)
+        |> Jpipe.custom (optionalField "and" (Jdec.nullable unionAnd) Nothing)
+        |> Jpipe.custom (optionalField "and_eq" (Jdec.nullable unionAndEq) Nothing)
+        |> Jpipe.custom (optionalField "any" (Jdec.nullable unionAnyUnion) Nothing)
+        |> Jpipe.custom (optionalField "Any" (Jdec.nullable unionAny) Nothing)
+        |> Jpipe.custom (optionalField "array" (Jdec.nullable unionArray) Nothing)
+        |> Jpipe.custom (optionalField "as" (Jdec.nullable unionAs) Nothing)
+        |> Jpipe.custom (optionalField "asm" (Jdec.nullable unionASM) Nothing)
+        |> Jpipe.custom (optionalField "assert" (Jdec.nullable unionAssert) Nothing)
+        |> Jpipe.custom (optionalField "associatedtype" (Jdec.nullable unionAssociatedtype) Nothing)
+        |> Jpipe.custom (optionalField "associativity" (Jdec.nullable unionAssociativity) Nothing)
+        |> Jpipe.custom (optionalField "async" (Jdec.nullable unionAsync) Nothing)
+        |> Jpipe.custom (optionalField "atomic" (Jdec.nullable unionAtomic) Nothing)
+        |> Jpipe.custom (optionalField "atomic_cancel" (Jdec.nullable unionAtomicCancel) Nothing)
+        |> Jpipe.custom (optionalField "atomic_commit" (Jdec.nullable unionAtomicCommit) Nothing)
+        |> Jpipe.custom (optionalField "atomic_noexcept" (Jdec.nullable unionAtomicNoexcept) Nothing)
+        |> Jpipe.custom (optionalField "auto" (Jdec.nullable unionAuto) Nothing)
+        |> Jpipe.custom (optionalField "await" (Jdec.nullable unionAwait) Nothing)
+        |> Jpipe.custom (optionalField "base" (Jdec.nullable unionBase) Nothing)
+        |> Jpipe.custom (optionalField "bitand" (Jdec.nullable unionBitand) Nothing)
+        |> Jpipe.custom (optionalField "bitor" (Jdec.nullable unionBitor) Nothing)
+        |> Jpipe.custom (optionalField "BOOL" (Jdec.nullable unionBOOL) Nothing)
+        |> Jpipe.custom (optionalField "bool" (Jdec.nullable unionBoolUnion) Nothing)
+        |> Jpipe.custom (optionalField "boolean" (Jdec.nullable unionBoolean) Nothing)
+        |> Jpipe.custom (optionalField "break" (Jdec.nullable unionBreak) Nothing)
+        |> Jpipe.custom (optionalField "bycopy" (Jdec.nullable unionBycopy) Nothing)
+        |> Jpipe.custom (optionalField "byref" (Jdec.nullable unionByref) Nothing)
+        |> Jpipe.custom (optionalField "byte" (Jdec.nullable unionByte) Nothing)
+        |> Jpipe.custom (optionalField "case" (Jdec.nullable unionCase) Nothing)
+        |> Jpipe.custom (optionalField "catch" (Jdec.nullable unionCatch) Nothing)
+        |> Jpipe.custom (optionalField "chan" (Jdec.nullable unionChan) Nothing)
+        |> Jpipe.custom (optionalField "char" (Jdec.nullable unionChar) Nothing)
+        |> Jpipe.custom (optionalField "char16_t" (Jdec.nullable unionChar16T) Nothing)
+        |> Jpipe.custom (optionalField "char32_t" (Jdec.nullable unionChar32T) Nothing)
+        |> Jpipe.custom (optionalField "checked" (Jdec.nullable unionChecked) Nothing)
+        |> Jpipe.custom (optionalField "class" (Jdec.nullable unionClassUnion) Nothing)
+        |> Jpipe.custom (optionalField "Class" (Jdec.nullable unionClass) Nothing)
+        |> Jpipe.custom (optionalField "co_await" (Jdec.nullable unionCoAwait) Nothing)
+        |> Jpipe.custom (optionalField "co_return" (Jdec.nullable unionCoReturn) Nothing)
+        |> Jpipe.custom (optionalField "co_yield" (Jdec.nullable unionCoYield) Nothing)
+        |> Jpipe.custom (optionalField "compl" (Jdec.nullable unionCompl) Nothing)
+        |> Jpipe.custom (optionalField "concept" (Jdec.nullable unionConcept) Nothing)
+        |> Jpipe.custom (optionalField "console" (Jdec.nullable unionConsole) Nothing)
+        |> Jpipe.custom (optionalField "const" (Jdec.nullable unionConst) Nothing)
+        |> Jpipe.custom (optionalField "const_cast" (Jdec.nullable unionConstCast) Nothing)
+        |> Jpipe.custom (optionalField "constexpr" (Jdec.nullable unionConstexpr) Nothing)
+        |> Jpipe.custom (optionalField "constructor" (Jdec.nullable unionConstructor) Nothing)
+        |> Jpipe.custom (optionalField "continue" (Jdec.nullable unionContinue) Nothing)
+        |> Jpipe.custom (optionalField "convenience" (Jdec.nullable unionConvenience) Nothing)
+        |> Jpipe.custom (optionalField "convert" (Jdec.nullable unionConvert) Nothing)
+        |> Jpipe.custom (optionalField "converter" (Jdec.nullable unionConverter) Nothing)
+        |> Jpipe.custom (optionalField "date" (Jdec.nullable unionDate) Nothing)
+        |> Jpipe.custom (optionalField "date_parse_handling" (Jdec.nullable unionDateParseHandling) Nothing)
+        |> Jpipe.custom (optionalField "debugger" (Jdec.nullable unionDebugger) Nothing)
+        |> Jpipe.custom (optionalField "decimal" (Jdec.nullable unionDecimal) Nothing)
+        |> Jpipe.custom (optionalField "declare" (Jdec.nullable unionDeclare) Nothing)
+        |> Jpipe.custom (optionalField "decltype" (Jdec.nullable unionDecltype) Nothing)
+        |> Jpipe.custom (optionalField "decode_string" (Jdec.nullable unionDecodeString) Nothing)
+        |> Jpipe.custom (optionalField "def" (Jdec.nullable unionDef) Nothing)
+        |> Jpipe.custom (optionalField "default" (Jdec.nullable unionDefault) Nothing)
+        |> Jpipe.custom (optionalField "defer" (Jdec.nullable unionDefer) Nothing)
+        |> Jpipe.custom (optionalField "deinit" (Jdec.nullable unionDeinit) Nothing)
+        |> Jpipe.custom (optionalField "del" (Jdec.nullable unionDel) Nothing)
+        |> Jpipe.custom (optionalField "delegate" (Jdec.nullable unionDelegate) Nothing)
+        |> Jpipe.custom (optionalField "delete" (Jdec.nullable unionDelete) Nothing)
+        |> Jpipe.custom (optionalField "dict" (Jdec.nullable unionDict) Nothing)
+        |> Jpipe.custom (optionalField "dictionary" (Jdec.nullable unionDictionary) Nothing)
+        |> Jpipe.custom (optionalField "didSet" (Jdec.nullable unionDidSet) Nothing)
+        |> Jpipe.custom (optionalField "do" (Jdec.nullable unionDo) Nothing)
+        |> Jpipe.custom (optionalField "double" (Jdec.nullable unionDouble) Nothing)
+        |> Jpipe.custom (optionalField "dummy" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "dynamic" (Jdec.nullable unionDynamic) Nothing)
+        |> Jpipe.custom (optionalField "dynamic_cast" (Jdec.nullable unionDynamicCast) Nothing)
+        |> Jpipe.custom (optionalField "elif" (Jdec.nullable unionElif) Nothing)
+        |> Jpipe.custom (optionalField "else" (Jdec.nullable unionElse) Nothing)
+        |> Jpipe.custom (optionalField "encode_quick_type" (Jdec.nullable unionEncodeQuickType) Nothing)
+        |> Jpipe.custom (optionalField "enum" (Jdec.nullable unionEnum) Nothing)
+        |> Jpipe.custom (optionalField "event" (Jdec.nullable unionEvent) Nothing)
+        |> Jpipe.custom (optionalField "except" (Jdec.nullable unionExcept) Nothing)
+        |> Jpipe.custom (optionalField "exception" (Jdec.nullable unionException) Nothing)
+        |> Jpipe.custom (optionalField "explicit" (Jdec.nullable unionExplicit) Nothing)
+        |> Jpipe.custom (optionalField "export" (Jdec.nullable unionExport) Nothing)
+        |> Jpipe.custom (optionalField "exposing" (Jdec.nullable unionExposing) Nothing)
+        |> Jpipe.custom (optionalField "extends" (Jdec.nullable unionExtends) Nothing)
+        |> Jpipe.custom (optionalField "extension" (Jdec.nullable unionExtension) Nothing)
+        |> Jpipe.custom (optionalField "extern" (Jdec.nullable unionExtern) Nothing)
+        |> Jpipe.custom (optionalField "fallthrough" (Jdec.nullable unionFallthrough) Nothing)
+        |> Jpipe.custom (optionalField "false" (Jdec.nullable unionFalseUnion) Nothing)
+        |> Jpipe.custom (optionalField "False" (Jdec.nullable unionFalse) Nothing)
+        |> Jpipe.custom (optionalField "fileprivate" (Jdec.nullable unionFileprivate) Nothing)
+        |> Jpipe.custom (optionalField "final" (Jdec.nullable unionFinal) Nothing)
+        |> Jpipe.custom (optionalField "finally" (Jdec.nullable unionFinally) Nothing)
+        |> Jpipe.custom (optionalField "fixed" (Jdec.nullable unionFixed) Nothing)
+        |> Jpipe.custom (optionalField "float" (Jdec.nullable unionFloat) Nothing)
+        |> Jpipe.custom (optionalField "for" (Jdec.nullable unionFor) Nothing)
+        |> Jpipe.custom (optionalField "foreach" (Jdec.nullable unionForeach) Nothing)
+        |> Jpipe.custom (optionalField "friend" (Jdec.nullable unionFriend) Nothing)
+        |> Jpipe.custom (optionalField "from" (Jdec.nullable unionFrom) Nothing)
+        |> Jpipe.custom (optionalField "from_json" (Jdec.nullable unionFromJSON) Nothing)
+        |> Jpipe.custom (optionalField "func" (Jdec.nullable unionFunc) Nothing)
+        |> Jpipe.custom (optionalField "function" (Jdec.nullable unionFunction) Nothing)
+        |> Jpipe.custom (optionalField "get" (Jdec.nullable unionGet) Nothing)
+        |> Jpipe.custom (optionalField "global" (Jdec.nullable unionGlobal) Nothing)
+        |> Jpipe.custom (optionalField "go" (Jdec.nullable unionGo) Nothing)
+        |> Jpipe.custom (optionalField "goto" (Jdec.nullable unionGoto) Nothing)
+        |> Jpipe.custom (optionalField "guard" (Jdec.nullable unionGuard) Nothing)
+        |> Jpipe.custom (optionalField "hasOwnProperty" (Jdec.nullable unionHasOwnProperty) Nothing)
+        |> Jpipe.custom (optionalField "id" (Jdec.nullable unionID) Nothing)
+        |> Jpipe.custom (optionalField "if" (Jdec.nullable unionIf) Nothing)
+        |> Jpipe.custom (optionalField "IMP" (Jdec.nullable unionIMP) Nothing)
+        |> Jpipe.custom (optionalField "implements" (Jdec.nullable unionImplements) Nothing)
+        |> Jpipe.custom (optionalField "implicit" (Jdec.nullable unionImplicit) Nothing)
+        |> Jpipe.custom (optionalField "import" (Jdec.nullable unionImport) Nothing)
+        |> Jpipe.custom (optionalField "in" (Jdec.nullable unionIn) Nothing)
+        |> Jpipe.custom (optionalField "indirect" (Jdec.nullable unionIndirect) Nothing)
+        |> Jpipe.custom (optionalField "infix" (Jdec.nullable unionInfix) Nothing)
+        |> Jpipe.custom (optionalField "init" (Jdec.nullable unionInit) Nothing)
+        |> Jpipe.custom (optionalField "inline" (Jdec.nullable unionInline) Nothing)
+        |> Jpipe.custom (optionalField "inout" (Jdec.nullable unionInout) Nothing)
+        |> Jpipe.custom (optionalField "instanceof" (Jdec.nullable unionInstanceof) Nothing)
+        |> Jpipe.custom (optionalField "int" (Jdec.nullable unionInt) Nothing)
+        |> Jpipe.custom (optionalField "interface" (Jdec.nullable unionInterface) Nothing)
+        |> Jpipe.custom (optionalField "internal" (Jdec.nullable unionInternal) Nothing)
+        |> Jpipe.custom (optionalField "is" (Jdec.nullable unionIs) Nothing)
+        |> Jpipe.custom (optionalField "iterable" (Jdec.nullable unionIterable) Nothing)
+        |> Jpipe.custom (optionalField "jdec" (Jdec.nullable unionJdec) Nothing)
+        |> Jpipe.custom (optionalField "jenc" (Jdec.nullable unionJenc) Nothing)
+        |> Jpipe.custom (optionalField "jpipe" (Jdec.nullable unionJpipe) Nothing)
+        |> Jpipe.custom (optionalField "json" (Jdec.nullable unionJSON) Nothing)
+        |> Jpipe.custom (optionalField "json_converter" (Jdec.nullable unionJSONConverter) Nothing)
+        |> Jpipe.custom (optionalField "json_serializer" (Jdec.nullable unionJSONSerializer) Nothing)
+        |> Jpipe.custom (optionalField "json_token" (Jdec.nullable unionJSONToken) Nothing)
+        |> Jpipe.custom (optionalField "json_writer" (Jdec.nullable unionJSONWriter) Nothing)
+        |> Jpipe.custom (optionalField "lambda" (Jdec.nullable unionLambda) Nothing)
+        |> Jpipe.custom (optionalField "lazy" (Jdec.nullable unionLazy) Nothing)
+        |> Jpipe.custom (optionalField "left" (Jdec.nullable unionLeft) Nothing)
+        |> Jpipe.custom (optionalField "let" (Jdec.nullable unionLet) Nothing)
+        |> Jpipe.custom (optionalField "list" (Jdec.nullable unionList) Nothing)
+        |> Jpipe.custom (optionalField "lock" (Jdec.nullable unionLock) Nothing)
+        |> Jpipe.custom (optionalField "long" (Jdec.nullable unionLong) Nothing)
+        |> Jpipe.custom (optionalField "map" (Jdec.nullable unionMap) Nothing)
+        |> Jpipe.custom (optionalField "metadata_property_handling" (Jdec.nullable unionMetadataPropertyHandling) Nothing)
+        |> Jpipe.custom (optionalField "module" (Jdec.nullable unionModule) Nothing)
+        |> Jpipe.custom (optionalField "mutable" (Jdec.nullable unionMutable) Nothing)
+        |> Jpipe.custom (optionalField "mutating" (Jdec.nullable unionMutating) Nothing)
+        |> Jpipe.custom (optionalField "namespace" (Jdec.nullable unionNamespace) Nothing)
+        |> Jpipe.custom (optionalField "native" (Jdec.nullable unionNative) Nothing)
+        |> Jpipe.custom (optionalField "new" (Jdec.nullable unionNew) Nothing)
+        |> Jpipe.custom (optionalField "newtonsoft" (Jdec.nullable unionNewtonsoft) Nothing)
+        |> Jpipe.custom (optionalField "nil" (Jdec.nullable unionNil) Nothing)
+        |> Jpipe.custom (optionalField "NO" (Jdec.nullable unionNO) Nothing)
+        |> Jpipe.custom (optionalField "noexcept" (Jdec.nullable unionNoexcept) Nothing)
+        |> Jpipe.custom (optionalField "nonatomic" (Jdec.nullable unionNonatomic) Nothing)
+        |> Jpipe.custom (optionalField "none" (Jdec.nullable unionNoneUnion) Nothing)
+        |> Jpipe.custom (optionalField "None" (Jdec.nullable unionNone) Nothing)
+        |> Jpipe.custom (optionalField "nonlocal" (Jdec.nullable unionNonlocal) Nothing)
+        |> Jpipe.custom (optionalField "nonmutating" (Jdec.nullable unionNonmutating) Nothing)
+        |> Jpipe.custom (optionalField "not" (Jdec.nullable unionNot) Nothing)
+        |> Jpipe.custom (optionalField "not_eq" (Jdec.nullable unionNotEq) Nothing)
+        |> Jpipe.custom (optionalField "NSString" (Jdec.nullable unionNSString) Nothing)
+        |> Jpipe.custom (optionalField "NULL" (Jdec.nullable unionNULL) Nothing)
+        |> Jpipe.custom (optionalField "null" (Jdec.nullable unionNull) Nothing)
+        |> Jpipe.custom (optionalField "nullptr" (Jdec.nullable unionNullptr) Nothing)
+        |> Jpipe.custom (optionalField "number" (Jdec.nullable unionNumber) Nothing)
+        |> Jpipe.custom (optionalField "object" (Jdec.nullable unionObject) Nothing)
+        |> Jpipe.custom (optionalField "of" (Jdec.nullable unionOf) Nothing)
+        |> Jpipe.custom (optionalField "oneway" (Jdec.nullable unionOneway) Nothing)
+        |> Jpipe.custom (optionalField "open" (Jdec.nullable unionOpen) Nothing)
+        |> Jpipe.custom (optionalField "operator" (Jdec.nullable unionOperator) Nothing)
+        |> Jpipe.custom (optionalField "optional" (Jdec.nullable unionOptional) Nothing)
+        |> Jpipe.custom (optionalField "or" (Jdec.nullable unionOr) Nothing)
+        |> Jpipe.custom (optionalField "or_eq" (Jdec.nullable unionOrEq) Nothing)
+        |> Jpipe.custom (optionalField "out" (Jdec.nullable unionOut) Nothing)
+        |> Jpipe.custom (optionalField "override" (Jdec.nullable unionOverride) Nothing)
+        |> Jpipe.custom (optionalField "package" (Jdec.nullable unionPackage) Nothing)
+        |> Jpipe.custom (optionalField "params" (Jdec.nullable unionParams) Nothing)
+        |> Jpipe.custom (optionalField "pass" (Jdec.nullable unionPass) Nothing)
+        |> Jpipe.custom (optionalField "port" (Jdec.nullable unionPort) Nothing)
+        |> Jpipe.custom (optionalField "postfix" (Jdec.nullable unionPostfix) Nothing)
+        |> Jpipe.custom (optionalField "precedence" (Jdec.nullable unionPrecedence) Nothing)
+        |> Jpipe.custom (optionalField "prefix" (Jdec.nullable unionPrefix) Nothing)
+        |> Jpipe.custom (optionalField "print" (Jdec.nullable unionPrint) Nothing)
+        |> Jpipe.custom (optionalField "printf" (Jdec.nullable unionPrintf) Nothing)
+        |> Jpipe.custom (optionalField "private" (Jdec.nullable unionPrivate) Nothing)
+        |> Jpipe.custom (optionalField "protected" (Jdec.nullable unionProtected) Nothing)
+        |> Jpipe.custom (optionalField "Protocol" (Jdec.nullable unionProtocol) Nothing)
+        |> Jpipe.custom (optionalField "protocol" (Jdec.nullable unionProtocolUnion) Nothing)
+        |> Jpipe.custom (optionalField "public" (Jdec.nullable unionPublic) Nothing)
+        |> Jpipe.custom (optionalField "quicktype" (Jdec.nullable unionQuicktype) Nothing)
+        |> Jpipe.custom (optionalField "raise" (Jdec.nullable unionRaise) Nothing)
+        |> Jpipe.custom (optionalField "range" (Jdec.nullable unionRange) Nothing)
+        |> Jpipe.custom (optionalField "readonly" (Jdec.nullable unionReadonly) Nothing)
+        |> Jpipe.custom (optionalField "ref" (Jdec.nullable unionRef) Nothing)
+        |> Jpipe.custom (optionalField "register" (Jdec.nullable unionRegister) Nothing)
+        |> Jpipe.custom (optionalField "reinterpret_cast" (Jdec.nullable unionReinterpretCast) Nothing)
+        |> Jpipe.custom (optionalField "repeat" (Jdec.nullable unionRepeat) Nothing)
+        |> Jpipe.custom (optionalField "require" (Jdec.nullable unionRequire) Nothing)
+        |> Jpipe.custom (optionalField "required" (Jdec.nullable unionRequired) Nothing)
+        |> Jpipe.custom (optionalField "requires" (Jdec.nullable unionRequires) Nothing)
+        |> Jpipe.custom (optionalField "restrict" (Jdec.nullable unionRestrict) Nothing)
+        |> Jpipe.custom (optionalField "retain" (Jdec.nullable unionRetain) Nothing)
+        |> Jpipe.custom (optionalField "rethrows" (Jdec.nullable unionRethrows) Nothing)
+        |> Jpipe.custom (optionalField "return" (Jdec.nullable unionReturn) Nothing)
+        |> Jpipe.custom (optionalField "right" (Jdec.nullable unionRight) Nothing)
+        |> Jpipe.custom (optionalField "sbyte" (Jdec.nullable unionSbyte) Nothing)
+        |> Jpipe.custom (optionalField "sealed" (Jdec.nullable unionSealed) Nothing)
+        |> Jpipe.custom (optionalField "SEL" (Jdec.nullable unionSEL) Nothing)
+        |> Jpipe.custom (optionalField "select" (Jdec.nullable unionSelect) Nothing)
+        |> Jpipe.custom (optionalField "Self" (Jdec.nullable unionSelf) Nothing)
+        |> Jpipe.custom (optionalField "self" (Jdec.nullable unionSelfUnion) Nothing)
+        |> Jpipe.custom (optionalField "serialize" (Jdec.nullable unionSerialize) Nothing)
+        |> Jpipe.custom (optionalField "set" (Jdec.nullable unionSet) Nothing)
+        |> Jpipe.custom (optionalField "short" (Jdec.nullable unionShort) Nothing)
+        |> Jpipe.custom (optionalField "signed" (Jdec.nullable unionSigned) Nothing)
+        |> Jpipe.custom (optionalField "sizeof" (Jdec.nullable unionSizeof) Nothing)
+        |> Jpipe.custom (optionalField "stackalloc" (Jdec.nullable unionStackalloc) Nothing)
+        |> Jpipe.custom (optionalField "static" (Jdec.nullable unionStatic) Nothing)
+        |> Jpipe.custom (optionalField "static_assert" (Jdec.nullable unionStaticAssert) Nothing)
+        |> Jpipe.custom (optionalField "static_cast" (Jdec.nullable unionStaticCast) Nothing)
+        |> Jpipe.custom (optionalField "strictfp" (Jdec.nullable unionStrictfp) Nothing)
+        |> Jpipe.custom (optionalField "string" (Jdec.nullable unionString) Nothing)
+        |> Jpipe.custom (optionalField "struct" (Jdec.nullable unionStruct) Nothing)
+        |> Jpipe.custom (optionalField "subscript" (Jdec.nullable unionSubscript) Nothing)
+        |> Jpipe.custom (optionalField "super" (Jdec.nullable unionSuper) Nothing)
+        |> Jpipe.custom (optionalField "switch" (Jdec.nullable unionSwitch) Nothing)
+        |> Jpipe.custom (optionalField "symbol" (Jdec.nullable unionSymbol) Nothing)
+        |> Jpipe.custom (optionalField "synchronized" (Jdec.nullable unionSynchronized) Nothing)
+        |> Jpipe.custom (optionalField "system" (Jdec.nullable unionSystem) Nothing)
+        |> Jpipe.custom (optionalField "template" (Jdec.nullable unionTemplate) Nothing)
+        |> Jpipe.custom (optionalField "then" (Jdec.nullable unionThen) Nothing)
+        |> Jpipe.custom (optionalField "this" (Jdec.nullable unionThis) Nothing)
+        |> Jpipe.custom (optionalField "thread_local" (Jdec.nullable unionThreadLocal) Nothing)
+        |> Jpipe.custom (optionalField "throw" (Jdec.nullable unionThrow) Nothing)
+        |> Jpipe.custom (optionalField "throws" (Jdec.nullable unionThrows) Nothing)
+        |> Jpipe.custom (optionalField "to_json" (Jdec.nullable unionToJSON) Nothing)
+        |> Jpipe.custom (optionalField "top_level" (Jdec.nullable unionTopLevel) Nothing)
+        |> Jpipe.custom (optionalField "transient" (Jdec.nullable unionTransient) Nothing)
+        |> Jpipe.custom (optionalField "True" (Jdec.nullable unionTrue) Nothing)
+        |> Jpipe.custom (optionalField "true" (Jdec.nullable unionTrueUnion) Nothing)
+        |> Jpipe.custom (optionalField "try" (Jdec.nullable unionTry) Nothing)
+        |> Jpipe.custom (optionalField "Type" (Jdec.nullable unionType) Nothing)
+        |> Jpipe.custom (optionalField "type" (Jdec.nullable unionTypeUnion) Nothing)
+        |> Jpipe.custom (optionalField "typealias" (Jdec.nullable unionTypealias) Nothing)
+        |> Jpipe.custom (optionalField "typedef" (Jdec.nullable unionTypedef) Nothing)
+        |> Jpipe.custom (optionalField "typeid" (Jdec.nullable unionTypeid) Nothing)
+        |> Jpipe.custom (optionalField "typename" (Jdec.nullable unionTypename) Nothing)
+        |> Jpipe.custom (optionalField "typeof" (Jdec.nullable unionTypeof) Nothing)
+        |> Jpipe.custom (optionalField "uint" (Jdec.nullable unionUint) Nothing)
+        |> Jpipe.custom (optionalField "ulong" (Jdec.nullable unionUlong) Nothing)
+        |> Jpipe.custom (optionalField "unchecked" (Jdec.nullable unionUnchecked) Nothing)
+        |> Jpipe.custom (optionalField "undefined" (Jdec.nullable unionUndefined) Nothing)
+        |> Jpipe.custom (optionalField "union" (Jdec.nullable unionUnionUnion) Nothing)
+        |> Jpipe.custom (optionalField "unowned" (Jdec.nullable unionUnowned) Nothing)
+        |> Jpipe.custom (optionalField "unsafe" (Jdec.nullable unionUnsafe) Nothing)
+        |> Jpipe.custom (optionalField "unsigned" (Jdec.nullable unionUnsigned) Nothing)
+        |> Jpipe.custom (optionalField "ushort" (Jdec.nullable unionUshort) Nothing)
+        |> Jpipe.custom (optionalField "using" (Jdec.nullable unionUsing) Nothing)
+        |> Jpipe.custom (optionalField "var" (Jdec.nullable unionVar) Nothing)
+        |> Jpipe.custom (optionalField "virtual" (Jdec.nullable unionVirtual) Nothing)
+        |> Jpipe.custom (optionalField "void" (Jdec.nullable unionVoid) Nothing)
+        |> Jpipe.custom (optionalField "volatile" (Jdec.nullable unionVolatile) Nothing)
+        |> Jpipe.custom (optionalField "wchar_t" (Jdec.nullable unionWcharT) Nothing)
+        |> Jpipe.custom (optionalField "weak" (Jdec.nullable unionWeak) Nothing)
+        |> Jpipe.custom (optionalField "where" (Jdec.nullable unionWhere) Nothing)
+        |> Jpipe.custom (optionalField "while" (Jdec.nullable unionWhile) Nothing)
+        |> Jpipe.custom (optionalField "willSet" (Jdec.nullable unionWillSet) Nothing)
+        |> Jpipe.custom (optionalField "with" (Jdec.nullable unionWith) Nothing)
+        |> Jpipe.custom (optionalField "xor" (Jdec.nullable unionXor) Nothing)
+        |> Jpipe.custom (optionalField "xor_eq" (Jdec.nullable unionXorEq) Nothing)
+        |> Jpipe.custom (optionalField "YES" (Jdec.nullable unionYES) Nothing)
+        |> Jpipe.custom (optionalField "yield" (Jdec.nullable unionYield) Nothing)
+
+encodeQuickType : QuickType -> Jenc.Value
+encodeQuickType x =
+    Jenc.object
+        [ ("_", makeNullableEncoder encodeUnionUnion x.empty)
+        , ("_Bool", makeNullableEncoder encodeUnionBool x.quickTypeBool)
+        , ("_Complex", makeNullableEncoder encodeUnionComplex x.complex)
+        , ("_Imaginery", makeNullableEncoder encodeUnionImaginery x.imaginery)
+        , ("abstract", makeNullableEncoder encodeUnionAbstract x.abstract)
+        , ("alignas", makeNullableEncoder encodeUnionAlignas x.alignas)
+        , ("alignof", makeNullableEncoder encodeUnionAlignof x.alignof)
+        , ("and", makeNullableEncoder encodeUnionAnd x.and)
+        , ("and_eq", makeNullableEncoder encodeUnionAndEq x.andEq)
+        , ("any", makeNullableEncoder encodeUnionAnyUnion x.quickTypeAny)
+        , ("Any", makeNullableEncoder encodeUnionAny x.any)
+        , ("array", makeNullableEncoder encodeUnionArray x.array)
+        , ("as", makeNullableEncoder encodeUnionAs x.quickTypeAs)
+        , ("asm", makeNullableEncoder encodeUnionASM x.asm)
+        , ("assert", makeNullableEncoder encodeUnionAssert x.assert)
+        , ("associatedtype", makeNullableEncoder encodeUnionAssociatedtype x.associatedtype)
+        , ("associativity", makeNullableEncoder encodeUnionAssociativity x.associativity)
+        , ("async", makeNullableEncoder encodeUnionAsync x.async)
+        , ("atomic", makeNullableEncoder encodeUnionAtomic x.atomic)
+        , ("atomic_cancel", makeNullableEncoder encodeUnionAtomicCancel x.atomicCancel)
+        , ("atomic_commit", makeNullableEncoder encodeUnionAtomicCommit x.atomicCommit)
+        , ("atomic_noexcept", makeNullableEncoder encodeUnionAtomicNoexcept x.atomicNoexcept)
+        , ("auto", makeNullableEncoder encodeUnionAuto x.auto)
+        , ("await", makeNullableEncoder encodeUnionAwait x.await)
+        , ("base", makeNullableEncoder encodeUnionBase x.base)
+        , ("bitand", makeNullableEncoder encodeUnionBitand x.bitand)
+        , ("bitor", makeNullableEncoder encodeUnionBitor x.bitor)
+        , ("BOOL", makeNullableEncoder encodeUnionBOOL x.quickTypeBOOL)
+        , ("bool", makeNullableEncoder encodeUnionBoolUnion x.purpleBool)
+        , ("boolean", makeNullableEncoder encodeUnionBoolean x.boolean)
+        , ("break", makeNullableEncoder encodeUnionBreak x.break)
+        , ("bycopy", makeNullableEncoder encodeUnionBycopy x.bycopy)
+        , ("byref", makeNullableEncoder encodeUnionByref x.byref)
+        , ("byte", makeNullableEncoder encodeUnionByte x.byte)
+        , ("case", makeNullableEncoder encodeUnionCase x.quickTypeCase)
+        , ("catch", makeNullableEncoder encodeUnionCatch x.catch)
+        , ("chan", makeNullableEncoder encodeUnionChan x.chan)
+        , ("char", makeNullableEncoder encodeUnionChar x.char)
+        , ("char16_t", makeNullableEncoder encodeUnionChar16T x.char16T)
+        , ("char32_t", makeNullableEncoder encodeUnionChar32T x.char32T)
+        , ("checked", makeNullableEncoder encodeUnionChecked x.checked)
+        , ("class", makeNullableEncoder encodeUnionClassUnion x.quickTypeClass)
+        , ("Class", makeNullableEncoder encodeUnionClass x.class)
+        , ("co_await", makeNullableEncoder encodeUnionCoAwait x.coAwait)
+        , ("co_return", makeNullableEncoder encodeUnionCoReturn x.coReturn)
+        , ("co_yield", makeNullableEncoder encodeUnionCoYield x.coYield)
+        , ("compl", makeNullableEncoder encodeUnionCompl x.compl)
+        , ("concept", makeNullableEncoder encodeUnionConcept x.concept)
+        , ("console", makeNullableEncoder encodeUnionConsole x.console)
+        , ("const", makeNullableEncoder encodeUnionConst x.const)
+        , ("const_cast", makeNullableEncoder encodeUnionConstCast x.constCast)
+        , ("constexpr", makeNullableEncoder encodeUnionConstexpr x.constexpr)
+        , ("constructor", makeNullableEncoder encodeUnionConstructor x.constructor)
+        , ("continue", makeNullableEncoder encodeUnionContinue x.continue)
+        , ("convenience", makeNullableEncoder encodeUnionConvenience x.convenience)
+        , ("convert", makeNullableEncoder encodeUnionConvert x.convert)
+        , ("converter", makeNullableEncoder encodeUnionConverter x.converter)
+        , ("date", makeNullableEncoder encodeUnionDate x.date)
+        , ("date_parse_handling", makeNullableEncoder encodeUnionDateParseHandling x.dateParseHandling)
+        , ("debugger", makeNullableEncoder encodeUnionDebugger x.debugger)
+        , ("decimal", makeNullableEncoder encodeUnionDecimal x.decimal)
+        , ("declare", makeNullableEncoder encodeUnionDeclare x.declare)
+        , ("decltype", makeNullableEncoder encodeUnionDecltype x.decltype)
+        , ("decode_string", makeNullableEncoder encodeUnionDecodeString x.decodeString)
+        , ("def", makeNullableEncoder encodeUnionDef x.def)
+        , ("default", makeNullableEncoder encodeUnionDefault x.default)
+        , ("defer", makeNullableEncoder encodeUnionDefer x.defer)
+        , ("deinit", makeNullableEncoder encodeUnionDeinit x.deinit)
+        , ("del", makeNullableEncoder encodeUnionDel x.del)
+        , ("delegate", makeNullableEncoder encodeUnionDelegate x.delegate)
+        , ("delete", makeNullableEncoder encodeUnionDelete x.delete)
+        , ("dict", makeNullableEncoder encodeUnionDict x.dict)
+        , ("dictionary", makeNullableEncoder encodeUnionDictionary x.dictionary)
+        , ("didSet", makeNullableEncoder encodeUnionDidSet x.didSet)
+        , ("do", makeNullableEncoder encodeUnionDo x.do)
+        , ("double", makeNullableEncoder encodeUnionDouble x.double)
+        , ("dummy", makeNullableEncoder Jenc.float x.dummy)
+        , ("dynamic", makeNullableEncoder encodeUnionDynamic x.dynamic)
+        , ("dynamic_cast", makeNullableEncoder encodeUnionDynamicCast x.dynamicCast)
+        , ("elif", makeNullableEncoder encodeUnionElif x.elif)
+        , ("else", makeNullableEncoder encodeUnionElse x.quickTypeElse)
+        , ("encode_quick_type", makeNullableEncoder encodeUnionEncodeQuickType x.encodeQuickType)
+        , ("enum", makeNullableEncoder encodeUnionEnum x.enum)
+        , ("event", makeNullableEncoder encodeUnionEvent x.event)
+        , ("except", makeNullableEncoder encodeUnionExcept x.except)
+        , ("exception", makeNullableEncoder encodeUnionException x.exception)
+        , ("explicit", makeNullableEncoder encodeUnionExplicit x.explicit)
+        , ("export", makeNullableEncoder encodeUnionExport x.export)
+        , ("exposing", makeNullableEncoder encodeUnionExposing x.quickTypeExposing)
+        , ("extends", makeNullableEncoder encodeUnionExtends x.extends)
+        , ("extension", makeNullableEncoder encodeUnionExtension x.extension)
+        , ("extern", makeNullableEncoder encodeUnionExtern x.extern)
+        , ("fallthrough", makeNullableEncoder encodeUnionFallthrough x.fallthrough)
+        , ("false", makeNullableEncoder encodeUnionFalseUnion x.quickTypeFalse)
+        , ("False", makeNullableEncoder encodeUnionFalse x.false)
+        , ("fileprivate", makeNullableEncoder encodeUnionFileprivate x.fileprivate)
+        , ("final", makeNullableEncoder encodeUnionFinal x.final)
+        , ("finally", makeNullableEncoder encodeUnionFinally x.finally)
+        , ("fixed", makeNullableEncoder encodeUnionFixed x.fixed)
+        , ("float", makeNullableEncoder encodeUnionFloat x.quickTypeFloat)
+        , ("for", makeNullableEncoder encodeUnionFor x.for)
+        , ("foreach", makeNullableEncoder encodeUnionForeach x.foreach)
+        , ("friend", makeNullableEncoder encodeUnionFriend x.friend)
+        , ("from", makeNullableEncoder encodeUnionFrom x.from)
+        , ("from_json", makeNullableEncoder encodeUnionFromJSON x.fromJSON)
+        , ("func", makeNullableEncoder encodeUnionFunc x.func)
+        , ("function", makeNullableEncoder encodeUnionFunction x.function)
+        , ("get", makeNullableEncoder encodeUnionGet x.get)
+        , ("global", makeNullableEncoder encodeUnionGlobal x.global)
+        , ("go", makeNullableEncoder encodeUnionGo x.go)
+        , ("goto", makeNullableEncoder encodeUnionGoto x.goto)
+        , ("guard", makeNullableEncoder encodeUnionGuard x.guard)
+        , ("hasOwnProperty", makeNullableEncoder encodeUnionHasOwnProperty x.hasOwnProperty)
+        , ("id", makeNullableEncoder encodeUnionID x.id)
+        , ("if", makeNullableEncoder encodeUnionIf x.quickTypeIf)
+        , ("IMP", makeNullableEncoder encodeUnionIMP x.imp)
+        , ("implements", makeNullableEncoder encodeUnionImplements x.implements)
+        , ("implicit", makeNullableEncoder encodeUnionImplicit x.implicit)
+        , ("import", makeNullableEncoder encodeUnionImport x.quickTypeImport)
+        , ("in", makeNullableEncoder encodeUnionIn x.quickTypeIn)
+        , ("indirect", makeNullableEncoder encodeUnionIndirect x.indirect)
+        , ("infix", makeNullableEncoder encodeUnionInfix x.quickTypeInfix)
+        , ("init", makeNullableEncoder encodeUnionInit x.init)
+        , ("inline", makeNullableEncoder encodeUnionInline x.inline)
+        , ("inout", makeNullableEncoder encodeUnionInout x.inout)
+        , ("instanceof", makeNullableEncoder encodeUnionInstanceof x.instanceof)
+        , ("int", makeNullableEncoder encodeUnionInt x.quickTypeInt)
+        , ("interface", makeNullableEncoder encodeUnionInterface x.interface)
+        , ("internal", makeNullableEncoder encodeUnionInternal x.internal)
+        , ("is", makeNullableEncoder encodeUnionIs x.is)
+        , ("iterable", makeNullableEncoder encodeUnionIterable x.iterable)
+        , ("jdec", makeNullableEncoder encodeUnionJdec x.jdec)
+        , ("jenc", makeNullableEncoder encodeUnionJenc x.jenc)
+        , ("jpipe", makeNullableEncoder encodeUnionJpipe x.jpipe)
+        , ("json", makeNullableEncoder encodeUnionJSON x.json)
+        , ("json_converter", makeNullableEncoder encodeUnionJSONConverter x.jsonConverter)
+        , ("json_serializer", makeNullableEncoder encodeUnionJSONSerializer x.jsonSerializer)
+        , ("json_token", makeNullableEncoder encodeUnionJSONToken x.jsonToken)
+        , ("json_writer", makeNullableEncoder encodeUnionJSONWriter x.jsonWriter)
+        , ("lambda", makeNullableEncoder encodeUnionLambda x.lambda)
+        , ("lazy", makeNullableEncoder encodeUnionLazy x.lazy)
+        , ("left", makeNullableEncoder encodeUnionLeft x.left)
+        , ("let", makeNullableEncoder encodeUnionLet x.quickTypeLet)
+        , ("list", makeNullableEncoder encodeUnionList x.list)
+        , ("lock", makeNullableEncoder encodeUnionLock x.lock)
+        , ("long", makeNullableEncoder encodeUnionLong x.long)
+        , ("map", makeNullableEncoder encodeUnionMap x.map)
+        , ("metadata_property_handling", makeNullableEncoder encodeUnionMetadataPropertyHandling x.metadataPropertyHandling)
+        , ("module", makeNullableEncoder encodeUnionModule x.quickTypeModule)
+        , ("mutable", makeNullableEncoder encodeUnionMutable x.mutable)
+        , ("mutating", makeNullableEncoder encodeUnionMutating x.mutating)
+        , ("namespace", makeNullableEncoder encodeUnionNamespace x.namespace)
+        , ("native", makeNullableEncoder encodeUnionNative x.native)
+        , ("new", makeNullableEncoder encodeUnionNew x.new)
+        , ("newtonsoft", makeNullableEncoder encodeUnionNewtonsoft x.newtonsoft)
+        , ("nil", makeNullableEncoder encodeUnionNil x.nil)
+        , ("NO", makeNullableEncoder encodeUnionNO x.no)
+        , ("noexcept", makeNullableEncoder encodeUnionNoexcept x.noexcept)
+        , ("nonatomic", makeNullableEncoder encodeUnionNonatomic x.nonatomic)
+        , ("none", makeNullableEncoder encodeUnionNoneUnion x.quickTypeNone)
+        , ("None", makeNullableEncoder encodeUnionNone x.none)
+        , ("nonlocal", makeNullableEncoder encodeUnionNonlocal x.nonlocal)
+        , ("nonmutating", makeNullableEncoder encodeUnionNonmutating x.nonmutating)
+        , ("not", makeNullableEncoder encodeUnionNot x.not)
+        , ("not_eq", makeNullableEncoder encodeUnionNotEq x.notEq)
+        , ("NSString", makeNullableEncoder encodeUnionNSString x.nsString)
+        , ("NULL", makeNullableEncoder encodeUnionNULL x.null)
+        , ("null", makeNullableEncoder encodeUnionNull x.quickTypeNull)
+        , ("nullptr", makeNullableEncoder encodeUnionNullptr x.nullptr)
+        , ("number", makeNullableEncoder encodeUnionNumber x.number)
+        , ("object", makeNullableEncoder encodeUnionObject x.object)
+        , ("of", makeNullableEncoder encodeUnionOf x.quickTypeOf)
+        , ("oneway", makeNullableEncoder encodeUnionOneway x.oneway)
+        , ("open", makeNullableEncoder encodeUnionOpen x.open)
+        , ("operator", makeNullableEncoder encodeUnionOperator x.operator)
+        , ("optional", makeNullableEncoder encodeUnionOptional x.optional)
+        , ("or", makeNullableEncoder encodeUnionOr x.or)
+        , ("or_eq", makeNullableEncoder encodeUnionOrEq x.orEq)
+        , ("out", makeNullableEncoder encodeUnionOut x.out)
+        , ("override", makeNullableEncoder encodeUnionOverride x.override)
+        , ("package", makeNullableEncoder encodeUnionPackage x.package)
+        , ("params", makeNullableEncoder encodeUnionParams x.params)
+        , ("pass", makeNullableEncoder encodeUnionPass x.pass)
+        , ("port", makeNullableEncoder encodeUnionPort x.quickTypePort)
+        , ("postfix", makeNullableEncoder encodeUnionPostfix x.postfix)
+        , ("precedence", makeNullableEncoder encodeUnionPrecedence x.precedence)
+        , ("prefix", makeNullableEncoder encodeUnionPrefix x.prefix)
+        , ("print", makeNullableEncoder encodeUnionPrint x.print)
+        , ("printf", makeNullableEncoder encodeUnionPrintf x.printf)
+        , ("private", makeNullableEncoder encodeUnionPrivate x.private)
+        , ("protected", makeNullableEncoder encodeUnionProtected x.protected)
+        , ("Protocol", makeNullableEncoder encodeUnionProtocol x.protocol)
+        , ("protocol", makeNullableEncoder encodeUnionProtocolUnion x.quickTypeProtocol)
+        , ("public", makeNullableEncoder encodeUnionPublic x.public)
+        , ("quicktype", makeNullableEncoder encodeUnionQuicktype x.quicktype)
+        , ("raise", makeNullableEncoder encodeUnionRaise x.raise)
+        , ("range", makeNullableEncoder encodeUnionRange x.range)
+        , ("readonly", makeNullableEncoder encodeUnionReadonly x.readonly)
+        , ("ref", makeNullableEncoder encodeUnionRef x.ref)
+        , ("register", makeNullableEncoder encodeUnionRegister x.register)
+        , ("reinterpret_cast", makeNullableEncoder encodeUnionReinterpretCast x.reinterpretCast)
+        , ("repeat", makeNullableEncoder encodeUnionRepeat x.repeat)
+        , ("require", makeNullableEncoder encodeUnionRequire x.require)
+        , ("required", makeNullableEncoder encodeUnionRequired x.required)
+        , ("requires", makeNullableEncoder encodeUnionRequires x.requires)
+        , ("restrict", makeNullableEncoder encodeUnionRestrict x.restrict)
+        , ("retain", makeNullableEncoder encodeUnionRetain x.retain)
+        , ("rethrows", makeNullableEncoder encodeUnionRethrows x.rethrows)
+        , ("return", makeNullableEncoder encodeUnionReturn x.return)
+        , ("right", makeNullableEncoder encodeUnionRight x.right)
+        , ("sbyte", makeNullableEncoder encodeUnionSbyte x.sbyte)
+        , ("sealed", makeNullableEncoder encodeUnionSealed x.sealed)
+        , ("SEL", makeNullableEncoder encodeUnionSEL x.sel)
+        , ("select", makeNullableEncoder encodeUnionSelect x.select)
+        , ("Self", makeNullableEncoder encodeUnionSelf x.self)
+        , ("self", makeNullableEncoder encodeUnionSelfUnion x.quickTypeSelf)
+        , ("serialize", makeNullableEncoder encodeUnionSerialize x.serialize)
+        , ("set", makeNullableEncoder encodeUnionSet x.set)
+        , ("short", makeNullableEncoder encodeUnionShort x.short)
+        , ("signed", makeNullableEncoder encodeUnionSigned x.signed)
+        , ("sizeof", makeNullableEncoder encodeUnionSizeof x.sizeof)
+        , ("stackalloc", makeNullableEncoder encodeUnionStackalloc x.stackalloc)
+        , ("static", makeNullableEncoder encodeUnionStatic x.static)
+        , ("static_assert", makeNullableEncoder encodeUnionStaticAssert x.staticAssert)
+        , ("static_cast", makeNullableEncoder encodeUnionStaticCast x.staticCast)
+        , ("strictfp", makeNullableEncoder encodeUnionStrictfp x.strictfp)
+        , ("string", makeNullableEncoder encodeUnionString x.quickTypeString)
+        , ("struct", makeNullableEncoder encodeUnionStruct x.struct)
+        , ("subscript", makeNullableEncoder encodeUnionSubscript x.subscript)
+        , ("super", makeNullableEncoder encodeUnionSuper x.super)
+        , ("switch", makeNullableEncoder encodeUnionSwitch x.switch)
+        , ("symbol", makeNullableEncoder encodeUnionSymbol x.symbol)
+        , ("synchronized", makeNullableEncoder encodeUnionSynchronized x.synchronized)
+        , ("system", makeNullableEncoder encodeUnionSystem x.system)
+        , ("template", makeNullableEncoder encodeUnionTemplate x.template)
+        , ("then", makeNullableEncoder encodeUnionThen x.quickTypeThen)
+        , ("this", makeNullableEncoder encodeUnionThis x.this)
+        , ("thread_local", makeNullableEncoder encodeUnionThreadLocal x.threadLocal)
+        , ("throw", makeNullableEncoder encodeUnionThrow x.throw)
+        , ("throws", makeNullableEncoder encodeUnionThrows x.throws)
+        , ("to_json", makeNullableEncoder encodeUnionToJSON x.toJSON)
+        , ("top_level", makeNullableEncoder encodeUnionTopLevel x.topLevel)
+        , ("transient", makeNullableEncoder encodeUnionTransient x.transient)
+        , ("True", makeNullableEncoder encodeUnionTrue x.true)
+        , ("true", makeNullableEncoder encodeUnionTrueUnion x.quickTypeTrue)
+        , ("try", makeNullableEncoder encodeUnionTry x.try)
+        , ("Type", makeNullableEncoder encodeUnionType x.quickTypeType)
+        , ("type", makeNullableEncoder encodeUnionTypeUnion x.purpleType)
+        , ("typealias", makeNullableEncoder encodeUnionTypealias x.typealias)
+        , ("typedef", makeNullableEncoder encodeUnionTypedef x.typedef)
+        , ("typeid", makeNullableEncoder encodeUnionTypeid x.typeid)
+        , ("typename", makeNullableEncoder encodeUnionTypename x.typename)
+        , ("typeof", makeNullableEncoder encodeUnionTypeof x.typeof)
+        , ("uint", makeNullableEncoder encodeUnionUint x.uint)
+        , ("ulong", makeNullableEncoder encodeUnionUlong x.ulong)
+        , ("unchecked", makeNullableEncoder encodeUnionUnchecked x.unchecked)
+        , ("undefined", makeNullableEncoder encodeUnionUndefined x.undefined)
+        , ("union", makeNullableEncoder encodeUnionUnionUnion x.union)
+        , ("unowned", makeNullableEncoder encodeUnionUnowned x.unowned)
+        , ("unsafe", makeNullableEncoder encodeUnionUnsafe x.unsafe)
+        , ("unsigned", makeNullableEncoder encodeUnionUnsigned x.unsigned)
+        , ("ushort", makeNullableEncoder encodeUnionUshort x.ushort)
+        , ("using", makeNullableEncoder encodeUnionUsing x.using)
+        , ("var", makeNullableEncoder encodeUnionVar x.var)
+        , ("virtual", makeNullableEncoder encodeUnionVirtual x.virtual)
+        , ("void", makeNullableEncoder encodeUnionVoid x.void)
+        , ("volatile", makeNullableEncoder encodeUnionVolatile x.volatile)
+        , ("wchar_t", makeNullableEncoder encodeUnionWcharT x.wcharT)
+        , ("weak", makeNullableEncoder encodeUnionWeak x.weak)
+        , ("where", makeNullableEncoder encodeUnionWhere x.quickTypeWhere)
+        , ("while", makeNullableEncoder encodeUnionWhile x.while)
+        , ("willSet", makeNullableEncoder encodeUnionWillSet x.willSet)
+        , ("with", makeNullableEncoder encodeUnionWith x.with)
+        , ("xor", makeNullableEncoder encodeUnionXor x.xor)
+        , ("xor_eq", makeNullableEncoder encodeUnionXorEq x.xorEq)
+        , ("YES", makeNullableEncoder encodeUnionYES x.yes)
+        , ("yield", makeNullableEncoder encodeUnionYield x.yield)
+        ]
+
+unionAbstract : Jdec.Decoder UnionAbstract
+unionAbstract =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAbstract Jdec.float
+        , Jdec.map AbstractInUnionAbstract abstract
+        ]
+
+encodeUnionAbstract : UnionAbstract -> Jenc.Value
+encodeUnionAbstract x = case x of
+    DoubleInUnionAbstract y -> Jenc.float y
+    AbstractInUnionAbstract y -> encodeAbstract y
+
+abstract : Jdec.Decoder Abstract
+abstract =
+    Jdec.succeed Abstract
+
+encodeAbstract : Abstract -> Jenc.Value
+encodeAbstract x =
+    Jenc.object
+        [
+        ]
+
+unionAlignas : Jdec.Decoder UnionAlignas
+unionAlignas =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAlignas Jdec.float
+        , Jdec.map AlignasInUnionAlignas alignas
+        ]
+
+encodeUnionAlignas : UnionAlignas -> Jenc.Value
+encodeUnionAlignas x = case x of
+    DoubleInUnionAlignas y -> Jenc.float y
+    AlignasInUnionAlignas y -> encodeAlignas y
+
+alignas : Jdec.Decoder Alignas
+alignas =
+    Jdec.succeed Alignas
+
+encodeAlignas : Alignas -> Jenc.Value
+encodeAlignas x =
+    Jenc.object
+        [
+        ]
+
+unionAlignof : Jdec.Decoder UnionAlignof
+unionAlignof =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAlignof Jdec.float
+        , Jdec.map AlignofInUnionAlignof alignof
+        ]
+
+encodeUnionAlignof : UnionAlignof -> Jenc.Value
+encodeUnionAlignof x = case x of
+    DoubleInUnionAlignof y -> Jenc.float y
+    AlignofInUnionAlignof y -> encodeAlignof y
+
+alignof : Jdec.Decoder Alignof
+alignof =
+    Jdec.succeed Alignof
+
+encodeAlignof : Alignof -> Jenc.Value
+encodeAlignof x =
+    Jenc.object
+        [
+        ]
+
+unionAnd : Jdec.Decoder UnionAnd
+unionAnd =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAnd Jdec.float
+        , Jdec.map AndInUnionAnd and
+        ]
+
+encodeUnionAnd : UnionAnd -> Jenc.Value
+encodeUnionAnd x = case x of
+    DoubleInUnionAnd y -> Jenc.float y
+    AndInUnionAnd y -> encodeAnd y
+
+and : Jdec.Decoder And
+and =
+    Jdec.succeed And
+
+encodeAnd : And -> Jenc.Value
+encodeAnd x =
+    Jenc.object
+        [
+        ]
+
+unionAndEq : Jdec.Decoder UnionAndEq
+unionAndEq =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAndEq Jdec.float
+        , Jdec.map AndEqInUnionAndEq andEq
+        ]
+
+encodeUnionAndEq : UnionAndEq -> Jenc.Value
+encodeUnionAndEq x = case x of
+    DoubleInUnionAndEq y -> Jenc.float y
+    AndEqInUnionAndEq y -> encodeAndEq y
+
+andEq : Jdec.Decoder AndEq
+andEq =
+    Jdec.succeed AndEq
+
+encodeAndEq : AndEq -> Jenc.Value
+encodeAndEq x =
+    Jenc.object
+        [
+        ]
+
+unionAny : Jdec.Decoder UnionAny
+unionAny =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAny Jdec.float
+        , Jdec.map AnyInUnionAny any
+        ]
+
+encodeUnionAny : UnionAny -> Jenc.Value
+encodeUnionAny x = case x of
+    DoubleInUnionAny y -> Jenc.float y
+    AnyInUnionAny y -> encodeAny y
+
+any : Jdec.Decoder Any
+any =
+    Jdec.succeed Any
+
+encodeAny : Any -> Jenc.Value
+encodeAny x =
+    Jenc.object
+        [
+        ]
+
+unionArray : Jdec.Decoder UnionArray
+unionArray =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionArray Jdec.float
+        , Jdec.map ArrayClassInUnionArray arrayClass
+        ]
+
+encodeUnionArray : UnionArray -> Jenc.Value
+encodeUnionArray x = case x of
+    DoubleInUnionArray y -> Jenc.float y
+    ArrayClassInUnionArray y -> encodeArrayClass y
+
+arrayClass : Jdec.Decoder ArrayClass
+arrayClass =
+    Jdec.succeed ArrayClass
+
+encodeArrayClass : ArrayClass -> Jenc.Value
+encodeArrayClass x =
+    Jenc.object
+        [
+        ]
+
+unionASM : Jdec.Decoder UnionASM
+unionASM =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionASM Jdec.float
+        , Jdec.map ASMInUnionASM asm
+        ]
+
+encodeUnionASM : UnionASM -> Jenc.Value
+encodeUnionASM x = case x of
+    DoubleInUnionASM y -> Jenc.float y
+    ASMInUnionASM y -> encodeASM y
+
+asm : Jdec.Decoder ASM
+asm =
+    Jdec.succeed ASM
+
+encodeASM : ASM -> Jenc.Value
+encodeASM x =
+    Jenc.object
+        [
+        ]
+
+unionAssert : Jdec.Decoder UnionAssert
+unionAssert =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAssert Jdec.float
+        , Jdec.map AssertInUnionAssert assert
+        ]
+
+encodeUnionAssert : UnionAssert -> Jenc.Value
+encodeUnionAssert x = case x of
+    DoubleInUnionAssert y -> Jenc.float y
+    AssertInUnionAssert y -> encodeAssert y
+
+assert : Jdec.Decoder Assert
+assert =
+    Jdec.succeed Assert
+
+encodeAssert : Assert -> Jenc.Value
+encodeAssert x =
+    Jenc.object
+        [
+        ]
+
+unionAssociatedtype : Jdec.Decoder UnionAssociatedtype
+unionAssociatedtype =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAssociatedtype Jdec.float
+        , Jdec.map AssociatedtypeInUnionAssociatedtype associatedtype
+        ]
+
+encodeUnionAssociatedtype : UnionAssociatedtype -> Jenc.Value
+encodeUnionAssociatedtype x = case x of
+    DoubleInUnionAssociatedtype y -> Jenc.float y
+    AssociatedtypeInUnionAssociatedtype y -> encodeAssociatedtype y
+
+associatedtype : Jdec.Decoder Associatedtype
+associatedtype =
+    Jdec.succeed Associatedtype
+
+encodeAssociatedtype : Associatedtype -> Jenc.Value
+encodeAssociatedtype x =
+    Jenc.object
+        [
+        ]
+
+unionAssociativity : Jdec.Decoder UnionAssociativity
+unionAssociativity =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAssociativity Jdec.float
+        , Jdec.map AssociativityInUnionAssociativity associativity
+        ]
+
+encodeUnionAssociativity : UnionAssociativity -> Jenc.Value
+encodeUnionAssociativity x = case x of
+    DoubleInUnionAssociativity y -> Jenc.float y
+    AssociativityInUnionAssociativity y -> encodeAssociativity y
+
+associativity : Jdec.Decoder Associativity
+associativity =
+    Jdec.succeed Associativity
+
+encodeAssociativity : Associativity -> Jenc.Value
+encodeAssociativity x =
+    Jenc.object
+        [
+        ]
+
+unionAsync : Jdec.Decoder UnionAsync
+unionAsync =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAsync Jdec.float
+        , Jdec.map AsyncInUnionAsync async
+        ]
+
+encodeUnionAsync : UnionAsync -> Jenc.Value
+encodeUnionAsync x = case x of
+    DoubleInUnionAsync y -> Jenc.float y
+    AsyncInUnionAsync y -> encodeAsync y
+
+async : Jdec.Decoder Async
+async =
+    Jdec.succeed Async
+
+encodeAsync : Async -> Jenc.Value
+encodeAsync x =
+    Jenc.object
+        [
+        ]
+
+unionAtomic : Jdec.Decoder UnionAtomic
+unionAtomic =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAtomic Jdec.float
+        , Jdec.map AtomicInUnionAtomic atomic
+        ]
+
+encodeUnionAtomic : UnionAtomic -> Jenc.Value
+encodeUnionAtomic x = case x of
+    DoubleInUnionAtomic y -> Jenc.float y
+    AtomicInUnionAtomic y -> encodeAtomic y
+
+atomic : Jdec.Decoder Atomic
+atomic =
+    Jdec.succeed Atomic
+
+encodeAtomic : Atomic -> Jenc.Value
+encodeAtomic x =
+    Jenc.object
+        [
+        ]
+
+unionAtomicCancel : Jdec.Decoder UnionAtomicCancel
+unionAtomicCancel =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAtomicCancel Jdec.float
+        , Jdec.map AtomicCancelInUnionAtomicCancel atomicCancel
+        ]
+
+encodeUnionAtomicCancel : UnionAtomicCancel -> Jenc.Value
+encodeUnionAtomicCancel x = case x of
+    DoubleInUnionAtomicCancel y -> Jenc.float y
+    AtomicCancelInUnionAtomicCancel y -> encodeAtomicCancel y
+
+atomicCancel : Jdec.Decoder AtomicCancel
+atomicCancel =
+    Jdec.succeed AtomicCancel
+
+encodeAtomicCancel : AtomicCancel -> Jenc.Value
+encodeAtomicCancel x =
+    Jenc.object
+        [
+        ]
+
+unionAtomicCommit : Jdec.Decoder UnionAtomicCommit
+unionAtomicCommit =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAtomicCommit Jdec.float
+        , Jdec.map AtomicCommitInUnionAtomicCommit atomicCommit
+        ]
+
+encodeUnionAtomicCommit : UnionAtomicCommit -> Jenc.Value
+encodeUnionAtomicCommit x = case x of
+    DoubleInUnionAtomicCommit y -> Jenc.float y
+    AtomicCommitInUnionAtomicCommit y -> encodeAtomicCommit y
+
+atomicCommit : Jdec.Decoder AtomicCommit
+atomicCommit =
+    Jdec.succeed AtomicCommit
+
+encodeAtomicCommit : AtomicCommit -> Jenc.Value
+encodeAtomicCommit x =
+    Jenc.object
+        [
+        ]
+
+unionAtomicNoexcept : Jdec.Decoder UnionAtomicNoexcept
+unionAtomicNoexcept =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAtomicNoexcept Jdec.float
+        , Jdec.map AtomicNoexceptInUnionAtomicNoexcept atomicNoexcept
+        ]
+
+encodeUnionAtomicNoexcept : UnionAtomicNoexcept -> Jenc.Value
+encodeUnionAtomicNoexcept x = case x of
+    DoubleInUnionAtomicNoexcept y -> Jenc.float y
+    AtomicNoexceptInUnionAtomicNoexcept y -> encodeAtomicNoexcept y
+
+atomicNoexcept : Jdec.Decoder AtomicNoexcept
+atomicNoexcept =
+    Jdec.succeed AtomicNoexcept
+
+encodeAtomicNoexcept : AtomicNoexcept -> Jenc.Value
+encodeAtomicNoexcept x =
+    Jenc.object
+        [
+        ]
+
+unionAuto : Jdec.Decoder UnionAuto
+unionAuto =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAuto Jdec.float
+        , Jdec.map AutoInUnionAuto auto
+        ]
+
+encodeUnionAuto : UnionAuto -> Jenc.Value
+encodeUnionAuto x = case x of
+    DoubleInUnionAuto y -> Jenc.float y
+    AutoInUnionAuto y -> encodeAuto y
+
+auto : Jdec.Decoder Auto
+auto =
+    Jdec.succeed Auto
+
+encodeAuto : Auto -> Jenc.Value
+encodeAuto x =
+    Jenc.object
+        [
+        ]
+
+unionAwait : Jdec.Decoder UnionAwait
+unionAwait =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAwait Jdec.float
+        , Jdec.map AwaitInUnionAwait await
+        ]
+
+encodeUnionAwait : UnionAwait -> Jenc.Value
+encodeUnionAwait x = case x of
+    DoubleInUnionAwait y -> Jenc.float y
+    AwaitInUnionAwait y -> encodeAwait y
+
+await : Jdec.Decoder Await
+await =
+    Jdec.succeed Await
+
+encodeAwait : Await -> Jenc.Value
+encodeAwait x =
+    Jenc.object
+        [
+        ]
+
+unionBase : Jdec.Decoder UnionBase
+unionBase =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBase Jdec.float
+        , Jdec.map BaseInUnionBase base
+        ]
+
+encodeUnionBase : UnionBase -> Jenc.Value
+encodeUnionBase x = case x of
+    DoubleInUnionBase y -> Jenc.float y
+    BaseInUnionBase y -> encodeBase y
+
+base : Jdec.Decoder Base
+base =
+    Jdec.succeed Base
+
+encodeBase : Base -> Jenc.Value
+encodeBase x =
+    Jenc.object
+        [
+        ]
+
+unionBitand : Jdec.Decoder UnionBitand
+unionBitand =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBitand Jdec.float
+        , Jdec.map BitandInUnionBitand bitand
+        ]
+
+encodeUnionBitand : UnionBitand -> Jenc.Value
+encodeUnionBitand x = case x of
+    DoubleInUnionBitand y -> Jenc.float y
+    BitandInUnionBitand y -> encodeBitand y
+
+bitand : Jdec.Decoder Bitand
+bitand =
+    Jdec.succeed Bitand
+
+encodeBitand : Bitand -> Jenc.Value
+encodeBitand x =
+    Jenc.object
+        [
+        ]
+
+unionBitor : Jdec.Decoder UnionBitor
+unionBitor =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBitor Jdec.float
+        , Jdec.map BitorInUnionBitor bitor
+        ]
+
+encodeUnionBitor : UnionBitor -> Jenc.Value
+encodeUnionBitor x = case x of
+    DoubleInUnionBitor y -> Jenc.float y
+    BitorInUnionBitor y -> encodeBitor y
+
+bitor : Jdec.Decoder Bitor
+bitor =
+    Jdec.succeed Bitor
+
+encodeBitor : Bitor -> Jenc.Value
+encodeBitor x =
+    Jenc.object
+        [
+        ]
+
+unionBoolean : Jdec.Decoder UnionBoolean
+unionBoolean =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBoolean Jdec.float
+        , Jdec.map BooleanInUnionBoolean boolean
+        ]
+
+encodeUnionBoolean : UnionBoolean -> Jenc.Value
+encodeUnionBoolean x = case x of
+    DoubleInUnionBoolean y -> Jenc.float y
+    BooleanInUnionBoolean y -> encodeBoolean y
+
+boolean : Jdec.Decoder Boolean
+boolean =
+    Jdec.succeed Boolean
+
+encodeBoolean : Boolean -> Jenc.Value
+encodeBoolean x =
+    Jenc.object
+        [
+        ]
+
+unionBreak : Jdec.Decoder UnionBreak
+unionBreak =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBreak Jdec.float
+        , Jdec.map BreakInUnionBreak break
+        ]
+
+encodeUnionBreak : UnionBreak -> Jenc.Value
+encodeUnionBreak x = case x of
+    DoubleInUnionBreak y -> Jenc.float y
+    BreakInUnionBreak y -> encodeBreak y
+
+break : Jdec.Decoder Break
+break =
+    Jdec.succeed Break
+
+encodeBreak : Break -> Jenc.Value
+encodeBreak x =
+    Jenc.object
+        [
+        ]
+
+unionBycopy : Jdec.Decoder UnionBycopy
+unionBycopy =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBycopy Jdec.float
+        , Jdec.map BycopyInUnionBycopy bycopy
+        ]
+
+encodeUnionBycopy : UnionBycopy -> Jenc.Value
+encodeUnionBycopy x = case x of
+    DoubleInUnionBycopy y -> Jenc.float y
+    BycopyInUnionBycopy y -> encodeBycopy y
+
+bycopy : Jdec.Decoder Bycopy
+bycopy =
+    Jdec.succeed Bycopy
+
+encodeBycopy : Bycopy -> Jenc.Value
+encodeBycopy x =
+    Jenc.object
+        [
+        ]
+
+unionByref : Jdec.Decoder UnionByref
+unionByref =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionByref Jdec.float
+        , Jdec.map ByrefInUnionByref byref
+        ]
+
+encodeUnionByref : UnionByref -> Jenc.Value
+encodeUnionByref x = case x of
+    DoubleInUnionByref y -> Jenc.float y
+    ByrefInUnionByref y -> encodeByref y
+
+byref : Jdec.Decoder Byref
+byref =
+    Jdec.succeed Byref
+
+encodeByref : Byref -> Jenc.Value
+encodeByref x =
+    Jenc.object
+        [
+        ]
+
+unionByte : Jdec.Decoder UnionByte
+unionByte =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionByte Jdec.float
+        , Jdec.map ByteInUnionByte byte
+        ]
+
+encodeUnionByte : UnionByte -> Jenc.Value
+encodeUnionByte x = case x of
+    DoubleInUnionByte y -> Jenc.float y
+    ByteInUnionByte y -> encodeByte y
+
+byte : Jdec.Decoder Byte
+byte =
+    Jdec.succeed Byte
+
+encodeByte : Byte -> Jenc.Value
+encodeByte x =
+    Jenc.object
+        [
+        ]
+
+unionCatch : Jdec.Decoder UnionCatch
+unionCatch =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCatch Jdec.float
+        , Jdec.map CatchInUnionCatch catch
+        ]
+
+encodeUnionCatch : UnionCatch -> Jenc.Value
+encodeUnionCatch x = case x of
+    DoubleInUnionCatch y -> Jenc.float y
+    CatchInUnionCatch y -> encodeCatch y
+
+catch : Jdec.Decoder Catch
+catch =
+    Jdec.succeed Catch
+
+encodeCatch : Catch -> Jenc.Value
+encodeCatch x =
+    Jenc.object
+        [
+        ]
+
+unionChan : Jdec.Decoder UnionChan
+unionChan =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionChan Jdec.float
+        , Jdec.map ChanInUnionChan chan
+        ]
+
+encodeUnionChan : UnionChan -> Jenc.Value
+encodeUnionChan x = case x of
+    DoubleInUnionChan y -> Jenc.float y
+    ChanInUnionChan y -> encodeChan y
+
+chan : Jdec.Decoder Chan
+chan =
+    Jdec.succeed Chan
+
+encodeChan : Chan -> Jenc.Value
+encodeChan x =
+    Jenc.object
+        [
+        ]
+
+unionChar : Jdec.Decoder UnionChar
+unionChar =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionChar Jdec.float
+        , Jdec.map CharInUnionChar char
+        ]
+
+encodeUnionChar : UnionChar -> Jenc.Value
+encodeUnionChar x = case x of
+    DoubleInUnionChar y -> Jenc.float y
+    CharInUnionChar y -> encodeChar y
+
+char : Jdec.Decoder Char
+char =
+    Jdec.succeed Char
+
+encodeChar : Char -> Jenc.Value
+encodeChar x =
+    Jenc.object
+        [
+        ]
+
+unionChar16T : Jdec.Decoder UnionChar16T
+unionChar16T =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionChar16T Jdec.float
+        , Jdec.map Char16TInUnionChar16T char16T
+        ]
+
+encodeUnionChar16T : UnionChar16T -> Jenc.Value
+encodeUnionChar16T x = case x of
+    DoubleInUnionChar16T y -> Jenc.float y
+    Char16TInUnionChar16T y -> encodeChar16T y
+
+char16T : Jdec.Decoder Char16T
+char16T =
+    Jdec.succeed Char16T
+
+encodeChar16T : Char16T -> Jenc.Value
+encodeChar16T x =
+    Jenc.object
+        [
+        ]
+
+unionChar32T : Jdec.Decoder UnionChar32T
+unionChar32T =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionChar32T Jdec.float
+        , Jdec.map Char32TInUnionChar32T char32T
+        ]
+
+encodeUnionChar32T : UnionChar32T -> Jenc.Value
+encodeUnionChar32T x = case x of
+    DoubleInUnionChar32T y -> Jenc.float y
+    Char32TInUnionChar32T y -> encodeChar32T y
+
+char32T : Jdec.Decoder Char32T
+char32T =
+    Jdec.succeed Char32T
+
+encodeChar32T : Char32T -> Jenc.Value
+encodeChar32T x =
+    Jenc.object
+        [
+        ]
+
+unionChecked : Jdec.Decoder UnionChecked
+unionChecked =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionChecked Jdec.float
+        , Jdec.map CheckedInUnionChecked checked
+        ]
+
+encodeUnionChecked : UnionChecked -> Jenc.Value
+encodeUnionChecked x = case x of
+    DoubleInUnionChecked y -> Jenc.float y
+    CheckedInUnionChecked y -> encodeChecked y
+
+checked : Jdec.Decoder Checked
+checked =
+    Jdec.succeed Checked
+
+encodeChecked : Checked -> Jenc.Value
+encodeChecked x =
+    Jenc.object
+        [
+        ]
+
+unionClass : Jdec.Decoder UnionClass
+unionClass =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionClass Jdec.float
+        , Jdec.map ClassInUnionClass class
+        ]
+
+encodeUnionClass : UnionClass -> Jenc.Value
+encodeUnionClass x = case x of
+    DoubleInUnionClass y -> Jenc.float y
+    ClassInUnionClass y -> encodeClass y
+
+class : Jdec.Decoder Class
+class =
+    Jdec.succeed Class
+
+encodeClass : Class -> Jenc.Value
+encodeClass x =
+    Jenc.object
+        [
+        ]
+
+unionCoAwait : Jdec.Decoder UnionCoAwait
+unionCoAwait =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCoAwait Jdec.float
+        , Jdec.map CoAwaitInUnionCoAwait coAwait
+        ]
+
+encodeUnionCoAwait : UnionCoAwait -> Jenc.Value
+encodeUnionCoAwait x = case x of
+    DoubleInUnionCoAwait y -> Jenc.float y
+    CoAwaitInUnionCoAwait y -> encodeCoAwait y
+
+coAwait : Jdec.Decoder CoAwait
+coAwait =
+    Jdec.succeed CoAwait
+
+encodeCoAwait : CoAwait -> Jenc.Value
+encodeCoAwait x =
+    Jenc.object
+        [
+        ]
+
+unionCoReturn : Jdec.Decoder UnionCoReturn
+unionCoReturn =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCoReturn Jdec.float
+        , Jdec.map CoReturnInUnionCoReturn coReturn
+        ]
+
+encodeUnionCoReturn : UnionCoReturn -> Jenc.Value
+encodeUnionCoReturn x = case x of
+    DoubleInUnionCoReturn y -> Jenc.float y
+    CoReturnInUnionCoReturn y -> encodeCoReturn y
+
+coReturn : Jdec.Decoder CoReturn
+coReturn =
+    Jdec.succeed CoReturn
+
+encodeCoReturn : CoReturn -> Jenc.Value
+encodeCoReturn x =
+    Jenc.object
+        [
+        ]
+
+unionCoYield : Jdec.Decoder UnionCoYield
+unionCoYield =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCoYield Jdec.float
+        , Jdec.map CoYieldInUnionCoYield coYield
+        ]
+
+encodeUnionCoYield : UnionCoYield -> Jenc.Value
+encodeUnionCoYield x = case x of
+    DoubleInUnionCoYield y -> Jenc.float y
+    CoYieldInUnionCoYield y -> encodeCoYield y
+
+coYield : Jdec.Decoder CoYield
+coYield =
+    Jdec.succeed CoYield
+
+encodeCoYield : CoYield -> Jenc.Value
+encodeCoYield x =
+    Jenc.object
+        [
+        ]
+
+unionCompl : Jdec.Decoder UnionCompl
+unionCompl =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCompl Jdec.float
+        , Jdec.map ComplInUnionCompl compl
+        ]
+
+encodeUnionCompl : UnionCompl -> Jenc.Value
+encodeUnionCompl x = case x of
+    DoubleInUnionCompl y -> Jenc.float y
+    ComplInUnionCompl y -> encodeCompl y
+
+compl : Jdec.Decoder Compl
+compl =
+    Jdec.succeed Compl
+
+encodeCompl : Compl -> Jenc.Value
+encodeCompl x =
+    Jenc.object
+        [
+        ]
+
+unionComplex : Jdec.Decoder UnionComplex
+unionComplex =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionComplex Jdec.float
+        , Jdec.map ComplexInUnionComplex complex
+        ]
+
+encodeUnionComplex : UnionComplex -> Jenc.Value
+encodeUnionComplex x = case x of
+    DoubleInUnionComplex y -> Jenc.float y
+    ComplexInUnionComplex y -> encodeComplex y
+
+complex : Jdec.Decoder Complex
+complex =
+    Jdec.succeed Complex
+
+encodeComplex : Complex -> Jenc.Value
+encodeComplex x =
+    Jenc.object
+        [
+        ]
+
+unionConcept : Jdec.Decoder UnionConcept
+unionConcept =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConcept Jdec.float
+        , Jdec.map ConceptInUnionConcept concept
+        ]
+
+encodeUnionConcept : UnionConcept -> Jenc.Value
+encodeUnionConcept x = case x of
+    DoubleInUnionConcept y -> Jenc.float y
+    ConceptInUnionConcept y -> encodeConcept y
+
+concept : Jdec.Decoder Concept
+concept =
+    Jdec.succeed Concept
+
+encodeConcept : Concept -> Jenc.Value
+encodeConcept x =
+    Jenc.object
+        [
+        ]
+
+unionConsole : Jdec.Decoder UnionConsole
+unionConsole =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConsole Jdec.float
+        , Jdec.map ConsoleInUnionConsole console
+        ]
+
+encodeUnionConsole : UnionConsole -> Jenc.Value
+encodeUnionConsole x = case x of
+    DoubleInUnionConsole y -> Jenc.float y
+    ConsoleInUnionConsole y -> encodeConsole y
+
+console : Jdec.Decoder Console
+console =
+    Jdec.succeed Console
+
+encodeConsole : Console -> Jenc.Value
+encodeConsole x =
+    Jenc.object
+        [
+        ]
+
+unionConst : Jdec.Decoder UnionConst
+unionConst =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConst Jdec.float
+        , Jdec.map ConstInUnionConst const
+        ]
+
+encodeUnionConst : UnionConst -> Jenc.Value
+encodeUnionConst x = case x of
+    DoubleInUnionConst y -> Jenc.float y
+    ConstInUnionConst y -> encodeConst y
+
+const : Jdec.Decoder Const
+const =
+    Jdec.succeed Const
+
+encodeConst : Const -> Jenc.Value
+encodeConst x =
+    Jenc.object
+        [
+        ]
+
+unionConstCast : Jdec.Decoder UnionConstCast
+unionConstCast =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConstCast Jdec.float
+        , Jdec.map ConstCastInUnionConstCast constCast
+        ]
+
+encodeUnionConstCast : UnionConstCast -> Jenc.Value
+encodeUnionConstCast x = case x of
+    DoubleInUnionConstCast y -> Jenc.float y
+    ConstCastInUnionConstCast y -> encodeConstCast y
+
+constCast : Jdec.Decoder ConstCast
+constCast =
+    Jdec.succeed ConstCast
+
+encodeConstCast : ConstCast -> Jenc.Value
+encodeConstCast x =
+    Jenc.object
+        [
+        ]
+
+unionConstexpr : Jdec.Decoder UnionConstexpr
+unionConstexpr =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConstexpr Jdec.float
+        , Jdec.map ConstexprInUnionConstexpr constexpr
+        ]
+
+encodeUnionConstexpr : UnionConstexpr -> Jenc.Value
+encodeUnionConstexpr x = case x of
+    DoubleInUnionConstexpr y -> Jenc.float y
+    ConstexprInUnionConstexpr y -> encodeConstexpr y
+
+constexpr : Jdec.Decoder Constexpr
+constexpr =
+    Jdec.succeed Constexpr
+
+encodeConstexpr : Constexpr -> Jenc.Value
+encodeConstexpr x =
+    Jenc.object
+        [
+        ]
+
+unionConstructor : Jdec.Decoder UnionConstructor
+unionConstructor =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConstructor Jdec.float
+        , Jdec.map ConstructorInUnionConstructor constructor
+        ]
+
+encodeUnionConstructor : UnionConstructor -> Jenc.Value
+encodeUnionConstructor x = case x of
+    DoubleInUnionConstructor y -> Jenc.float y
+    ConstructorInUnionConstructor y -> encodeConstructor y
+
+constructor : Jdec.Decoder Constructor
+constructor =
+    Jdec.succeed Constructor
+
+encodeConstructor : Constructor -> Jenc.Value
+encodeConstructor x =
+    Jenc.object
+        [
+        ]
+
+unionContinue : Jdec.Decoder UnionContinue
+unionContinue =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionContinue Jdec.float
+        , Jdec.map ContinueInUnionContinue continue
+        ]
+
+encodeUnionContinue : UnionContinue -> Jenc.Value
+encodeUnionContinue x = case x of
+    DoubleInUnionContinue y -> Jenc.float y
+    ContinueInUnionContinue y -> encodeContinue y
+
+continue : Jdec.Decoder Continue
+continue =
+    Jdec.succeed Continue
+
+encodeContinue : Continue -> Jenc.Value
+encodeContinue x =
+    Jenc.object
+        [
+        ]
+
+unionConvenience : Jdec.Decoder UnionConvenience
+unionConvenience =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConvenience Jdec.float
+        , Jdec.map ConvenienceInUnionConvenience convenience
+        ]
+
+encodeUnionConvenience : UnionConvenience -> Jenc.Value
+encodeUnionConvenience x = case x of
+    DoubleInUnionConvenience y -> Jenc.float y
+    ConvenienceInUnionConvenience y -> encodeConvenience y
+
+convenience : Jdec.Decoder Convenience
+convenience =
+    Jdec.succeed Convenience
+
+encodeConvenience : Convenience -> Jenc.Value
+encodeConvenience x =
+    Jenc.object
+        [
+        ]
+
+unionConvert : Jdec.Decoder UnionConvert
+unionConvert =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConvert Jdec.float
+        , Jdec.map ConvertInUnionConvert convert
+        ]
+
+encodeUnionConvert : UnionConvert -> Jenc.Value
+encodeUnionConvert x = case x of
+    DoubleInUnionConvert y -> Jenc.float y
+    ConvertInUnionConvert y -> encodeConvert y
+
+convert : Jdec.Decoder Convert
+convert =
+    Jdec.succeed Convert
+
+encodeConvert : Convert -> Jenc.Value
+encodeConvert x =
+    Jenc.object
+        [
+        ]
+
+unionConverter : Jdec.Decoder UnionConverter
+unionConverter =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionConverter Jdec.float
+        , Jdec.map ConverterInUnionConverter converter
+        ]
+
+encodeUnionConverter : UnionConverter -> Jenc.Value
+encodeUnionConverter x = case x of
+    DoubleInUnionConverter y -> Jenc.float y
+    ConverterInUnionConverter y -> encodeConverter y
+
+converter : Jdec.Decoder Converter
+converter =
+    Jdec.succeed Converter
+
+encodeConverter : Converter -> Jenc.Value
+encodeConverter x =
+    Jenc.object
+        [
+        ]
+
+unionDate : Jdec.Decoder UnionDate
+unionDate =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDate Jdec.float
+        , Jdec.map DateInUnionDate date
+        ]
+
+encodeUnionDate : UnionDate -> Jenc.Value
+encodeUnionDate x = case x of
+    DoubleInUnionDate y -> Jenc.float y
+    DateInUnionDate y -> encodeDate y
+
+date : Jdec.Decoder Date
+date =
+    Jdec.succeed Date
+
+encodeDate : Date -> Jenc.Value
+encodeDate x =
+    Jenc.object
+        [
+        ]
+
+unionDateParseHandling : Jdec.Decoder UnionDateParseHandling
+unionDateParseHandling =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDateParseHandling Jdec.float
+        , Jdec.map DateParseHandlingInUnionDateParseHandling dateParseHandling
+        ]
+
+encodeUnionDateParseHandling : UnionDateParseHandling -> Jenc.Value
+encodeUnionDateParseHandling x = case x of
+    DoubleInUnionDateParseHandling y -> Jenc.float y
+    DateParseHandlingInUnionDateParseHandling y -> encodeDateParseHandling y
+
+dateParseHandling : Jdec.Decoder DateParseHandling
+dateParseHandling =
+    Jdec.succeed DateParseHandling
+
+encodeDateParseHandling : DateParseHandling -> Jenc.Value
+encodeDateParseHandling x =
+    Jenc.object
+        [
+        ]
+
+unionDebugger : Jdec.Decoder UnionDebugger
+unionDebugger =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDebugger Jdec.float
+        , Jdec.map DebuggerInUnionDebugger debugger
+        ]
+
+encodeUnionDebugger : UnionDebugger -> Jenc.Value
+encodeUnionDebugger x = case x of
+    DoubleInUnionDebugger y -> Jenc.float y
+    DebuggerInUnionDebugger y -> encodeDebugger y
+
+debugger : Jdec.Decoder Debugger
+debugger =
+    Jdec.succeed Debugger
+
+encodeDebugger : Debugger -> Jenc.Value
+encodeDebugger x =
+    Jenc.object
+        [
+        ]
+
+unionDecimal : Jdec.Decoder UnionDecimal
+unionDecimal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDecimal Jdec.float
+        , Jdec.map DecimalInUnionDecimal decimal
+        ]
+
+encodeUnionDecimal : UnionDecimal -> Jenc.Value
+encodeUnionDecimal x = case x of
+    DoubleInUnionDecimal y -> Jenc.float y
+    DecimalInUnionDecimal y -> encodeDecimal y
+
+decimal : Jdec.Decoder Decimal
+decimal =
+    Jdec.succeed Decimal
+
+encodeDecimal : Decimal -> Jenc.Value
+encodeDecimal x =
+    Jenc.object
+        [
+        ]
+
+unionDeclare : Jdec.Decoder UnionDeclare
+unionDeclare =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDeclare Jdec.float
+        , Jdec.map DeclareInUnionDeclare declare
+        ]
+
+encodeUnionDeclare : UnionDeclare -> Jenc.Value
+encodeUnionDeclare x = case x of
+    DoubleInUnionDeclare y -> Jenc.float y
+    DeclareInUnionDeclare y -> encodeDeclare y
+
+declare : Jdec.Decoder Declare
+declare =
+    Jdec.succeed Declare
+
+encodeDeclare : Declare -> Jenc.Value
+encodeDeclare x =
+    Jenc.object
+        [
+        ]
+
+unionDecltype : Jdec.Decoder UnionDecltype
+unionDecltype =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDecltype Jdec.float
+        , Jdec.map DecltypeInUnionDecltype decltype
+        ]
+
+encodeUnionDecltype : UnionDecltype -> Jenc.Value
+encodeUnionDecltype x = case x of
+    DoubleInUnionDecltype y -> Jenc.float y
+    DecltypeInUnionDecltype y -> encodeDecltype y
+
+decltype : Jdec.Decoder Decltype
+decltype =
+    Jdec.succeed Decltype
+
+encodeDecltype : Decltype -> Jenc.Value
+encodeDecltype x =
+    Jenc.object
+        [
+        ]
+
+unionDecodeString : Jdec.Decoder UnionDecodeString
+unionDecodeString =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDecodeString Jdec.float
+        , Jdec.map DecodeStringInUnionDecodeString decodeString
+        ]
+
+encodeUnionDecodeString : UnionDecodeString -> Jenc.Value
+encodeUnionDecodeString x = case x of
+    DoubleInUnionDecodeString y -> Jenc.float y
+    DecodeStringInUnionDecodeString y -> encodeDecodeString y
+
+decodeString : Jdec.Decoder DecodeString
+decodeString =
+    Jdec.succeed DecodeString
+
+encodeDecodeString : DecodeString -> Jenc.Value
+encodeDecodeString x =
+    Jenc.object
+        [
+        ]
+
+unionDef : Jdec.Decoder UnionDef
+unionDef =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDef Jdec.float
+        , Jdec.map DefInUnionDef def
+        ]
+
+encodeUnionDef : UnionDef -> Jenc.Value
+encodeUnionDef x = case x of
+    DoubleInUnionDef y -> Jenc.float y
+    DefInUnionDef y -> encodeDef y
+
+def : Jdec.Decoder Def
+def =
+    Jdec.succeed Def
+
+encodeDef : Def -> Jenc.Value
+encodeDef x =
+    Jenc.object
+        [
+        ]
+
+unionDefault : Jdec.Decoder UnionDefault
+unionDefault =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDefault Jdec.float
+        , Jdec.map DefaultInUnionDefault default
+        ]
+
+encodeUnionDefault : UnionDefault -> Jenc.Value
+encodeUnionDefault x = case x of
+    DoubleInUnionDefault y -> Jenc.float y
+    DefaultInUnionDefault y -> encodeDefault y
+
+default : Jdec.Decoder Default
+default =
+    Jdec.succeed Default
+
+encodeDefault : Default -> Jenc.Value
+encodeDefault x =
+    Jenc.object
+        [
+        ]
+
+unionDefer : Jdec.Decoder UnionDefer
+unionDefer =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDefer Jdec.float
+        , Jdec.map DeferInUnionDefer defer
+        ]
+
+encodeUnionDefer : UnionDefer -> Jenc.Value
+encodeUnionDefer x = case x of
+    DoubleInUnionDefer y -> Jenc.float y
+    DeferInUnionDefer y -> encodeDefer y
+
+defer : Jdec.Decoder Defer
+defer =
+    Jdec.succeed Defer
+
+encodeDefer : Defer -> Jenc.Value
+encodeDefer x =
+    Jenc.object
+        [
+        ]
+
+unionDeinit : Jdec.Decoder UnionDeinit
+unionDeinit =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDeinit Jdec.float
+        , Jdec.map DeinitInUnionDeinit deinit
+        ]
+
+encodeUnionDeinit : UnionDeinit -> Jenc.Value
+encodeUnionDeinit x = case x of
+    DoubleInUnionDeinit y -> Jenc.float y
+    DeinitInUnionDeinit y -> encodeDeinit y
+
+deinit : Jdec.Decoder Deinit
+deinit =
+    Jdec.succeed Deinit
+
+encodeDeinit : Deinit -> Jenc.Value
+encodeDeinit x =
+    Jenc.object
+        [
+        ]
+
+unionDel : Jdec.Decoder UnionDel
+unionDel =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDel Jdec.float
+        , Jdec.map DelInUnionDel del
+        ]
+
+encodeUnionDel : UnionDel -> Jenc.Value
+encodeUnionDel x = case x of
+    DoubleInUnionDel y -> Jenc.float y
+    DelInUnionDel y -> encodeDel y
+
+del : Jdec.Decoder Del
+del =
+    Jdec.succeed Del
+
+encodeDel : Del -> Jenc.Value
+encodeDel x =
+    Jenc.object
+        [
+        ]
+
+unionDelegate : Jdec.Decoder UnionDelegate
+unionDelegate =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDelegate Jdec.float
+        , Jdec.map DelegateInUnionDelegate delegate
+        ]
+
+encodeUnionDelegate : UnionDelegate -> Jenc.Value
+encodeUnionDelegate x = case x of
+    DoubleInUnionDelegate y -> Jenc.float y
+    DelegateInUnionDelegate y -> encodeDelegate y
+
+delegate : Jdec.Decoder Delegate
+delegate =
+    Jdec.succeed Delegate
+
+encodeDelegate : Delegate -> Jenc.Value
+encodeDelegate x =
+    Jenc.object
+        [
+        ]
+
+unionDelete : Jdec.Decoder UnionDelete
+unionDelete =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDelete Jdec.float
+        , Jdec.map DeleteInUnionDelete delete
+        ]
+
+encodeUnionDelete : UnionDelete -> Jenc.Value
+encodeUnionDelete x = case x of
+    DoubleInUnionDelete y -> Jenc.float y
+    DeleteInUnionDelete y -> encodeDelete y
+
+delete : Jdec.Decoder Delete
+delete =
+    Jdec.succeed Delete
+
+encodeDelete : Delete -> Jenc.Value
+encodeDelete x =
+    Jenc.object
+        [
+        ]
+
+unionDict : Jdec.Decoder UnionDict
+unionDict =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDict Jdec.float
+        , Jdec.map DictClassInUnionDict dictClass
+        ]
+
+encodeUnionDict : UnionDict -> Jenc.Value
+encodeUnionDict x = case x of
+    DoubleInUnionDict y -> Jenc.float y
+    DictClassInUnionDict y -> encodeDictClass y
+
+dictClass : Jdec.Decoder DictClass
+dictClass =
+    Jdec.succeed DictClass
+
+encodeDictClass : DictClass -> Jenc.Value
+encodeDictClass x =
+    Jenc.object
+        [
+        ]
+
+unionDictionary : Jdec.Decoder UnionDictionary
+unionDictionary =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDictionary Jdec.float
+        , Jdec.map DictionaryInUnionDictionary dictionary
+        ]
+
+encodeUnionDictionary : UnionDictionary -> Jenc.Value
+encodeUnionDictionary x = case x of
+    DoubleInUnionDictionary y -> Jenc.float y
+    DictionaryInUnionDictionary y -> encodeDictionary y
+
+dictionary : Jdec.Decoder Dictionary
+dictionary =
+    Jdec.succeed Dictionary
+
+encodeDictionary : Dictionary -> Jenc.Value
+encodeDictionary x =
+    Jenc.object
+        [
+        ]
+
+unionDidSet : Jdec.Decoder UnionDidSet
+unionDidSet =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDidSet Jdec.float
+        , Jdec.map DidSetInUnionDidSet didSet
+        ]
+
+encodeUnionDidSet : UnionDidSet -> Jenc.Value
+encodeUnionDidSet x = case x of
+    DoubleInUnionDidSet y -> Jenc.float y
+    DidSetInUnionDidSet y -> encodeDidSet y
+
+didSet : Jdec.Decoder DidSet
+didSet =
+    Jdec.succeed DidSet
+
+encodeDidSet : DidSet -> Jenc.Value
+encodeDidSet x =
+    Jenc.object
+        [
+        ]
+
+unionDo : Jdec.Decoder UnionDo
+unionDo =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDo Jdec.float
+        , Jdec.map DoInUnionDo do
+        ]
+
+encodeUnionDo : UnionDo -> Jenc.Value
+encodeUnionDo x = case x of
+    DoubleInUnionDo y -> Jenc.float y
+    DoInUnionDo y -> encodeDo y
+
+do : Jdec.Decoder Do
+do =
+    Jdec.succeed Do
+
+encodeDo : Do -> Jenc.Value
+encodeDo x =
+    Jenc.object
+        [
+        ]
+
+unionDouble : Jdec.Decoder UnionDouble
+unionDouble =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDouble Jdec.float
+        , Jdec.map PurpleDoubleInUnionDouble double
+        ]
+
+encodeUnionDouble : UnionDouble -> Jenc.Value
+encodeUnionDouble x = case x of
+    DoubleInUnionDouble y -> Jenc.float y
+    PurpleDoubleInUnionDouble y -> encodeDouble y
+
+double : Jdec.Decoder Double
+double =
+    Jdec.succeed Double
+
+encodeDouble : Double -> Jenc.Value
+encodeDouble x =
+    Jenc.object
+        [
+        ]
+
+unionDynamic : Jdec.Decoder UnionDynamic
+unionDynamic =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDynamic Jdec.float
+        , Jdec.map DynamicInUnionDynamic dynamic
+        ]
+
+encodeUnionDynamic : UnionDynamic -> Jenc.Value
+encodeUnionDynamic x = case x of
+    DoubleInUnionDynamic y -> Jenc.float y
+    DynamicInUnionDynamic y -> encodeDynamic y
+
+dynamic : Jdec.Decoder Dynamic
+dynamic =
+    Jdec.succeed Dynamic
+
+encodeDynamic : Dynamic -> Jenc.Value
+encodeDynamic x =
+    Jenc.object
+        [
+        ]
+
+unionDynamicCast : Jdec.Decoder UnionDynamicCast
+unionDynamicCast =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionDynamicCast Jdec.float
+        , Jdec.map DynamicCastInUnionDynamicCast dynamicCast
+        ]
+
+encodeUnionDynamicCast : UnionDynamicCast -> Jenc.Value
+encodeUnionDynamicCast x = case x of
+    DoubleInUnionDynamicCast y -> Jenc.float y
+    DynamicCastInUnionDynamicCast y -> encodeDynamicCast y
+
+dynamicCast : Jdec.Decoder DynamicCast
+dynamicCast =
+    Jdec.succeed DynamicCast
+
+encodeDynamicCast : DynamicCast -> Jenc.Value
+encodeDynamicCast x =
+    Jenc.object
+        [
+        ]
+
+unionElif : Jdec.Decoder UnionElif
+unionElif =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionElif Jdec.float
+        , Jdec.map ElifInUnionElif elif
+        ]
+
+encodeUnionElif : UnionElif -> Jenc.Value
+encodeUnionElif x = case x of
+    DoubleInUnionElif y -> Jenc.float y
+    ElifInUnionElif y -> encodeElif y
+
+elif : Jdec.Decoder Elif
+elif =
+    Jdec.succeed Elif
+
+encodeElif : Elif -> Jenc.Value
+encodeElif x =
+    Jenc.object
+        [
+        ]
+
+unionUnion : Jdec.Decoder UnionUnion
+unionUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnion Jdec.float
+        , Jdec.map EmptyInUnionUnion empty
+        ]
+
+encodeUnionUnion : UnionUnion -> Jenc.Value
+encodeUnionUnion x = case x of
+    DoubleInUnionUnion y -> Jenc.float y
+    EmptyInUnionUnion y -> encodeEmpty y
+
+empty : Jdec.Decoder Empty
+empty =
+    Jdec.succeed Empty
+
+encodeEmpty : Empty -> Jenc.Value
+encodeEmpty x =
+    Jenc.object
+        [
+        ]
+
+unionEncodeQuickType : Jdec.Decoder UnionEncodeQuickType
+unionEncodeQuickType =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionEncodeQuickType Jdec.float
+        , Jdec.map EncodeQuickTypeInUnionEncodeQuickType purpleEncodeQuickType
+        ]
+
+encodeUnionEncodeQuickType : UnionEncodeQuickType -> Jenc.Value
+encodeUnionEncodeQuickType x = case x of
+    DoubleInUnionEncodeQuickType y -> Jenc.float y
+    EncodeQuickTypeInUnionEncodeQuickType y -> encodeEncodeQuickType y
+
+purpleEncodeQuickType : Jdec.Decoder EncodeQuickType
+purpleEncodeQuickType =
+    Jdec.succeed EncodeQuickType
+
+encodeEncodeQuickType : EncodeQuickType -> Jenc.Value
+encodeEncodeQuickType x =
+    Jenc.object
+        [
+        ]
+
+unionEnum : Jdec.Decoder UnionEnum
+unionEnum =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionEnum Jdec.float
+        , Jdec.map EnumInUnionEnum enum
+        ]
+
+encodeUnionEnum : UnionEnum -> Jenc.Value
+encodeUnionEnum x = case x of
+    DoubleInUnionEnum y -> Jenc.float y
+    EnumInUnionEnum y -> encodeEnum y
+
+enum : Jdec.Decoder Enum
+enum =
+    Jdec.succeed Enum
+
+encodeEnum : Enum -> Jenc.Value
+encodeEnum x =
+    Jenc.object
+        [
+        ]
+
+unionEvent : Jdec.Decoder UnionEvent
+unionEvent =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionEvent Jdec.float
+        , Jdec.map EventInUnionEvent event
+        ]
+
+encodeUnionEvent : UnionEvent -> Jenc.Value
+encodeUnionEvent x = case x of
+    DoubleInUnionEvent y -> Jenc.float y
+    EventInUnionEvent y -> encodeEvent y
+
+event : Jdec.Decoder Event
+event =
+    Jdec.succeed Event
+
+encodeEvent : Event -> Jenc.Value
+encodeEvent x =
+    Jenc.object
+        [
+        ]
+
+unionExcept : Jdec.Decoder UnionExcept
+unionExcept =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExcept Jdec.float
+        , Jdec.map ExceptInUnionExcept except
+        ]
+
+encodeUnionExcept : UnionExcept -> Jenc.Value
+encodeUnionExcept x = case x of
+    DoubleInUnionExcept y -> Jenc.float y
+    ExceptInUnionExcept y -> encodeExcept y
+
+except : Jdec.Decoder Except
+except =
+    Jdec.succeed Except
+
+encodeExcept : Except -> Jenc.Value
+encodeExcept x =
+    Jenc.object
+        [
+        ]
+
+unionException : Jdec.Decoder UnionException
+unionException =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionException Jdec.float
+        , Jdec.map ExceptionInUnionException exception
+        ]
+
+encodeUnionException : UnionException -> Jenc.Value
+encodeUnionException x = case x of
+    DoubleInUnionException y -> Jenc.float y
+    ExceptionInUnionException y -> encodeException y
+
+exception : Jdec.Decoder Exception
+exception =
+    Jdec.succeed Exception
+
+encodeException : Exception -> Jenc.Value
+encodeException x =
+    Jenc.object
+        [
+        ]
+
+unionExplicit : Jdec.Decoder UnionExplicit
+unionExplicit =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExplicit Jdec.float
+        , Jdec.map ExplicitInUnionExplicit explicit
+        ]
+
+encodeUnionExplicit : UnionExplicit -> Jenc.Value
+encodeUnionExplicit x = case x of
+    DoubleInUnionExplicit y -> Jenc.float y
+    ExplicitInUnionExplicit y -> encodeExplicit y
+
+explicit : Jdec.Decoder Explicit
+explicit =
+    Jdec.succeed Explicit
+
+encodeExplicit : Explicit -> Jenc.Value
+encodeExplicit x =
+    Jenc.object
+        [
+        ]
+
+unionExport : Jdec.Decoder UnionExport
+unionExport =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExport Jdec.float
+        , Jdec.map ExportInUnionExport export
+        ]
+
+encodeUnionExport : UnionExport -> Jenc.Value
+encodeUnionExport x = case x of
+    DoubleInUnionExport y -> Jenc.float y
+    ExportInUnionExport y -> encodeExport y
+
+export : Jdec.Decoder Export
+export =
+    Jdec.succeed Export
+
+encodeExport : Export -> Jenc.Value
+encodeExport x =
+    Jenc.object
+        [
+        ]
+
+unionExtends : Jdec.Decoder UnionExtends
+unionExtends =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExtends Jdec.float
+        , Jdec.map ExtendsInUnionExtends extends
+        ]
+
+encodeUnionExtends : UnionExtends -> Jenc.Value
+encodeUnionExtends x = case x of
+    DoubleInUnionExtends y -> Jenc.float y
+    ExtendsInUnionExtends y -> encodeExtends y
+
+extends : Jdec.Decoder Extends
+extends =
+    Jdec.succeed Extends
+
+encodeExtends : Extends -> Jenc.Value
+encodeExtends x =
+    Jenc.object
+        [
+        ]
+
+unionExtension : Jdec.Decoder UnionExtension
+unionExtension =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExtension Jdec.float
+        , Jdec.map ExtensionInUnionExtension extension
+        ]
+
+encodeUnionExtension : UnionExtension -> Jenc.Value
+encodeUnionExtension x = case x of
+    DoubleInUnionExtension y -> Jenc.float y
+    ExtensionInUnionExtension y -> encodeExtension y
+
+extension : Jdec.Decoder Extension
+extension =
+    Jdec.succeed Extension
+
+encodeExtension : Extension -> Jenc.Value
+encodeExtension x =
+    Jenc.object
+        [
+        ]
+
+unionExtern : Jdec.Decoder UnionExtern
+unionExtern =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExtern Jdec.float
+        , Jdec.map ExternInUnionExtern extern
+        ]
+
+encodeUnionExtern : UnionExtern -> Jenc.Value
+encodeUnionExtern x = case x of
+    DoubleInUnionExtern y -> Jenc.float y
+    ExternInUnionExtern y -> encodeExtern y
+
+extern : Jdec.Decoder Extern
+extern =
+    Jdec.succeed Extern
+
+encodeExtern : Extern -> Jenc.Value
+encodeExtern x =
+    Jenc.object
+        [
+        ]
+
+unionFallthrough : Jdec.Decoder UnionFallthrough
+unionFallthrough =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFallthrough Jdec.float
+        , Jdec.map FallthroughInUnionFallthrough fallthrough
+        ]
+
+encodeUnionFallthrough : UnionFallthrough -> Jenc.Value
+encodeUnionFallthrough x = case x of
+    DoubleInUnionFallthrough y -> Jenc.float y
+    FallthroughInUnionFallthrough y -> encodeFallthrough y
+
+fallthrough : Jdec.Decoder Fallthrough
+fallthrough =
+    Jdec.succeed Fallthrough
+
+encodeFallthrough : Fallthrough -> Jenc.Value
+encodeFallthrough x =
+    Jenc.object
+        [
+        ]
+
+unionFalse : Jdec.Decoder UnionFalse
+unionFalse =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFalse Jdec.float
+        , Jdec.map FalseClassInUnionFalse falseClass
+        ]
+
+encodeUnionFalse : UnionFalse -> Jenc.Value
+encodeUnionFalse x = case x of
+    DoubleInUnionFalse y -> Jenc.float y
+    FalseClassInUnionFalse y -> encodeFalseClass y
+
+falseClass : Jdec.Decoder FalseClass
+falseClass =
+    Jdec.succeed FalseClass
+
+encodeFalseClass : FalseClass -> Jenc.Value
+encodeFalseClass x =
+    Jenc.object
+        [
+        ]
+
+unionFileprivate : Jdec.Decoder UnionFileprivate
+unionFileprivate =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFileprivate Jdec.float
+        , Jdec.map FileprivateInUnionFileprivate fileprivate
+        ]
+
+encodeUnionFileprivate : UnionFileprivate -> Jenc.Value
+encodeUnionFileprivate x = case x of
+    DoubleInUnionFileprivate y -> Jenc.float y
+    FileprivateInUnionFileprivate y -> encodeFileprivate y
+
+fileprivate : Jdec.Decoder Fileprivate
+fileprivate =
+    Jdec.succeed Fileprivate
+
+encodeFileprivate : Fileprivate -> Jenc.Value
+encodeFileprivate x =
+    Jenc.object
+        [
+        ]
+
+unionFinal : Jdec.Decoder UnionFinal
+unionFinal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFinal Jdec.float
+        , Jdec.map FinalInUnionFinal final
+        ]
+
+encodeUnionFinal : UnionFinal -> Jenc.Value
+encodeUnionFinal x = case x of
+    DoubleInUnionFinal y -> Jenc.float y
+    FinalInUnionFinal y -> encodeFinal y
+
+final : Jdec.Decoder Final
+final =
+    Jdec.succeed Final
+
+encodeFinal : Final -> Jenc.Value
+encodeFinal x =
+    Jenc.object
+        [
+        ]
+
+unionFinally : Jdec.Decoder UnionFinally
+unionFinally =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFinally Jdec.float
+        , Jdec.map FinallyInUnionFinally finally
+        ]
+
+encodeUnionFinally : UnionFinally -> Jenc.Value
+encodeUnionFinally x = case x of
+    DoubleInUnionFinally y -> Jenc.float y
+    FinallyInUnionFinally y -> encodeFinally y
+
+finally : Jdec.Decoder Finally
+finally =
+    Jdec.succeed Finally
+
+encodeFinally : Finally -> Jenc.Value
+encodeFinally x =
+    Jenc.object
+        [
+        ]
+
+unionFixed : Jdec.Decoder UnionFixed
+unionFixed =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFixed Jdec.float
+        , Jdec.map FixedInUnionFixed fixed
+        ]
+
+encodeUnionFixed : UnionFixed -> Jenc.Value
+encodeUnionFixed x = case x of
+    DoubleInUnionFixed y -> Jenc.float y
+    FixedInUnionFixed y -> encodeFixed y
+
+fixed : Jdec.Decoder Fixed
+fixed =
+    Jdec.succeed Fixed
+
+encodeFixed : Fixed -> Jenc.Value
+encodeFixed x =
+    Jenc.object
+        [
+        ]
+
+unionFor : Jdec.Decoder UnionFor
+unionFor =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFor Jdec.float
+        , Jdec.map ForInUnionFor for
+        ]
+
+encodeUnionFor : UnionFor -> Jenc.Value
+encodeUnionFor x = case x of
+    DoubleInUnionFor y -> Jenc.float y
+    ForInUnionFor y -> encodeFor y
+
+for : Jdec.Decoder For
+for =
+    Jdec.succeed For
+
+encodeFor : For -> Jenc.Value
+encodeFor x =
+    Jenc.object
+        [
+        ]
+
+unionForeach : Jdec.Decoder UnionForeach
+unionForeach =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionForeach Jdec.float
+        , Jdec.map ForeachInUnionForeach foreach
+        ]
+
+encodeUnionForeach : UnionForeach -> Jenc.Value
+encodeUnionForeach x = case x of
+    DoubleInUnionForeach y -> Jenc.float y
+    ForeachInUnionForeach y -> encodeForeach y
+
+foreach : Jdec.Decoder Foreach
+foreach =
+    Jdec.succeed Foreach
+
+encodeForeach : Foreach -> Jenc.Value
+encodeForeach x =
+    Jenc.object
+        [
+        ]
+
+unionFriend : Jdec.Decoder UnionFriend
+unionFriend =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFriend Jdec.float
+        , Jdec.map FriendInUnionFriend friend
+        ]
+
+encodeUnionFriend : UnionFriend -> Jenc.Value
+encodeUnionFriend x = case x of
+    DoubleInUnionFriend y -> Jenc.float y
+    FriendInUnionFriend y -> encodeFriend y
+
+friend : Jdec.Decoder Friend
+friend =
+    Jdec.succeed Friend
+
+encodeFriend : Friend -> Jenc.Value
+encodeFriend x =
+    Jenc.object
+        [
+        ]
+
+unionFrom : Jdec.Decoder UnionFrom
+unionFrom =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFrom Jdec.float
+        , Jdec.map FromInUnionFrom from
+        ]
+
+encodeUnionFrom : UnionFrom -> Jenc.Value
+encodeUnionFrom x = case x of
+    DoubleInUnionFrom y -> Jenc.float y
+    FromInUnionFrom y -> encodeFrom y
+
+from : Jdec.Decoder From
+from =
+    Jdec.succeed From
+
+encodeFrom : From -> Jenc.Value
+encodeFrom x =
+    Jenc.object
+        [
+        ]
+
+unionFromJSON : Jdec.Decoder UnionFromJSON
+unionFromJSON =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFromJSON Jdec.float
+        , Jdec.map FromJSONInUnionFromJSON fromJSON
+        ]
+
+encodeUnionFromJSON : UnionFromJSON -> Jenc.Value
+encodeUnionFromJSON x = case x of
+    DoubleInUnionFromJSON y -> Jenc.float y
+    FromJSONInUnionFromJSON y -> encodeFromJSON y
+
+fromJSON : Jdec.Decoder FromJSON
+fromJSON =
+    Jdec.succeed FromJSON
+
+encodeFromJSON : FromJSON -> Jenc.Value
+encodeFromJSON x =
+    Jenc.object
+        [
+        ]
+
+unionFunc : Jdec.Decoder UnionFunc
+unionFunc =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFunc Jdec.float
+        , Jdec.map FuncInUnionFunc func
+        ]
+
+encodeUnionFunc : UnionFunc -> Jenc.Value
+encodeUnionFunc x = case x of
+    DoubleInUnionFunc y -> Jenc.float y
+    FuncInUnionFunc y -> encodeFunc y
+
+func : Jdec.Decoder Func
+func =
+    Jdec.succeed Func
+
+encodeFunc : Func -> Jenc.Value
+encodeFunc x =
+    Jenc.object
+        [
+        ]
+
+unionFunction : Jdec.Decoder UnionFunction
+unionFunction =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFunction Jdec.float
+        , Jdec.map FunctionInUnionFunction function
+        ]
+
+encodeUnionFunction : UnionFunction -> Jenc.Value
+encodeUnionFunction x = case x of
+    DoubleInUnionFunction y -> Jenc.float y
+    FunctionInUnionFunction y -> encodeFunction y
+
+function : Jdec.Decoder Function
+function =
+    Jdec.succeed Function
+
+encodeFunction : Function -> Jenc.Value
+encodeFunction x =
+    Jenc.object
+        [
+        ]
+
+unionGet : Jdec.Decoder UnionGet
+unionGet =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionGet Jdec.float
+        , Jdec.map GetInUnionGet get
+        ]
+
+encodeUnionGet : UnionGet -> Jenc.Value
+encodeUnionGet x = case x of
+    DoubleInUnionGet y -> Jenc.float y
+    GetInUnionGet y -> encodeGet y
+
+get : Jdec.Decoder Get
+get =
+    Jdec.succeed Get
+
+encodeGet : Get -> Jenc.Value
+encodeGet x =
+    Jenc.object
+        [
+        ]
+
+unionGlobal : Jdec.Decoder UnionGlobal
+unionGlobal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionGlobal Jdec.float
+        , Jdec.map GlobalInUnionGlobal global
+        ]
+
+encodeUnionGlobal : UnionGlobal -> Jenc.Value
+encodeUnionGlobal x = case x of
+    DoubleInUnionGlobal y -> Jenc.float y
+    GlobalInUnionGlobal y -> encodeGlobal y
+
+global : Jdec.Decoder Global
+global =
+    Jdec.succeed Global
+
+encodeGlobal : Global -> Jenc.Value
+encodeGlobal x =
+    Jenc.object
+        [
+        ]
+
+unionGo : Jdec.Decoder UnionGo
+unionGo =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionGo Jdec.float
+        , Jdec.map GoInUnionGo go
+        ]
+
+encodeUnionGo : UnionGo -> Jenc.Value
+encodeUnionGo x = case x of
+    DoubleInUnionGo y -> Jenc.float y
+    GoInUnionGo y -> encodeGo y
+
+go : Jdec.Decoder Go
+go =
+    Jdec.succeed Go
+
+encodeGo : Go -> Jenc.Value
+encodeGo x =
+    Jenc.object
+        [
+        ]
+
+unionGoto : Jdec.Decoder UnionGoto
+unionGoto =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionGoto Jdec.float
+        , Jdec.map GotoInUnionGoto goto
+        ]
+
+encodeUnionGoto : UnionGoto -> Jenc.Value
+encodeUnionGoto x = case x of
+    DoubleInUnionGoto y -> Jenc.float y
+    GotoInUnionGoto y -> encodeGoto y
+
+goto : Jdec.Decoder Goto
+goto =
+    Jdec.succeed Goto
+
+encodeGoto : Goto -> Jenc.Value
+encodeGoto x =
+    Jenc.object
+        [
+        ]
+
+unionGuard : Jdec.Decoder UnionGuard
+unionGuard =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionGuard Jdec.float
+        , Jdec.map GuardInUnionGuard guard
+        ]
+
+encodeUnionGuard : UnionGuard -> Jenc.Value
+encodeUnionGuard x = case x of
+    DoubleInUnionGuard y -> Jenc.float y
+    GuardInUnionGuard y -> encodeGuard y
+
+guard : Jdec.Decoder Guard
+guard =
+    Jdec.succeed Guard
+
+encodeGuard : Guard -> Jenc.Value
+encodeGuard x =
+    Jenc.object
+        [
+        ]
+
+unionHasOwnProperty : Jdec.Decoder UnionHasOwnProperty
+unionHasOwnProperty =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionHasOwnProperty Jdec.float
+        , Jdec.map HasOwnPropertyInUnionHasOwnProperty hasOwnProperty
+        ]
+
+encodeUnionHasOwnProperty : UnionHasOwnProperty -> Jenc.Value
+encodeUnionHasOwnProperty x = case x of
+    DoubleInUnionHasOwnProperty y -> Jenc.float y
+    HasOwnPropertyInUnionHasOwnProperty y -> encodeHasOwnProperty y
+
+hasOwnProperty : Jdec.Decoder HasOwnProperty
+hasOwnProperty =
+    Jdec.succeed HasOwnProperty
+
+encodeHasOwnProperty : HasOwnProperty -> Jenc.Value
+encodeHasOwnProperty x =
+    Jenc.object
+        [
+        ]
+
+unionID : Jdec.Decoder UnionID
+unionID =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionID Jdec.float
+        , Jdec.map IDInUnionID id
+        ]
+
+encodeUnionID : UnionID -> Jenc.Value
+encodeUnionID x = case x of
+    DoubleInUnionID y -> Jenc.float y
+    IDInUnionID y -> encodeID y
+
+id : Jdec.Decoder ID
+id =
+    Jdec.succeed ID
+
+encodeID : ID -> Jenc.Value
+encodeID x =
+    Jenc.object
+        [
+        ]
+
+unionImaginery : Jdec.Decoder UnionImaginery
+unionImaginery =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionImaginery Jdec.float
+        , Jdec.map ImagineryInUnionImaginery imaginery
+        ]
+
+encodeUnionImaginery : UnionImaginery -> Jenc.Value
+encodeUnionImaginery x = case x of
+    DoubleInUnionImaginery y -> Jenc.float y
+    ImagineryInUnionImaginery y -> encodeImaginery y
+
+imaginery : Jdec.Decoder Imaginery
+imaginery =
+    Jdec.succeed Imaginery
+
+encodeImaginery : Imaginery -> Jenc.Value
+encodeImaginery x =
+    Jenc.object
+        [
+        ]
+
+unionIMP : Jdec.Decoder UnionIMP
+unionIMP =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIMP Jdec.float
+        , Jdec.map ImpInUnionIMP imp
+        ]
+
+encodeUnionIMP : UnionIMP -> Jenc.Value
+encodeUnionIMP x = case x of
+    DoubleInUnionIMP y -> Jenc.float y
+    ImpInUnionIMP y -> encodeImp y
+
+imp : Jdec.Decoder Imp
+imp =
+    Jdec.succeed Imp
+
+encodeImp : Imp -> Jenc.Value
+encodeImp x =
+    Jenc.object
+        [
+        ]
+
+unionImplements : Jdec.Decoder UnionImplements
+unionImplements =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionImplements Jdec.float
+        , Jdec.map ImplementsInUnionImplements implements
+        ]
+
+encodeUnionImplements : UnionImplements -> Jenc.Value
+encodeUnionImplements x = case x of
+    DoubleInUnionImplements y -> Jenc.float y
+    ImplementsInUnionImplements y -> encodeImplements y
+
+implements : Jdec.Decoder Implements
+implements =
+    Jdec.succeed Implements
+
+encodeImplements : Implements -> Jenc.Value
+encodeImplements x =
+    Jenc.object
+        [
+        ]
+
+unionImplicit : Jdec.Decoder UnionImplicit
+unionImplicit =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionImplicit Jdec.float
+        , Jdec.map ImplicitInUnionImplicit implicit
+        ]
+
+encodeUnionImplicit : UnionImplicit -> Jenc.Value
+encodeUnionImplicit x = case x of
+    DoubleInUnionImplicit y -> Jenc.float y
+    ImplicitInUnionImplicit y -> encodeImplicit y
+
+implicit : Jdec.Decoder Implicit
+implicit =
+    Jdec.succeed Implicit
+
+encodeImplicit : Implicit -> Jenc.Value
+encodeImplicit x =
+    Jenc.object
+        [
+        ]
+
+unionIndirect : Jdec.Decoder UnionIndirect
+unionIndirect =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIndirect Jdec.float
+        , Jdec.map IndirectInUnionIndirect indirect
+        ]
+
+encodeUnionIndirect : UnionIndirect -> Jenc.Value
+encodeUnionIndirect x = case x of
+    DoubleInUnionIndirect y -> Jenc.float y
+    IndirectInUnionIndirect y -> encodeIndirect y
+
+indirect : Jdec.Decoder Indirect
+indirect =
+    Jdec.succeed Indirect
+
+encodeIndirect : Indirect -> Jenc.Value
+encodeIndirect x =
+    Jenc.object
+        [
+        ]
+
+unionInit : Jdec.Decoder UnionInit
+unionInit =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInit Jdec.float
+        , Jdec.map InitInUnionInit init
+        ]
+
+encodeUnionInit : UnionInit -> Jenc.Value
+encodeUnionInit x = case x of
+    DoubleInUnionInit y -> Jenc.float y
+    InitInUnionInit y -> encodeInit y
+
+init : Jdec.Decoder Init
+init =
+    Jdec.succeed Init
+
+encodeInit : Init -> Jenc.Value
+encodeInit x =
+    Jenc.object
+        [
+        ]
+
+unionInline : Jdec.Decoder UnionInline
+unionInline =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInline Jdec.float
+        , Jdec.map InlineInUnionInline inline
+        ]
+
+encodeUnionInline : UnionInline -> Jenc.Value
+encodeUnionInline x = case x of
+    DoubleInUnionInline y -> Jenc.float y
+    InlineInUnionInline y -> encodeInline y
+
+inline : Jdec.Decoder Inline
+inline =
+    Jdec.succeed Inline
+
+encodeInline : Inline -> Jenc.Value
+encodeInline x =
+    Jenc.object
+        [
+        ]
+
+unionInout : Jdec.Decoder UnionInout
+unionInout =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInout Jdec.float
+        , Jdec.map InoutInUnionInout inout
+        ]
+
+encodeUnionInout : UnionInout -> Jenc.Value
+encodeUnionInout x = case x of
+    DoubleInUnionInout y -> Jenc.float y
+    InoutInUnionInout y -> encodeInout y
+
+inout : Jdec.Decoder Inout
+inout =
+    Jdec.succeed Inout
+
+encodeInout : Inout -> Jenc.Value
+encodeInout x =
+    Jenc.object
+        [
+        ]
+
+unionInstanceof : Jdec.Decoder UnionInstanceof
+unionInstanceof =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInstanceof Jdec.float
+        , Jdec.map InstanceofInUnionInstanceof instanceof
+        ]
+
+encodeUnionInstanceof : UnionInstanceof -> Jenc.Value
+encodeUnionInstanceof x = case x of
+    DoubleInUnionInstanceof y -> Jenc.float y
+    InstanceofInUnionInstanceof y -> encodeInstanceof y
+
+instanceof : Jdec.Decoder Instanceof
+instanceof =
+    Jdec.succeed Instanceof
+
+encodeInstanceof : Instanceof -> Jenc.Value
+encodeInstanceof x =
+    Jenc.object
+        [
+        ]
+
+unionInterface : Jdec.Decoder UnionInterface
+unionInterface =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInterface Jdec.float
+        , Jdec.map InterfaceInUnionInterface interface
+        ]
+
+encodeUnionInterface : UnionInterface -> Jenc.Value
+encodeUnionInterface x = case x of
+    DoubleInUnionInterface y -> Jenc.float y
+    InterfaceInUnionInterface y -> encodeInterface y
+
+interface : Jdec.Decoder Interface
+interface =
+    Jdec.succeed Interface
+
+encodeInterface : Interface -> Jenc.Value
+encodeInterface x =
+    Jenc.object
+        [
+        ]
+
+unionInternal : Jdec.Decoder UnionInternal
+unionInternal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInternal Jdec.float
+        , Jdec.map InternalInUnionInternal internal
+        ]
+
+encodeUnionInternal : UnionInternal -> Jenc.Value
+encodeUnionInternal x = case x of
+    DoubleInUnionInternal y -> Jenc.float y
+    InternalInUnionInternal y -> encodeInternal y
+
+internal : Jdec.Decoder Internal
+internal =
+    Jdec.succeed Internal
+
+encodeInternal : Internal -> Jenc.Value
+encodeInternal x =
+    Jenc.object
+        [
+        ]
+
+unionIs : Jdec.Decoder UnionIs
+unionIs =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIs Jdec.float
+        , Jdec.map IsInUnionIs is
+        ]
+
+encodeUnionIs : UnionIs -> Jenc.Value
+encodeUnionIs x = case x of
+    DoubleInUnionIs y -> Jenc.float y
+    IsInUnionIs y -> encodeIs y
+
+is : Jdec.Decoder Is
+is =
+    Jdec.succeed Is
+
+encodeIs : Is -> Jenc.Value
+encodeIs x =
+    Jenc.object
+        [
+        ]
+
+unionIterable : Jdec.Decoder UnionIterable
+unionIterable =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIterable Jdec.float
+        , Jdec.map IterableInUnionIterable iterable
+        ]
+
+encodeUnionIterable : UnionIterable -> Jenc.Value
+encodeUnionIterable x = case x of
+    DoubleInUnionIterable y -> Jenc.float y
+    IterableInUnionIterable y -> encodeIterable y
+
+iterable : Jdec.Decoder Iterable
+iterable =
+    Jdec.succeed Iterable
+
+encodeIterable : Iterable -> Jenc.Value
+encodeIterable x =
+    Jenc.object
+        [
+        ]
+
+unionJdec : Jdec.Decoder UnionJdec
+unionJdec =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJdec Jdec.float
+        , Jdec.map JdecClassInUnionJdec jdecClass
+        ]
+
+encodeUnionJdec : UnionJdec -> Jenc.Value
+encodeUnionJdec x = case x of
+    DoubleInUnionJdec y -> Jenc.float y
+    JdecClassInUnionJdec y -> encodeJdecClass y
+
+jdecClass : Jdec.Decoder JdecClass
+jdecClass =
+    Jdec.succeed JdecClass
+
+encodeJdecClass : JdecClass -> Jenc.Value
+encodeJdecClass x =
+    Jenc.object
+        [
+        ]
+
+unionJenc : Jdec.Decoder UnionJenc
+unionJenc =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJenc Jdec.float
+        , Jdec.map JencClassInUnionJenc jencClass
+        ]
+
+encodeUnionJenc : UnionJenc -> Jenc.Value
+encodeUnionJenc x = case x of
+    DoubleInUnionJenc y -> Jenc.float y
+    JencClassInUnionJenc y -> encodeJencClass y
+
+jencClass : Jdec.Decoder JencClass
+jencClass =
+    Jdec.succeed JencClass
+
+encodeJencClass : JencClass -> Jenc.Value
+encodeJencClass x =
+    Jenc.object
+        [
+        ]
+
+unionJpipe : Jdec.Decoder UnionJpipe
+unionJpipe =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJpipe Jdec.float
+        , Jdec.map JpipeClassInUnionJpipe jpipeClass
+        ]
+
+encodeUnionJpipe : UnionJpipe -> Jenc.Value
+encodeUnionJpipe x = case x of
+    DoubleInUnionJpipe y -> Jenc.float y
+    JpipeClassInUnionJpipe y -> encodeJpipeClass y
+
+jpipeClass : Jdec.Decoder JpipeClass
+jpipeClass =
+    Jdec.succeed JpipeClass
+
+encodeJpipeClass : JpipeClass -> Jenc.Value
+encodeJpipeClass x =
+    Jenc.object
+        [
+        ]
+
+unionJSON : Jdec.Decoder UnionJSON
+unionJSON =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJSON Jdec.float
+        , Jdec.map JSONInUnionJSON json
+        ]
+
+encodeUnionJSON : UnionJSON -> Jenc.Value
+encodeUnionJSON x = case x of
+    DoubleInUnionJSON y -> Jenc.float y
+    JSONInUnionJSON y -> encodeJSON y
+
+json : Jdec.Decoder JSON
+json =
+    Jdec.succeed JSON
+
+encodeJSON : JSON -> Jenc.Value
+encodeJSON x =
+    Jenc.object
+        [
+        ]
+
+unionJSONConverter : Jdec.Decoder UnionJSONConverter
+unionJSONConverter =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJSONConverter Jdec.float
+        , Jdec.map JSONConverterInUnionJSONConverter jsonConverter
+        ]
+
+encodeUnionJSONConverter : UnionJSONConverter -> Jenc.Value
+encodeUnionJSONConverter x = case x of
+    DoubleInUnionJSONConverter y -> Jenc.float y
+    JSONConverterInUnionJSONConverter y -> encodeJSONConverter y
+
+jsonConverter : Jdec.Decoder JSONConverter
+jsonConverter =
+    Jdec.succeed JSONConverter
+
+encodeJSONConverter : JSONConverter -> Jenc.Value
+encodeJSONConverter x =
+    Jenc.object
+        [
+        ]
+
+unionJSONSerializer : Jdec.Decoder UnionJSONSerializer
+unionJSONSerializer =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJSONSerializer Jdec.float
+        , Jdec.map JSONSerializerInUnionJSONSerializer jsonSerializer
+        ]
+
+encodeUnionJSONSerializer : UnionJSONSerializer -> Jenc.Value
+encodeUnionJSONSerializer x = case x of
+    DoubleInUnionJSONSerializer y -> Jenc.float y
+    JSONSerializerInUnionJSONSerializer y -> encodeJSONSerializer y
+
+jsonSerializer : Jdec.Decoder JSONSerializer
+jsonSerializer =
+    Jdec.succeed JSONSerializer
+
+encodeJSONSerializer : JSONSerializer -> Jenc.Value
+encodeJSONSerializer x =
+    Jenc.object
+        [
+        ]
+
+unionJSONToken : Jdec.Decoder UnionJSONToken
+unionJSONToken =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJSONToken Jdec.float
+        , Jdec.map JSONTokenInUnionJSONToken jsonToken
+        ]
+
+encodeUnionJSONToken : UnionJSONToken -> Jenc.Value
+encodeUnionJSONToken x = case x of
+    DoubleInUnionJSONToken y -> Jenc.float y
+    JSONTokenInUnionJSONToken y -> encodeJSONToken y
+
+jsonToken : Jdec.Decoder JSONToken
+jsonToken =
+    Jdec.succeed JSONToken
+
+encodeJSONToken : JSONToken -> Jenc.Value
+encodeJSONToken x =
+    Jenc.object
+        [
+        ]
+
+unionJSONWriter : Jdec.Decoder UnionJSONWriter
+unionJSONWriter =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionJSONWriter Jdec.float
+        , Jdec.map JSONWriterInUnionJSONWriter jsonWriter
+        ]
+
+encodeUnionJSONWriter : UnionJSONWriter -> Jenc.Value
+encodeUnionJSONWriter x = case x of
+    DoubleInUnionJSONWriter y -> Jenc.float y
+    JSONWriterInUnionJSONWriter y -> encodeJSONWriter y
+
+jsonWriter : Jdec.Decoder JSONWriter
+jsonWriter =
+    Jdec.succeed JSONWriter
+
+encodeJSONWriter : JSONWriter -> Jenc.Value
+encodeJSONWriter x =
+    Jenc.object
+        [
+        ]
+
+unionLambda : Jdec.Decoder UnionLambda
+unionLambda =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLambda Jdec.float
+        , Jdec.map LambdaInUnionLambda lambda
+        ]
+
+encodeUnionLambda : UnionLambda -> Jenc.Value
+encodeUnionLambda x = case x of
+    DoubleInUnionLambda y -> Jenc.float y
+    LambdaInUnionLambda y -> encodeLambda y
+
+lambda : Jdec.Decoder Lambda
+lambda =
+    Jdec.succeed Lambda
+
+encodeLambda : Lambda -> Jenc.Value
+encodeLambda x =
+    Jenc.object
+        [
+        ]
+
+unionLazy : Jdec.Decoder UnionLazy
+unionLazy =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLazy Jdec.float
+        , Jdec.map LazyInUnionLazy lazy
+        ]
+
+encodeUnionLazy : UnionLazy -> Jenc.Value
+encodeUnionLazy x = case x of
+    DoubleInUnionLazy y -> Jenc.float y
+    LazyInUnionLazy y -> encodeLazy y
+
+lazy : Jdec.Decoder Lazy
+lazy =
+    Jdec.succeed Lazy
+
+encodeLazy : Lazy -> Jenc.Value
+encodeLazy x =
+    Jenc.object
+        [
+        ]
+
+unionLeft : Jdec.Decoder UnionLeft
+unionLeft =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLeft Jdec.float
+        , Jdec.map LeftInUnionLeft left
+        ]
+
+encodeUnionLeft : UnionLeft -> Jenc.Value
+encodeUnionLeft x = case x of
+    DoubleInUnionLeft y -> Jenc.float y
+    LeftInUnionLeft y -> encodeLeft y
+
+left : Jdec.Decoder Left
+left =
+    Jdec.succeed Left
+
+encodeLeft : Left -> Jenc.Value
+encodeLeft x =
+    Jenc.object
+        [
+        ]
+
+unionList : Jdec.Decoder UnionList
+unionList =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionList Jdec.float
+        , Jdec.map ListClassInUnionList listClass
+        ]
+
+encodeUnionList : UnionList -> Jenc.Value
+encodeUnionList x = case x of
+    DoubleInUnionList y -> Jenc.float y
+    ListClassInUnionList y -> encodeListClass y
+
+listClass : Jdec.Decoder ListClass
+listClass =
+    Jdec.succeed ListClass
+
+encodeListClass : ListClass -> Jenc.Value
+encodeListClass x =
+    Jenc.object
+        [
+        ]
+
+unionLock : Jdec.Decoder UnionLock
+unionLock =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLock Jdec.float
+        , Jdec.map LockInUnionLock lock
+        ]
+
+encodeUnionLock : UnionLock -> Jenc.Value
+encodeUnionLock x = case x of
+    DoubleInUnionLock y -> Jenc.float y
+    LockInUnionLock y -> encodeLock y
+
+lock : Jdec.Decoder Lock
+lock =
+    Jdec.succeed Lock
+
+encodeLock : Lock -> Jenc.Value
+encodeLock x =
+    Jenc.object
+        [
+        ]
+
+unionLong : Jdec.Decoder UnionLong
+unionLong =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLong Jdec.float
+        , Jdec.map LongInUnionLong long
+        ]
+
+encodeUnionLong : UnionLong -> Jenc.Value
+encodeUnionLong x = case x of
+    DoubleInUnionLong y -> Jenc.float y
+    LongInUnionLong y -> encodeLong y
+
+long : Jdec.Decoder Long
+long =
+    Jdec.succeed Long
+
+encodeLong : Long -> Jenc.Value
+encodeLong x =
+    Jenc.object
+        [
+        ]
+
+unionMap : Jdec.Decoder UnionMap
+unionMap =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionMap Jdec.float
+        , Jdec.map MapInUnionMap map
+        ]
+
+encodeUnionMap : UnionMap -> Jenc.Value
+encodeUnionMap x = case x of
+    DoubleInUnionMap y -> Jenc.float y
+    MapInUnionMap y -> encodeMap y
+
+map : Jdec.Decoder Map
+map =
+    Jdec.succeed Map
+
+encodeMap : Map -> Jenc.Value
+encodeMap x =
+    Jenc.object
+        [
+        ]
+
+unionMetadataPropertyHandling : Jdec.Decoder UnionMetadataPropertyHandling
+unionMetadataPropertyHandling =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionMetadataPropertyHandling Jdec.float
+        , Jdec.map MetadataPropertyHandlingInUnionMetadataPropertyHandling metadataPropertyHandling
+        ]
+
+encodeUnionMetadataPropertyHandling : UnionMetadataPropertyHandling -> Jenc.Value
+encodeUnionMetadataPropertyHandling x = case x of
+    DoubleInUnionMetadataPropertyHandling y -> Jenc.float y
+    MetadataPropertyHandlingInUnionMetadataPropertyHandling y -> encodeMetadataPropertyHandling y
+
+metadataPropertyHandling : Jdec.Decoder MetadataPropertyHandling
+metadataPropertyHandling =
+    Jdec.succeed MetadataPropertyHandling
+
+encodeMetadataPropertyHandling : MetadataPropertyHandling -> Jenc.Value
+encodeMetadataPropertyHandling x =
+    Jenc.object
+        [
+        ]
+
+unionMutable : Jdec.Decoder UnionMutable
+unionMutable =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionMutable Jdec.float
+        , Jdec.map MutableInUnionMutable mutable
+        ]
+
+encodeUnionMutable : UnionMutable -> Jenc.Value
+encodeUnionMutable x = case x of
+    DoubleInUnionMutable y -> Jenc.float y
+    MutableInUnionMutable y -> encodeMutable y
+
+mutable : Jdec.Decoder Mutable
+mutable =
+    Jdec.succeed Mutable
+
+encodeMutable : Mutable -> Jenc.Value
+encodeMutable x =
+    Jenc.object
+        [
+        ]
+
+unionMutating : Jdec.Decoder UnionMutating
+unionMutating =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionMutating Jdec.float
+        , Jdec.map MutatingInUnionMutating mutating
+        ]
+
+encodeUnionMutating : UnionMutating -> Jenc.Value
+encodeUnionMutating x = case x of
+    DoubleInUnionMutating y -> Jenc.float y
+    MutatingInUnionMutating y -> encodeMutating y
+
+mutating : Jdec.Decoder Mutating
+mutating =
+    Jdec.succeed Mutating
+
+encodeMutating : Mutating -> Jenc.Value
+encodeMutating x =
+    Jenc.object
+        [
+        ]
+
+unionNamespace : Jdec.Decoder UnionNamespace
+unionNamespace =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNamespace Jdec.float
+        , Jdec.map NamespaceInUnionNamespace namespace
+        ]
+
+encodeUnionNamespace : UnionNamespace -> Jenc.Value
+encodeUnionNamespace x = case x of
+    DoubleInUnionNamespace y -> Jenc.float y
+    NamespaceInUnionNamespace y -> encodeNamespace y
+
+namespace : Jdec.Decoder Namespace
+namespace =
+    Jdec.succeed Namespace
+
+encodeNamespace : Namespace -> Jenc.Value
+encodeNamespace x =
+    Jenc.object
+        [
+        ]
+
+unionNative : Jdec.Decoder UnionNative
+unionNative =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNative Jdec.float
+        , Jdec.map NativeInUnionNative native
+        ]
+
+encodeUnionNative : UnionNative -> Jenc.Value
+encodeUnionNative x = case x of
+    DoubleInUnionNative y -> Jenc.float y
+    NativeInUnionNative y -> encodeNative y
+
+native : Jdec.Decoder Native
+native =
+    Jdec.succeed Native
+
+encodeNative : Native -> Jenc.Value
+encodeNative x =
+    Jenc.object
+        [
+        ]
+
+unionNew : Jdec.Decoder UnionNew
+unionNew =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNew Jdec.float
+        , Jdec.map NewInUnionNew new
+        ]
+
+encodeUnionNew : UnionNew -> Jenc.Value
+encodeUnionNew x = case x of
+    DoubleInUnionNew y -> Jenc.float y
+    NewInUnionNew y -> encodeNew y
+
+new : Jdec.Decoder New
+new =
+    Jdec.succeed New
+
+encodeNew : New -> Jenc.Value
+encodeNew x =
+    Jenc.object
+        [
+        ]
+
+unionNewtonsoft : Jdec.Decoder UnionNewtonsoft
+unionNewtonsoft =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNewtonsoft Jdec.float
+        , Jdec.map NewtonsoftInUnionNewtonsoft newtonsoft
+        ]
+
+encodeUnionNewtonsoft : UnionNewtonsoft -> Jenc.Value
+encodeUnionNewtonsoft x = case x of
+    DoubleInUnionNewtonsoft y -> Jenc.float y
+    NewtonsoftInUnionNewtonsoft y -> encodeNewtonsoft y
+
+newtonsoft : Jdec.Decoder Newtonsoft
+newtonsoft =
+    Jdec.succeed Newtonsoft
+
+encodeNewtonsoft : Newtonsoft -> Jenc.Value
+encodeNewtonsoft x =
+    Jenc.object
+        [
+        ]
+
+unionNil : Jdec.Decoder UnionNil
+unionNil =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNil Jdec.float
+        , Jdec.map NilInUnionNil nil
+        ]
+
+encodeUnionNil : UnionNil -> Jenc.Value
+encodeUnionNil x = case x of
+    DoubleInUnionNil y -> Jenc.float y
+    NilInUnionNil y -> encodeNil y
+
+nil : Jdec.Decoder Nil
+nil =
+    Jdec.succeed Nil
+
+encodeNil : Nil -> Jenc.Value
+encodeNil x =
+    Jenc.object
+        [
+        ]
+
+unionNO : Jdec.Decoder UnionNO
+unionNO =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNO Jdec.float
+        , Jdec.map NoInUnionNO no
+        ]
+
+encodeUnionNO : UnionNO -> Jenc.Value
+encodeUnionNO x = case x of
+    DoubleInUnionNO y -> Jenc.float y
+    NoInUnionNO y -> encodeNo y
+
+no : Jdec.Decoder No
+no =
+    Jdec.succeed No
+
+encodeNo : No -> Jenc.Value
+encodeNo x =
+    Jenc.object
+        [
+        ]
+
+unionNoexcept : Jdec.Decoder UnionNoexcept
+unionNoexcept =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNoexcept Jdec.float
+        , Jdec.map NoexceptInUnionNoexcept noexcept
+        ]
+
+encodeUnionNoexcept : UnionNoexcept -> Jenc.Value
+encodeUnionNoexcept x = case x of
+    DoubleInUnionNoexcept y -> Jenc.float y
+    NoexceptInUnionNoexcept y -> encodeNoexcept y
+
+noexcept : Jdec.Decoder Noexcept
+noexcept =
+    Jdec.succeed Noexcept
+
+encodeNoexcept : Noexcept -> Jenc.Value
+encodeNoexcept x =
+    Jenc.object
+        [
+        ]
+
+unionNonatomic : Jdec.Decoder UnionNonatomic
+unionNonatomic =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNonatomic Jdec.float
+        , Jdec.map NonatomicInUnionNonatomic nonatomic
+        ]
+
+encodeUnionNonatomic : UnionNonatomic -> Jenc.Value
+encodeUnionNonatomic x = case x of
+    DoubleInUnionNonatomic y -> Jenc.float y
+    NonatomicInUnionNonatomic y -> encodeNonatomic y
+
+nonatomic : Jdec.Decoder Nonatomic
+nonatomic =
+    Jdec.succeed Nonatomic
+
+encodeNonatomic : Nonatomic -> Jenc.Value
+encodeNonatomic x =
+    Jenc.object
+        [
+        ]
+
+unionNone : Jdec.Decoder UnionNone
+unionNone =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNone Jdec.float
+        , Jdec.map NoneInUnionNone none
+        ]
+
+encodeUnionNone : UnionNone -> Jenc.Value
+encodeUnionNone x = case x of
+    DoubleInUnionNone y -> Jenc.float y
+    NoneInUnionNone y -> encodeNone y
+
+none : Jdec.Decoder None
+none =
+    Jdec.succeed None
+
+encodeNone : None -> Jenc.Value
+encodeNone x =
+    Jenc.object
+        [
+        ]
+
+unionNonlocal : Jdec.Decoder UnionNonlocal
+unionNonlocal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNonlocal Jdec.float
+        , Jdec.map NonlocalInUnionNonlocal nonlocal
+        ]
+
+encodeUnionNonlocal : UnionNonlocal -> Jenc.Value
+encodeUnionNonlocal x = case x of
+    DoubleInUnionNonlocal y -> Jenc.float y
+    NonlocalInUnionNonlocal y -> encodeNonlocal y
+
+nonlocal : Jdec.Decoder Nonlocal
+nonlocal =
+    Jdec.succeed Nonlocal
+
+encodeNonlocal : Nonlocal -> Jenc.Value
+encodeNonlocal x =
+    Jenc.object
+        [
+        ]
+
+unionNonmutating : Jdec.Decoder UnionNonmutating
+unionNonmutating =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNonmutating Jdec.float
+        , Jdec.map NonmutatingInUnionNonmutating nonmutating
+        ]
+
+encodeUnionNonmutating : UnionNonmutating -> Jenc.Value
+encodeUnionNonmutating x = case x of
+    DoubleInUnionNonmutating y -> Jenc.float y
+    NonmutatingInUnionNonmutating y -> encodeNonmutating y
+
+nonmutating : Jdec.Decoder Nonmutating
+nonmutating =
+    Jdec.succeed Nonmutating
+
+encodeNonmutating : Nonmutating -> Jenc.Value
+encodeNonmutating x =
+    Jenc.object
+        [
+        ]
+
+unionNot : Jdec.Decoder UnionNot
+unionNot =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNot Jdec.float
+        , Jdec.map NotInUnionNot not
+        ]
+
+encodeUnionNot : UnionNot -> Jenc.Value
+encodeUnionNot x = case x of
+    DoubleInUnionNot y -> Jenc.float y
+    NotInUnionNot y -> encodeNot y
+
+not : Jdec.Decoder Not
+not =
+    Jdec.succeed Not
+
+encodeNot : Not -> Jenc.Value
+encodeNot x =
+    Jenc.object
+        [
+        ]
+
+unionNotEq : Jdec.Decoder UnionNotEq
+unionNotEq =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNotEq Jdec.float
+        , Jdec.map NotEqInUnionNotEq notEq
+        ]
+
+encodeUnionNotEq : UnionNotEq -> Jenc.Value
+encodeUnionNotEq x = case x of
+    DoubleInUnionNotEq y -> Jenc.float y
+    NotEqInUnionNotEq y -> encodeNotEq y
+
+notEq : Jdec.Decoder NotEq
+notEq =
+    Jdec.succeed NotEq
+
+encodeNotEq : NotEq -> Jenc.Value
+encodeNotEq x =
+    Jenc.object
+        [
+        ]
+
+unionNSString : Jdec.Decoder UnionNSString
+unionNSString =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNSString Jdec.float
+        , Jdec.map NSStringInUnionNSString nsString
+        ]
+
+encodeUnionNSString : UnionNSString -> Jenc.Value
+encodeUnionNSString x = case x of
+    DoubleInUnionNSString y -> Jenc.float y
+    NSStringInUnionNSString y -> encodeNSString y
+
+nsString : Jdec.Decoder NSString
+nsString =
+    Jdec.succeed NSString
+
+encodeNSString : NSString -> Jenc.Value
+encodeNSString x =
+    Jenc.object
+        [
+        ]
+
+unionNULL : Jdec.Decoder UnionNULL
+unionNULL =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNULL Jdec.float
+        , Jdec.map NullInUnionNULL null
+        ]
+
+encodeUnionNULL : UnionNULL -> Jenc.Value
+encodeUnionNULL x = case x of
+    DoubleInUnionNULL y -> Jenc.float y
+    NullInUnionNULL y -> encodeNull y
+
+null : Jdec.Decoder Null
+null =
+    Jdec.succeed Null
+
+encodeNull : Null -> Jenc.Value
+encodeNull x =
+    Jenc.object
+        [
+        ]
+
+unionNullptr : Jdec.Decoder UnionNullptr
+unionNullptr =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNullptr Jdec.float
+        , Jdec.map NullptrInUnionNullptr nullptr
+        ]
+
+encodeUnionNullptr : UnionNullptr -> Jenc.Value
+encodeUnionNullptr x = case x of
+    DoubleInUnionNullptr y -> Jenc.float y
+    NullptrInUnionNullptr y -> encodeNullptr y
+
+nullptr : Jdec.Decoder Nullptr
+nullptr =
+    Jdec.succeed Nullptr
+
+encodeNullptr : Nullptr -> Jenc.Value
+encodeNullptr x =
+    Jenc.object
+        [
+        ]
+
+unionNumber : Jdec.Decoder UnionNumber
+unionNumber =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNumber Jdec.float
+        , Jdec.map NumberInUnionNumber number
+        ]
+
+encodeUnionNumber : UnionNumber -> Jenc.Value
+encodeUnionNumber x = case x of
+    DoubleInUnionNumber y -> Jenc.float y
+    NumberInUnionNumber y -> encodeNumber y
+
+number : Jdec.Decoder Number
+number =
+    Jdec.succeed Number
+
+encodeNumber : Number -> Jenc.Value
+encodeNumber x =
+    Jenc.object
+        [
+        ]
+
+unionObject : Jdec.Decoder UnionObject
+unionObject =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionObject Jdec.float
+        , Jdec.map ObjectInUnionObject object
+        ]
+
+encodeUnionObject : UnionObject -> Jenc.Value
+encodeUnionObject x = case x of
+    DoubleInUnionObject y -> Jenc.float y
+    ObjectInUnionObject y -> encodeObject y
+
+object : Jdec.Decoder Object
+object =
+    Jdec.succeed Object
+
+encodeObject : Object -> Jenc.Value
+encodeObject x =
+    Jenc.object
+        [
+        ]
+
+unionOneway : Jdec.Decoder UnionOneway
+unionOneway =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOneway Jdec.float
+        , Jdec.map OnewayInUnionOneway oneway
+        ]
+
+encodeUnionOneway : UnionOneway -> Jenc.Value
+encodeUnionOneway x = case x of
+    DoubleInUnionOneway y -> Jenc.float y
+    OnewayInUnionOneway y -> encodeOneway y
+
+oneway : Jdec.Decoder Oneway
+oneway =
+    Jdec.succeed Oneway
+
+encodeOneway : Oneway -> Jenc.Value
+encodeOneway x =
+    Jenc.object
+        [
+        ]
+
+unionOpen : Jdec.Decoder UnionOpen
+unionOpen =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOpen Jdec.float
+        , Jdec.map OpenInUnionOpen open
+        ]
+
+encodeUnionOpen : UnionOpen -> Jenc.Value
+encodeUnionOpen x = case x of
+    DoubleInUnionOpen y -> Jenc.float y
+    OpenInUnionOpen y -> encodeOpen y
+
+open : Jdec.Decoder Open
+open =
+    Jdec.succeed Open
+
+encodeOpen : Open -> Jenc.Value
+encodeOpen x =
+    Jenc.object
+        [
+        ]
+
+unionOperator : Jdec.Decoder UnionOperator
+unionOperator =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOperator Jdec.float
+        , Jdec.map OperatorInUnionOperator operator
+        ]
+
+encodeUnionOperator : UnionOperator -> Jenc.Value
+encodeUnionOperator x = case x of
+    DoubleInUnionOperator y -> Jenc.float y
+    OperatorInUnionOperator y -> encodeOperator y
+
+operator : Jdec.Decoder Operator
+operator =
+    Jdec.succeed Operator
+
+encodeOperator : Operator -> Jenc.Value
+encodeOperator x =
+    Jenc.object
+        [
+        ]
+
+unionOptional : Jdec.Decoder UnionOptional
+unionOptional =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOptional Jdec.float
+        , Jdec.map OptionalInUnionOptional optional
+        ]
+
+encodeUnionOptional : UnionOptional -> Jenc.Value
+encodeUnionOptional x = case x of
+    DoubleInUnionOptional y -> Jenc.float y
+    OptionalInUnionOptional y -> encodeOptional y
+
+optional : Jdec.Decoder Optional
+optional =
+    Jdec.succeed Optional
+
+encodeOptional : Optional -> Jenc.Value
+encodeOptional x =
+    Jenc.object
+        [
+        ]
+
+unionOr : Jdec.Decoder UnionOr
+unionOr =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOr Jdec.float
+        , Jdec.map OrInUnionOr or
+        ]
+
+encodeUnionOr : UnionOr -> Jenc.Value
+encodeUnionOr x = case x of
+    DoubleInUnionOr y -> Jenc.float y
+    OrInUnionOr y -> encodeOr y
+
+or : Jdec.Decoder Or
+or =
+    Jdec.succeed Or
+
+encodeOr : Or -> Jenc.Value
+encodeOr x =
+    Jenc.object
+        [
+        ]
+
+unionOrEq : Jdec.Decoder UnionOrEq
+unionOrEq =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOrEq Jdec.float
+        , Jdec.map OrEqInUnionOrEq orEq
+        ]
+
+encodeUnionOrEq : UnionOrEq -> Jenc.Value
+encodeUnionOrEq x = case x of
+    DoubleInUnionOrEq y -> Jenc.float y
+    OrEqInUnionOrEq y -> encodeOrEq y
+
+orEq : Jdec.Decoder OrEq
+orEq =
+    Jdec.succeed OrEq
+
+encodeOrEq : OrEq -> Jenc.Value
+encodeOrEq x =
+    Jenc.object
+        [
+        ]
+
+unionOut : Jdec.Decoder UnionOut
+unionOut =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOut Jdec.float
+        , Jdec.map OutInUnionOut out
+        ]
+
+encodeUnionOut : UnionOut -> Jenc.Value
+encodeUnionOut x = case x of
+    DoubleInUnionOut y -> Jenc.float y
+    OutInUnionOut y -> encodeOut y
+
+out : Jdec.Decoder Out
+out =
+    Jdec.succeed Out
+
+encodeOut : Out -> Jenc.Value
+encodeOut x =
+    Jenc.object
+        [
+        ]
+
+unionOverride : Jdec.Decoder UnionOverride
+unionOverride =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOverride Jdec.float
+        , Jdec.map OverrideInUnionOverride override
+        ]
+
+encodeUnionOverride : UnionOverride -> Jenc.Value
+encodeUnionOverride x = case x of
+    DoubleInUnionOverride y -> Jenc.float y
+    OverrideInUnionOverride y -> encodeOverride y
+
+override : Jdec.Decoder Override
+override =
+    Jdec.succeed Override
+
+encodeOverride : Override -> Jenc.Value
+encodeOverride x =
+    Jenc.object
+        [
+        ]
+
+unionPackage : Jdec.Decoder UnionPackage
+unionPackage =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPackage Jdec.float
+        , Jdec.map PackageInUnionPackage package
+        ]
+
+encodeUnionPackage : UnionPackage -> Jenc.Value
+encodeUnionPackage x = case x of
+    DoubleInUnionPackage y -> Jenc.float y
+    PackageInUnionPackage y -> encodePackage y
+
+package : Jdec.Decoder Package
+package =
+    Jdec.succeed Package
+
+encodePackage : Package -> Jenc.Value
+encodePackage x =
+    Jenc.object
+        [
+        ]
+
+unionParams : Jdec.Decoder UnionParams
+unionParams =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionParams Jdec.float
+        , Jdec.map ParamsInUnionParams params
+        ]
+
+encodeUnionParams : UnionParams -> Jenc.Value
+encodeUnionParams x = case x of
+    DoubleInUnionParams y -> Jenc.float y
+    ParamsInUnionParams y -> encodeParams y
+
+params : Jdec.Decoder Params
+params =
+    Jdec.succeed Params
+
+encodeParams : Params -> Jenc.Value
+encodeParams x =
+    Jenc.object
+        [
+        ]
+
+unionPass : Jdec.Decoder UnionPass
+unionPass =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPass Jdec.float
+        , Jdec.map PassInUnionPass pass
+        ]
+
+encodeUnionPass : UnionPass -> Jenc.Value
+encodeUnionPass x = case x of
+    DoubleInUnionPass y -> Jenc.float y
+    PassInUnionPass y -> encodePass y
+
+pass : Jdec.Decoder Pass
+pass =
+    Jdec.succeed Pass
+
+encodePass : Pass -> Jenc.Value
+encodePass x =
+    Jenc.object
+        [
+        ]
+
+unionPostfix : Jdec.Decoder UnionPostfix
+unionPostfix =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPostfix Jdec.float
+        , Jdec.map PostfixInUnionPostfix postfix
+        ]
+
+encodeUnionPostfix : UnionPostfix -> Jenc.Value
+encodeUnionPostfix x = case x of
+    DoubleInUnionPostfix y -> Jenc.float y
+    PostfixInUnionPostfix y -> encodePostfix y
+
+postfix : Jdec.Decoder Postfix
+postfix =
+    Jdec.succeed Postfix
+
+encodePostfix : Postfix -> Jenc.Value
+encodePostfix x =
+    Jenc.object
+        [
+        ]
+
+unionPrecedence : Jdec.Decoder UnionPrecedence
+unionPrecedence =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPrecedence Jdec.float
+        , Jdec.map PrecedenceInUnionPrecedence precedence
+        ]
+
+encodeUnionPrecedence : UnionPrecedence -> Jenc.Value
+encodeUnionPrecedence x = case x of
+    DoubleInUnionPrecedence y -> Jenc.float y
+    PrecedenceInUnionPrecedence y -> encodePrecedence y
+
+precedence : Jdec.Decoder Precedence
+precedence =
+    Jdec.succeed Precedence
+
+encodePrecedence : Precedence -> Jenc.Value
+encodePrecedence x =
+    Jenc.object
+        [
+        ]
+
+unionPrefix : Jdec.Decoder UnionPrefix
+unionPrefix =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPrefix Jdec.float
+        , Jdec.map PrefixInUnionPrefix prefix
+        ]
+
+encodeUnionPrefix : UnionPrefix -> Jenc.Value
+encodeUnionPrefix x = case x of
+    DoubleInUnionPrefix y -> Jenc.float y
+    PrefixInUnionPrefix y -> encodePrefix y
+
+prefix : Jdec.Decoder Prefix
+prefix =
+    Jdec.succeed Prefix
+
+encodePrefix : Prefix -> Jenc.Value
+encodePrefix x =
+    Jenc.object
+        [
+        ]
+
+unionPrint : Jdec.Decoder UnionPrint
+unionPrint =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPrint Jdec.float
+        , Jdec.map PrintInUnionPrint print
+        ]
+
+encodeUnionPrint : UnionPrint -> Jenc.Value
+encodeUnionPrint x = case x of
+    DoubleInUnionPrint y -> Jenc.float y
+    PrintInUnionPrint y -> encodePrint y
+
+print : Jdec.Decoder Print
+print =
+    Jdec.succeed Print
+
+encodePrint : Print -> Jenc.Value
+encodePrint x =
+    Jenc.object
+        [
+        ]
+
+unionPrintf : Jdec.Decoder UnionPrintf
+unionPrintf =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPrintf Jdec.float
+        , Jdec.map PrintfInUnionPrintf printf
+        ]
+
+encodeUnionPrintf : UnionPrintf -> Jenc.Value
+encodeUnionPrintf x = case x of
+    DoubleInUnionPrintf y -> Jenc.float y
+    PrintfInUnionPrintf y -> encodePrintf y
+
+printf : Jdec.Decoder Printf
+printf =
+    Jdec.succeed Printf
+
+encodePrintf : Printf -> Jenc.Value
+encodePrintf x =
+    Jenc.object
+        [
+        ]
+
+unionPrivate : Jdec.Decoder UnionPrivate
+unionPrivate =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPrivate Jdec.float
+        , Jdec.map PrivateInUnionPrivate private
+        ]
+
+encodeUnionPrivate : UnionPrivate -> Jenc.Value
+encodeUnionPrivate x = case x of
+    DoubleInUnionPrivate y -> Jenc.float y
+    PrivateInUnionPrivate y -> encodePrivate y
+
+private : Jdec.Decoder Private
+private =
+    Jdec.succeed Private
+
+encodePrivate : Private -> Jenc.Value
+encodePrivate x =
+    Jenc.object
+        [
+        ]
+
+unionProtected : Jdec.Decoder UnionProtected
+unionProtected =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionProtected Jdec.float
+        , Jdec.map ProtectedInUnionProtected protected
+        ]
+
+encodeUnionProtected : UnionProtected -> Jenc.Value
+encodeUnionProtected x = case x of
+    DoubleInUnionProtected y -> Jenc.float y
+    ProtectedInUnionProtected y -> encodeProtected y
+
+protected : Jdec.Decoder Protected
+protected =
+    Jdec.succeed Protected
+
+encodeProtected : Protected -> Jenc.Value
+encodeProtected x =
+    Jenc.object
+        [
+        ]
+
+unionProtocol : Jdec.Decoder UnionProtocol
+unionProtocol =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionProtocol Jdec.float
+        , Jdec.map ProtocolInUnionProtocol protocol
+        ]
+
+encodeUnionProtocol : UnionProtocol -> Jenc.Value
+encodeUnionProtocol x = case x of
+    DoubleInUnionProtocol y -> Jenc.float y
+    ProtocolInUnionProtocol y -> encodeProtocol y
+
+protocol : Jdec.Decoder Protocol
+protocol =
+    Jdec.succeed Protocol
+
+encodeProtocol : Protocol -> Jenc.Value
+encodeProtocol x =
+    Jenc.object
+        [
+        ]
+
+unionPublic : Jdec.Decoder UnionPublic
+unionPublic =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPublic Jdec.float
+        , Jdec.map PublicInUnionPublic public
+        ]
+
+encodeUnionPublic : UnionPublic -> Jenc.Value
+encodeUnionPublic x = case x of
+    DoubleInUnionPublic y -> Jenc.float y
+    PublicInUnionPublic y -> encodePublic y
+
+public : Jdec.Decoder Public
+public =
+    Jdec.succeed Public
+
+encodePublic : Public -> Jenc.Value
+encodePublic x =
+    Jenc.object
+        [
+        ]
+
+unionBoolUnion : Jdec.Decoder UnionBoolUnion
+unionBoolUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBoolUnion Jdec.float
+        , Jdec.map UnionBoolBoolInUnionBoolUnion unionBoolBool
+        ]
+
+encodeUnionBoolUnion : UnionBoolUnion -> Jenc.Value
+encodeUnionBoolUnion x = case x of
+    DoubleInUnionBoolUnion y -> Jenc.float y
+    UnionBoolBoolInUnionBoolUnion y -> encodeUnionBoolBool y
+
+unionBoolBool : Jdec.Decoder UnionBoolBool
+unionBoolBool =
+    Jdec.succeed UnionBoolBool
+
+encodeUnionBoolBool : UnionBoolBool -> Jenc.Value
+encodeUnionBoolBool x =
+    Jenc.object
+        [
+        ]
+
+unionTypeUnion : Jdec.Decoder UnionTypeUnion
+unionTypeUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypeUnion Jdec.float
+        , Jdec.map TypeClassInUnionTypeUnion typeClass
+        ]
+
+encodeUnionTypeUnion : UnionTypeUnion -> Jenc.Value
+encodeUnionTypeUnion x = case x of
+    DoubleInUnionTypeUnion y -> Jenc.float y
+    TypeClassInUnionTypeUnion y -> encodeTypeClass y
+
+typeClass : Jdec.Decoder TypeClass
+typeClass =
+    Jdec.succeed TypeClass
+
+encodeTypeClass : TypeClass -> Jenc.Value
+encodeTypeClass x =
+    Jenc.object
+        [
+        ]
+
+unionAnyUnion : Jdec.Decoder UnionAnyUnion
+unionAnyUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAnyUnion Jdec.float
+        , Jdec.map AnyClassInUnionAnyUnion anyClass
+        ]
+
+encodeUnionAnyUnion : UnionAnyUnion -> Jenc.Value
+encodeUnionAnyUnion x = case x of
+    DoubleInUnionAnyUnion y -> Jenc.float y
+    AnyClassInUnionAnyUnion y -> encodeAnyClass y
+
+anyClass : Jdec.Decoder AnyClass
+anyClass =
+    Jdec.succeed AnyClass
+
+encodeAnyClass : AnyClass -> Jenc.Value
+encodeAnyClass x =
+    Jenc.object
+        [
+        ]
+
+unionAs : Jdec.Decoder UnionAs
+unionAs =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionAs Jdec.float
+        , Jdec.map AsInUnionAs purpleAs
+        ]
+
+encodeUnionAs : UnionAs -> Jenc.Value
+encodeUnionAs x = case x of
+    DoubleInUnionAs y -> Jenc.float y
+    AsInUnionAs y -> encodeAs y
+
+purpleAs : Jdec.Decoder As
+purpleAs =
+    Jdec.succeed As
+
+encodeAs : As -> Jenc.Value
+encodeAs x =
+    Jenc.object
+        [
+        ]
+
+unionBOOL : Jdec.Decoder UnionBOOL
+unionBOOL =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBOOL Jdec.float
+        , Jdec.map BoolInUnionBOOL purpleBool
+        ]
+
+encodeUnionBOOL : UnionBOOL -> Jenc.Value
+encodeUnionBOOL x = case x of
+    DoubleInUnionBOOL y -> Jenc.float y
+    BoolInUnionBOOL y -> encodeBool y
+
+purpleBool : Jdec.Decoder Bool
+purpleBool =
+    Jdec.succeed Bool
+
+encodeBool : Bool -> Jenc.Value
+encodeBool x =
+    Jenc.object
+        [
+        ]
+
+unionBool : Jdec.Decoder UnionBool
+unionBool =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionBool Jdec.float
+        , Jdec.map BoolClassInUnionBool boolClass
+        ]
+
+encodeUnionBool : UnionBool -> Jenc.Value
+encodeUnionBool x = case x of
+    DoubleInUnionBool y -> Jenc.float y
+    BoolClassInUnionBool y -> encodeBoolClass y
+
+boolClass : Jdec.Decoder BoolClass
+boolClass =
+    Jdec.succeed BoolClass
+
+encodeBoolClass : BoolClass -> Jenc.Value
+encodeBoolClass x =
+    Jenc.object
+        [
+        ]
+
+unionCase : Jdec.Decoder UnionCase
+unionCase =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionCase Jdec.float
+        , Jdec.map CaseInUnionCase purpleCase
+        ]
+
+encodeUnionCase : UnionCase -> Jenc.Value
+encodeUnionCase x = case x of
+    DoubleInUnionCase y -> Jenc.float y
+    CaseInUnionCase y -> encodeCase y
+
+purpleCase : Jdec.Decoder Case
+purpleCase =
+    Jdec.succeed Case
+
+encodeCase : Case -> Jenc.Value
+encodeCase x =
+    Jenc.object
+        [
+        ]
+
+unionClassUnion : Jdec.Decoder UnionClassUnion
+unionClassUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionClassUnion Jdec.float
+        , Jdec.map ClassClassInUnionClassUnion classClass
+        ]
+
+encodeUnionClassUnion : UnionClassUnion -> Jenc.Value
+encodeUnionClassUnion x = case x of
+    DoubleInUnionClassUnion y -> Jenc.float y
+    ClassClassInUnionClassUnion y -> encodeClassClass y
+
+classClass : Jdec.Decoder ClassClass
+classClass =
+    Jdec.succeed ClassClass
+
+encodeClassClass : ClassClass -> Jenc.Value
+encodeClassClass x =
+    Jenc.object
+        [
+        ]
+
+unionElse : Jdec.Decoder UnionElse
+unionElse =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionElse Jdec.float
+        , Jdec.map ElseInUnionElse purpleElse
+        ]
+
+encodeUnionElse : UnionElse -> Jenc.Value
+encodeUnionElse x = case x of
+    DoubleInUnionElse y -> Jenc.float y
+    ElseInUnionElse y -> encodeElse y
+
+purpleElse : Jdec.Decoder Else
+purpleElse =
+    Jdec.succeed Else
+
+encodeElse : Else -> Jenc.Value
+encodeElse x =
+    Jenc.object
+        [
+        ]
+
+unionExposing : Jdec.Decoder UnionExposing
+unionExposing =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionExposing Jdec.float
+        , Jdec.map ExposingInUnionExposing purpleExposing
+        ]
+
+encodeUnionExposing : UnionExposing -> Jenc.Value
+encodeUnionExposing x = case x of
+    DoubleInUnionExposing y -> Jenc.float y
+    ExposingInUnionExposing y -> encodeExposing y
+
+purpleExposing : Jdec.Decoder Exposing
+purpleExposing =
+    Jdec.succeed Exposing
+
+encodeExposing : Exposing -> Jenc.Value
+encodeExposing x =
+    Jenc.object
+        [
+        ]
+
+unionFalseUnion : Jdec.Decoder UnionFalseUnion
+unionFalseUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFalseUnion Jdec.float
+        , Jdec.map UnionFalseFalseInUnionFalseUnion unionFalseFalse
+        ]
+
+encodeUnionFalseUnion : UnionFalseUnion -> Jenc.Value
+encodeUnionFalseUnion x = case x of
+    DoubleInUnionFalseUnion y -> Jenc.float y
+    UnionFalseFalseInUnionFalseUnion y -> encodeUnionFalseFalse y
+
+unionFalseFalse : Jdec.Decoder UnionFalseFalse
+unionFalseFalse =
+    Jdec.succeed UnionFalseFalse
+
+encodeUnionFalseFalse : UnionFalseFalse -> Jenc.Value
+encodeUnionFalseFalse x =
+    Jenc.object
+        [
+        ]
+
+unionFloat : Jdec.Decoder UnionFloat
+unionFloat =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionFloat Jdec.float
+        , Jdec.map FloatClassInUnionFloat floatClass
+        ]
+
+encodeUnionFloat : UnionFloat -> Jenc.Value
+encodeUnionFloat x = case x of
+    DoubleInUnionFloat y -> Jenc.float y
+    FloatClassInUnionFloat y -> encodeFloatClass y
+
+floatClass : Jdec.Decoder FloatClass
+floatClass =
+    Jdec.succeed FloatClass
+
+encodeFloatClass : FloatClass -> Jenc.Value
+encodeFloatClass x =
+    Jenc.object
+        [
+        ]
+
+unionIf : Jdec.Decoder UnionIf
+unionIf =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIf Jdec.float
+        , Jdec.map IfInUnionIf purpleIf
+        ]
+
+encodeUnionIf : UnionIf -> Jenc.Value
+encodeUnionIf x = case x of
+    DoubleInUnionIf y -> Jenc.float y
+    IfInUnionIf y -> encodeIf y
+
+purpleIf : Jdec.Decoder If
+purpleIf =
+    Jdec.succeed If
+
+encodeIf : If -> Jenc.Value
+encodeIf x =
+    Jenc.object
+        [
+        ]
+
+unionImport : Jdec.Decoder UnionImport
+unionImport =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionImport Jdec.float
+        , Jdec.map ImportInUnionImport purpleImport
+        ]
+
+encodeUnionImport : UnionImport -> Jenc.Value
+encodeUnionImport x = case x of
+    DoubleInUnionImport y -> Jenc.float y
+    ImportInUnionImport y -> encodeImport y
+
+purpleImport : Jdec.Decoder Import
+purpleImport =
+    Jdec.succeed Import
+
+encodeImport : Import -> Jenc.Value
+encodeImport x =
+    Jenc.object
+        [
+        ]
+
+unionIn : Jdec.Decoder UnionIn
+unionIn =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionIn Jdec.float
+        , Jdec.map InInUnionIn purpleIn
+        ]
+
+encodeUnionIn : UnionIn -> Jenc.Value
+encodeUnionIn x = case x of
+    DoubleInUnionIn y -> Jenc.float y
+    InInUnionIn y -> encodeIn y
+
+purpleIn : Jdec.Decoder In
+purpleIn =
+    Jdec.succeed In
+
+encodeIn : In -> Jenc.Value
+encodeIn x =
+    Jenc.object
+        [
+        ]
+
+unionInfix : Jdec.Decoder UnionInfix
+unionInfix =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInfix Jdec.float
+        , Jdec.map InfixInUnionInfix purpleInfix
+        ]
+
+encodeUnionInfix : UnionInfix -> Jenc.Value
+encodeUnionInfix x = case x of
+    DoubleInUnionInfix y -> Jenc.float y
+    InfixInUnionInfix y -> encodeInfix y
+
+purpleInfix : Jdec.Decoder Infix
+purpleInfix =
+    Jdec.succeed Infix
+
+encodeInfix : Infix -> Jenc.Value
+encodeInfix x =
+    Jenc.object
+        [
+        ]
+
+unionInt : Jdec.Decoder UnionInt
+unionInt =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionInt Jdec.float
+        , Jdec.map IntClassInUnionInt intClass
+        ]
+
+encodeUnionInt : UnionInt -> Jenc.Value
+encodeUnionInt x = case x of
+    DoubleInUnionInt y -> Jenc.float y
+    IntClassInUnionInt y -> encodeIntClass y
+
+intClass : Jdec.Decoder IntClass
+intClass =
+    Jdec.succeed IntClass
+
+encodeIntClass : IntClass -> Jenc.Value
+encodeIntClass x =
+    Jenc.object
+        [
+        ]
+
+unionLet : Jdec.Decoder UnionLet
+unionLet =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionLet Jdec.float
+        , Jdec.map LetInUnionLet purpleLet
+        ]
+
+encodeUnionLet : UnionLet -> Jenc.Value
+encodeUnionLet x = case x of
+    DoubleInUnionLet y -> Jenc.float y
+    LetInUnionLet y -> encodeLet y
+
+purpleLet : Jdec.Decoder Let
+purpleLet =
+    Jdec.succeed Let
+
+encodeLet : Let -> Jenc.Value
+encodeLet x =
+    Jenc.object
+        [
+        ]
+
+unionModule : Jdec.Decoder UnionModule
+unionModule =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionModule Jdec.float
+        , Jdec.map ModuleInUnionModule purpleModule
+        ]
+
+encodeUnionModule : UnionModule -> Jenc.Value
+encodeUnionModule x = case x of
+    DoubleInUnionModule y -> Jenc.float y
+    ModuleInUnionModule y -> encodeModule y
+
+purpleModule : Jdec.Decoder Module
+purpleModule =
+    Jdec.succeed Module
+
+encodeModule : Module -> Jenc.Value
+encodeModule x =
+    Jenc.object
+        [
+        ]
+
+unionNoneUnion : Jdec.Decoder UnionNoneUnion
+unionNoneUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNoneUnion Jdec.float
+        , Jdec.map NoneClassInUnionNoneUnion noneClass
+        ]
+
+encodeUnionNoneUnion : UnionNoneUnion -> Jenc.Value
+encodeUnionNoneUnion x = case x of
+    DoubleInUnionNoneUnion y -> Jenc.float y
+    NoneClassInUnionNoneUnion y -> encodeNoneClass y
+
+noneClass : Jdec.Decoder NoneClass
+noneClass =
+    Jdec.succeed NoneClass
+
+encodeNoneClass : NoneClass -> Jenc.Value
+encodeNoneClass x =
+    Jenc.object
+        [
+        ]
+
+unionNull : Jdec.Decoder UnionNull
+unionNull =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionNull Jdec.float
+        , Jdec.map NullClassInUnionNull nullClass
+        ]
+
+encodeUnionNull : UnionNull -> Jenc.Value
+encodeUnionNull x = case x of
+    DoubleInUnionNull y -> Jenc.float y
+    NullClassInUnionNull y -> encodeNullClass y
+
+nullClass : Jdec.Decoder NullClass
+nullClass =
+    Jdec.succeed NullClass
+
+encodeNullClass : NullClass -> Jenc.Value
+encodeNullClass x =
+    Jenc.object
+        [
+        ]
+
+unionOf : Jdec.Decoder UnionOf
+unionOf =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionOf Jdec.float
+        , Jdec.map OfInUnionOf purpleOf
+        ]
+
+encodeUnionOf : UnionOf -> Jenc.Value
+encodeUnionOf x = case x of
+    DoubleInUnionOf y -> Jenc.float y
+    OfInUnionOf y -> encodeOf y
+
+purpleOf : Jdec.Decoder Of
+purpleOf =
+    Jdec.succeed Of
+
+encodeOf : Of -> Jenc.Value
+encodeOf x =
+    Jenc.object
+        [
+        ]
+
+unionPort : Jdec.Decoder UnionPort
+unionPort =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionPort Jdec.float
+        , Jdec.map PortInUnionPort purplePort
+        ]
+
+encodeUnionPort : UnionPort -> Jenc.Value
+encodeUnionPort x = case x of
+    DoubleInUnionPort y -> Jenc.float y
+    PortInUnionPort y -> encodePort y
+
+purplePort : Jdec.Decoder Port
+purplePort =
+    Jdec.succeed Port
+
+encodePort : Port -> Jenc.Value
+encodePort x =
+    Jenc.object
+        [
+        ]
+
+unionProtocolUnion : Jdec.Decoder UnionProtocolUnion
+unionProtocolUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionProtocolUnion Jdec.float
+        , Jdec.map ProtocolClassInUnionProtocolUnion protocolClass
+        ]
+
+encodeUnionProtocolUnion : UnionProtocolUnion -> Jenc.Value
+encodeUnionProtocolUnion x = case x of
+    DoubleInUnionProtocolUnion y -> Jenc.float y
+    ProtocolClassInUnionProtocolUnion y -> encodeProtocolClass y
+
+protocolClass : Jdec.Decoder ProtocolClass
+protocolClass =
+    Jdec.succeed ProtocolClass
+
+encodeProtocolClass : ProtocolClass -> Jenc.Value
+encodeProtocolClass x =
+    Jenc.object
+        [
+        ]
+
+unionSelfUnion : Jdec.Decoder UnionSelfUnion
+unionSelfUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSelfUnion Jdec.float
+        , Jdec.map SelfClassInUnionSelfUnion selfClass
+        ]
+
+encodeUnionSelfUnion : UnionSelfUnion -> Jenc.Value
+encodeUnionSelfUnion x = case x of
+    DoubleInUnionSelfUnion y -> Jenc.float y
+    SelfClassInUnionSelfUnion y -> encodeSelfClass y
+
+selfClass : Jdec.Decoder SelfClass
+selfClass =
+    Jdec.succeed SelfClass
+
+encodeSelfClass : SelfClass -> Jenc.Value
+encodeSelfClass x =
+    Jenc.object
+        [
+        ]
+
+unionString : Jdec.Decoder UnionString
+unionString =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionString Jdec.float
+        , Jdec.map StringClassInUnionString stringClass
+        ]
+
+encodeUnionString : UnionString -> Jenc.Value
+encodeUnionString x = case x of
+    DoubleInUnionString y -> Jenc.float y
+    StringClassInUnionString y -> encodeStringClass y
+
+stringClass : Jdec.Decoder StringClass
+stringClass =
+    Jdec.succeed StringClass
+
+encodeStringClass : StringClass -> Jenc.Value
+encodeStringClass x =
+    Jenc.object
+        [
+        ]
+
+unionThen : Jdec.Decoder UnionThen
+unionThen =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionThen Jdec.float
+        , Jdec.map ThenInUnionThen purpleThen
+        ]
+
+encodeUnionThen : UnionThen -> Jenc.Value
+encodeUnionThen x = case x of
+    DoubleInUnionThen y -> Jenc.float y
+    ThenInUnionThen y -> encodeThen y
+
+purpleThen : Jdec.Decoder Then
+purpleThen =
+    Jdec.succeed Then
+
+encodeThen : Then -> Jenc.Value
+encodeThen x =
+    Jenc.object
+        [
+        ]
+
+unionTrueUnion : Jdec.Decoder UnionTrueUnion
+unionTrueUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTrueUnion Jdec.float
+        , Jdec.map UnionTrueTrueInUnionTrueUnion unionTrueTrue
+        ]
+
+encodeUnionTrueUnion : UnionTrueUnion -> Jenc.Value
+encodeUnionTrueUnion x = case x of
+    DoubleInUnionTrueUnion y -> Jenc.float y
+    UnionTrueTrueInUnionTrueUnion y -> encodeUnionTrueTrue y
+
+unionTrueTrue : Jdec.Decoder UnionTrueTrue
+unionTrueTrue =
+    Jdec.succeed UnionTrueTrue
+
+encodeUnionTrueTrue : UnionTrueTrue -> Jenc.Value
+encodeUnionTrueTrue x =
+    Jenc.object
+        [
+        ]
+
+unionType : Jdec.Decoder UnionType
+unionType =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionType Jdec.float
+        , Jdec.map TypeInUnionType purpleType
+        ]
+
+encodeUnionType : UnionType -> Jenc.Value
+encodeUnionType x = case x of
+    DoubleInUnionType y -> Jenc.float y
+    TypeInUnionType y -> encodeType y
+
+purpleType : Jdec.Decoder Type
+purpleType =
+    Jdec.succeed Type
+
+encodeType : Type -> Jenc.Value
+encodeType x =
+    Jenc.object
+        [
+        ]
+
+unionWhere : Jdec.Decoder UnionWhere
+unionWhere =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWhere Jdec.float
+        , Jdec.map WhereInUnionWhere purpleWhere
+        ]
+
+encodeUnionWhere : UnionWhere -> Jenc.Value
+encodeUnionWhere x = case x of
+    DoubleInUnionWhere y -> Jenc.float y
+    WhereInUnionWhere y -> encodeWhere y
+
+purpleWhere : Jdec.Decoder Where
+purpleWhere =
+    Jdec.succeed Where
+
+encodeWhere : Where -> Jenc.Value
+encodeWhere x =
+    Jenc.object
+        [
+        ]
+
+unionQuicktype : Jdec.Decoder UnionQuicktype
+unionQuicktype =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionQuicktype Jdec.float
+        , Jdec.map QuicktypeInUnionQuicktype quicktype
+        ]
+
+encodeUnionQuicktype : UnionQuicktype -> Jenc.Value
+encodeUnionQuicktype x = case x of
+    DoubleInUnionQuicktype y -> Jenc.float y
+    QuicktypeInUnionQuicktype y -> encodeQuicktype y
+
+quicktype : Jdec.Decoder Quicktype
+quicktype =
+    Jdec.succeed Quicktype
+
+encodeQuicktype : Quicktype -> Jenc.Value
+encodeQuicktype x =
+    Jenc.object
+        [
+        ]
+
+unionRaise : Jdec.Decoder UnionRaise
+unionRaise =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRaise Jdec.float
+        , Jdec.map RaiseInUnionRaise raise
+        ]
+
+encodeUnionRaise : UnionRaise -> Jenc.Value
+encodeUnionRaise x = case x of
+    DoubleInUnionRaise y -> Jenc.float y
+    RaiseInUnionRaise y -> encodeRaise y
+
+raise : Jdec.Decoder Raise
+raise =
+    Jdec.succeed Raise
+
+encodeRaise : Raise -> Jenc.Value
+encodeRaise x =
+    Jenc.object
+        [
+        ]
+
+unionRange : Jdec.Decoder UnionRange
+unionRange =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRange Jdec.float
+        , Jdec.map RangeInUnionRange range
+        ]
+
+encodeUnionRange : UnionRange -> Jenc.Value
+encodeUnionRange x = case x of
+    DoubleInUnionRange y -> Jenc.float y
+    RangeInUnionRange y -> encodeRange y
+
+range : Jdec.Decoder Range
+range =
+    Jdec.succeed Range
+
+encodeRange : Range -> Jenc.Value
+encodeRange x =
+    Jenc.object
+        [
+        ]
+
+unionReadonly : Jdec.Decoder UnionReadonly
+unionReadonly =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionReadonly Jdec.float
+        , Jdec.map ReadonlyInUnionReadonly readonly
+        ]
+
+encodeUnionReadonly : UnionReadonly -> Jenc.Value
+encodeUnionReadonly x = case x of
+    DoubleInUnionReadonly y -> Jenc.float y
+    ReadonlyInUnionReadonly y -> encodeReadonly y
+
+readonly : Jdec.Decoder Readonly
+readonly =
+    Jdec.succeed Readonly
+
+encodeReadonly : Readonly -> Jenc.Value
+encodeReadonly x =
+    Jenc.object
+        [
+        ]
+
+unionRef : Jdec.Decoder UnionRef
+unionRef =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRef Jdec.float
+        , Jdec.map RefInUnionRef ref
+        ]
+
+encodeUnionRef : UnionRef -> Jenc.Value
+encodeUnionRef x = case x of
+    DoubleInUnionRef y -> Jenc.float y
+    RefInUnionRef y -> encodeRef y
+
+ref : Jdec.Decoder Ref
+ref =
+    Jdec.succeed Ref
+
+encodeRef : Ref -> Jenc.Value
+encodeRef x =
+    Jenc.object
+        [
+        ]
+
+unionRegister : Jdec.Decoder UnionRegister
+unionRegister =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRegister Jdec.float
+        , Jdec.map RegisterInUnionRegister register
+        ]
+
+encodeUnionRegister : UnionRegister -> Jenc.Value
+encodeUnionRegister x = case x of
+    DoubleInUnionRegister y -> Jenc.float y
+    RegisterInUnionRegister y -> encodeRegister y
+
+register : Jdec.Decoder Register
+register =
+    Jdec.succeed Register
+
+encodeRegister : Register -> Jenc.Value
+encodeRegister x =
+    Jenc.object
+        [
+        ]
+
+unionReinterpretCast : Jdec.Decoder UnionReinterpretCast
+unionReinterpretCast =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionReinterpretCast Jdec.float
+        , Jdec.map ReinterpretCastInUnionReinterpretCast reinterpretCast
+        ]
+
+encodeUnionReinterpretCast : UnionReinterpretCast -> Jenc.Value
+encodeUnionReinterpretCast x = case x of
+    DoubleInUnionReinterpretCast y -> Jenc.float y
+    ReinterpretCastInUnionReinterpretCast y -> encodeReinterpretCast y
+
+reinterpretCast : Jdec.Decoder ReinterpretCast
+reinterpretCast =
+    Jdec.succeed ReinterpretCast
+
+encodeReinterpretCast : ReinterpretCast -> Jenc.Value
+encodeReinterpretCast x =
+    Jenc.object
+        [
+        ]
+
+unionRepeat : Jdec.Decoder UnionRepeat
+unionRepeat =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRepeat Jdec.float
+        , Jdec.map RepeatInUnionRepeat repeat
+        ]
+
+encodeUnionRepeat : UnionRepeat -> Jenc.Value
+encodeUnionRepeat x = case x of
+    DoubleInUnionRepeat y -> Jenc.float y
+    RepeatInUnionRepeat y -> encodeRepeat y
+
+repeat : Jdec.Decoder Repeat
+repeat =
+    Jdec.succeed Repeat
+
+encodeRepeat : Repeat -> Jenc.Value
+encodeRepeat x =
+    Jenc.object
+        [
+        ]
+
+unionRequire : Jdec.Decoder UnionRequire
+unionRequire =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRequire Jdec.float
+        , Jdec.map RequireInUnionRequire require
+        ]
+
+encodeUnionRequire : UnionRequire -> Jenc.Value
+encodeUnionRequire x = case x of
+    DoubleInUnionRequire y -> Jenc.float y
+    RequireInUnionRequire y -> encodeRequire y
+
+require : Jdec.Decoder Require
+require =
+    Jdec.succeed Require
+
+encodeRequire : Require -> Jenc.Value
+encodeRequire x =
+    Jenc.object
+        [
+        ]
+
+unionRequired : Jdec.Decoder UnionRequired
+unionRequired =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRequired Jdec.float
+        , Jdec.map RequiredInUnionRequired required
+        ]
+
+encodeUnionRequired : UnionRequired -> Jenc.Value
+encodeUnionRequired x = case x of
+    DoubleInUnionRequired y -> Jenc.float y
+    RequiredInUnionRequired y -> encodeRequired y
+
+required : Jdec.Decoder Required
+required =
+    Jdec.succeed Required
+
+encodeRequired : Required -> Jenc.Value
+encodeRequired x =
+    Jenc.object
+        [
+        ]
+
+unionRequires : Jdec.Decoder UnionRequires
+unionRequires =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRequires Jdec.float
+        , Jdec.map RequiresInUnionRequires requires
+        ]
+
+encodeUnionRequires : UnionRequires -> Jenc.Value
+encodeUnionRequires x = case x of
+    DoubleInUnionRequires y -> Jenc.float y
+    RequiresInUnionRequires y -> encodeRequires y
+
+requires : Jdec.Decoder Requires
+requires =
+    Jdec.succeed Requires
+
+encodeRequires : Requires -> Jenc.Value
+encodeRequires x =
+    Jenc.object
+        [
+        ]
+
+unionRestrict : Jdec.Decoder UnionRestrict
+unionRestrict =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRestrict Jdec.float
+        , Jdec.map RestrictInUnionRestrict restrict
+        ]
+
+encodeUnionRestrict : UnionRestrict -> Jenc.Value
+encodeUnionRestrict x = case x of
+    DoubleInUnionRestrict y -> Jenc.float y
+    RestrictInUnionRestrict y -> encodeRestrict y
+
+restrict : Jdec.Decoder Restrict
+restrict =
+    Jdec.succeed Restrict
+
+encodeRestrict : Restrict -> Jenc.Value
+encodeRestrict x =
+    Jenc.object
+        [
+        ]
+
+unionRetain : Jdec.Decoder UnionRetain
+unionRetain =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRetain Jdec.float
+        , Jdec.map RetainInUnionRetain retain
+        ]
+
+encodeUnionRetain : UnionRetain -> Jenc.Value
+encodeUnionRetain x = case x of
+    DoubleInUnionRetain y -> Jenc.float y
+    RetainInUnionRetain y -> encodeRetain y
+
+retain : Jdec.Decoder Retain
+retain =
+    Jdec.succeed Retain
+
+encodeRetain : Retain -> Jenc.Value
+encodeRetain x =
+    Jenc.object
+        [
+        ]
+
+unionRethrows : Jdec.Decoder UnionRethrows
+unionRethrows =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRethrows Jdec.float
+        , Jdec.map RethrowsInUnionRethrows rethrows
+        ]
+
+encodeUnionRethrows : UnionRethrows -> Jenc.Value
+encodeUnionRethrows x = case x of
+    DoubleInUnionRethrows y -> Jenc.float y
+    RethrowsInUnionRethrows y -> encodeRethrows y
+
+rethrows : Jdec.Decoder Rethrows
+rethrows =
+    Jdec.succeed Rethrows
+
+encodeRethrows : Rethrows -> Jenc.Value
+encodeRethrows x =
+    Jenc.object
+        [
+        ]
+
+unionReturn : Jdec.Decoder UnionReturn
+unionReturn =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionReturn Jdec.float
+        , Jdec.map ReturnInUnionReturn return
+        ]
+
+encodeUnionReturn : UnionReturn -> Jenc.Value
+encodeUnionReturn x = case x of
+    DoubleInUnionReturn y -> Jenc.float y
+    ReturnInUnionReturn y -> encodeReturn y
+
+return : Jdec.Decoder Return
+return =
+    Jdec.succeed Return
+
+encodeReturn : Return -> Jenc.Value
+encodeReturn x =
+    Jenc.object
+        [
+        ]
+
+unionRight : Jdec.Decoder UnionRight
+unionRight =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionRight Jdec.float
+        , Jdec.map RightInUnionRight right
+        ]
+
+encodeUnionRight : UnionRight -> Jenc.Value
+encodeUnionRight x = case x of
+    DoubleInUnionRight y -> Jenc.float y
+    RightInUnionRight y -> encodeRight y
+
+right : Jdec.Decoder Right
+right =
+    Jdec.succeed Right
+
+encodeRight : Right -> Jenc.Value
+encodeRight x =
+    Jenc.object
+        [
+        ]
+
+unionSbyte : Jdec.Decoder UnionSbyte
+unionSbyte =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSbyte Jdec.float
+        , Jdec.map SbyteInUnionSbyte sbyte
+        ]
+
+encodeUnionSbyte : UnionSbyte -> Jenc.Value
+encodeUnionSbyte x = case x of
+    DoubleInUnionSbyte y -> Jenc.float y
+    SbyteInUnionSbyte y -> encodeSbyte y
+
+sbyte : Jdec.Decoder Sbyte
+sbyte =
+    Jdec.succeed Sbyte
+
+encodeSbyte : Sbyte -> Jenc.Value
+encodeSbyte x =
+    Jenc.object
+        [
+        ]
+
+unionSealed : Jdec.Decoder UnionSealed
+unionSealed =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSealed Jdec.float
+        , Jdec.map SealedInUnionSealed sealed
+        ]
+
+encodeUnionSealed : UnionSealed -> Jenc.Value
+encodeUnionSealed x = case x of
+    DoubleInUnionSealed y -> Jenc.float y
+    SealedInUnionSealed y -> encodeSealed y
+
+sealed : Jdec.Decoder Sealed
+sealed =
+    Jdec.succeed Sealed
+
+encodeSealed : Sealed -> Jenc.Value
+encodeSealed x =
+    Jenc.object
+        [
+        ]
+
+unionSEL : Jdec.Decoder UnionSEL
+unionSEL =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSEL Jdec.float
+        , Jdec.map SelInUnionSEL sel
+        ]
+
+encodeUnionSEL : UnionSEL -> Jenc.Value
+encodeUnionSEL x = case x of
+    DoubleInUnionSEL y -> Jenc.float y
+    SelInUnionSEL y -> encodeSel y
+
+sel : Jdec.Decoder Sel
+sel =
+    Jdec.succeed Sel
+
+encodeSel : Sel -> Jenc.Value
+encodeSel x =
+    Jenc.object
+        [
+        ]
+
+unionSelect : Jdec.Decoder UnionSelect
+unionSelect =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSelect Jdec.float
+        , Jdec.map SelectInUnionSelect select
+        ]
+
+encodeUnionSelect : UnionSelect -> Jenc.Value
+encodeUnionSelect x = case x of
+    DoubleInUnionSelect y -> Jenc.float y
+    SelectInUnionSelect y -> encodeSelect y
+
+select : Jdec.Decoder Select
+select =
+    Jdec.succeed Select
+
+encodeSelect : Select -> Jenc.Value
+encodeSelect x =
+    Jenc.object
+        [
+        ]
+
+unionSelf : Jdec.Decoder UnionSelf
+unionSelf =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSelf Jdec.float
+        , Jdec.map SelfInUnionSelf self
+        ]
+
+encodeUnionSelf : UnionSelf -> Jenc.Value
+encodeUnionSelf x = case x of
+    DoubleInUnionSelf y -> Jenc.float y
+    SelfInUnionSelf y -> encodeSelf y
+
+self : Jdec.Decoder Self
+self =
+    Jdec.succeed Self
+
+encodeSelf : Self -> Jenc.Value
+encodeSelf x =
+    Jenc.object
+        [
+        ]
+
+unionSerialize : Jdec.Decoder UnionSerialize
+unionSerialize =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSerialize Jdec.float
+        , Jdec.map SerializeInUnionSerialize serialize
+        ]
+
+encodeUnionSerialize : UnionSerialize -> Jenc.Value
+encodeUnionSerialize x = case x of
+    DoubleInUnionSerialize y -> Jenc.float y
+    SerializeInUnionSerialize y -> encodeSerialize y
+
+serialize : Jdec.Decoder Serialize
+serialize =
+    Jdec.succeed Serialize
+
+encodeSerialize : Serialize -> Jenc.Value
+encodeSerialize x =
+    Jenc.object
+        [
+        ]
+
+unionSet : Jdec.Decoder UnionSet
+unionSet =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSet Jdec.float
+        , Jdec.map SetInUnionSet set
+        ]
+
+encodeUnionSet : UnionSet -> Jenc.Value
+encodeUnionSet x = case x of
+    DoubleInUnionSet y -> Jenc.float y
+    SetInUnionSet y -> encodeSet y
+
+set : Jdec.Decoder Set
+set =
+    Jdec.succeed Set
+
+encodeSet : Set -> Jenc.Value
+encodeSet x =
+    Jenc.object
+        [
+        ]
+
+unionShort : Jdec.Decoder UnionShort
+unionShort =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionShort Jdec.float
+        , Jdec.map ShortInUnionShort short
+        ]
+
+encodeUnionShort : UnionShort -> Jenc.Value
+encodeUnionShort x = case x of
+    DoubleInUnionShort y -> Jenc.float y
+    ShortInUnionShort y -> encodeShort y
+
+short : Jdec.Decoder Short
+short =
+    Jdec.succeed Short
+
+encodeShort : Short -> Jenc.Value
+encodeShort x =
+    Jenc.object
+        [
+        ]
+
+unionSigned : Jdec.Decoder UnionSigned
+unionSigned =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSigned Jdec.float
+        , Jdec.map SignedInUnionSigned signed
+        ]
+
+encodeUnionSigned : UnionSigned -> Jenc.Value
+encodeUnionSigned x = case x of
+    DoubleInUnionSigned y -> Jenc.float y
+    SignedInUnionSigned y -> encodeSigned y
+
+signed : Jdec.Decoder Signed
+signed =
+    Jdec.succeed Signed
+
+encodeSigned : Signed -> Jenc.Value
+encodeSigned x =
+    Jenc.object
+        [
+        ]
+
+unionSizeof : Jdec.Decoder UnionSizeof
+unionSizeof =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSizeof Jdec.float
+        , Jdec.map SizeofInUnionSizeof sizeof
+        ]
+
+encodeUnionSizeof : UnionSizeof -> Jenc.Value
+encodeUnionSizeof x = case x of
+    DoubleInUnionSizeof y -> Jenc.float y
+    SizeofInUnionSizeof y -> encodeSizeof y
+
+sizeof : Jdec.Decoder Sizeof
+sizeof =
+    Jdec.succeed Sizeof
+
+encodeSizeof : Sizeof -> Jenc.Value
+encodeSizeof x =
+    Jenc.object
+        [
+        ]
+
+unionStackalloc : Jdec.Decoder UnionStackalloc
+unionStackalloc =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStackalloc Jdec.float
+        , Jdec.map StackallocInUnionStackalloc stackalloc
+        ]
+
+encodeUnionStackalloc : UnionStackalloc -> Jenc.Value
+encodeUnionStackalloc x = case x of
+    DoubleInUnionStackalloc y -> Jenc.float y
+    StackallocInUnionStackalloc y -> encodeStackalloc y
+
+stackalloc : Jdec.Decoder Stackalloc
+stackalloc =
+    Jdec.succeed Stackalloc
+
+encodeStackalloc : Stackalloc -> Jenc.Value
+encodeStackalloc x =
+    Jenc.object
+        [
+        ]
+
+unionStatic : Jdec.Decoder UnionStatic
+unionStatic =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStatic Jdec.float
+        , Jdec.map StaticInUnionStatic static
+        ]
+
+encodeUnionStatic : UnionStatic -> Jenc.Value
+encodeUnionStatic x = case x of
+    DoubleInUnionStatic y -> Jenc.float y
+    StaticInUnionStatic y -> encodeStatic y
+
+static : Jdec.Decoder Static
+static =
+    Jdec.succeed Static
+
+encodeStatic : Static -> Jenc.Value
+encodeStatic x =
+    Jenc.object
+        [
+        ]
+
+unionStaticAssert : Jdec.Decoder UnionStaticAssert
+unionStaticAssert =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStaticAssert Jdec.float
+        , Jdec.map StaticAssertInUnionStaticAssert staticAssert
+        ]
+
+encodeUnionStaticAssert : UnionStaticAssert -> Jenc.Value
+encodeUnionStaticAssert x = case x of
+    DoubleInUnionStaticAssert y -> Jenc.float y
+    StaticAssertInUnionStaticAssert y -> encodeStaticAssert y
+
+staticAssert : Jdec.Decoder StaticAssert
+staticAssert =
+    Jdec.succeed StaticAssert
+
+encodeStaticAssert : StaticAssert -> Jenc.Value
+encodeStaticAssert x =
+    Jenc.object
+        [
+        ]
+
+unionStaticCast : Jdec.Decoder UnionStaticCast
+unionStaticCast =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStaticCast Jdec.float
+        , Jdec.map StaticCastInUnionStaticCast staticCast
+        ]
+
+encodeUnionStaticCast : UnionStaticCast -> Jenc.Value
+encodeUnionStaticCast x = case x of
+    DoubleInUnionStaticCast y -> Jenc.float y
+    StaticCastInUnionStaticCast y -> encodeStaticCast y
+
+staticCast : Jdec.Decoder StaticCast
+staticCast =
+    Jdec.succeed StaticCast
+
+encodeStaticCast : StaticCast -> Jenc.Value
+encodeStaticCast x =
+    Jenc.object
+        [
+        ]
+
+unionStrictfp : Jdec.Decoder UnionStrictfp
+unionStrictfp =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStrictfp Jdec.float
+        , Jdec.map StrictfpInUnionStrictfp strictfp
+        ]
+
+encodeUnionStrictfp : UnionStrictfp -> Jenc.Value
+encodeUnionStrictfp x = case x of
+    DoubleInUnionStrictfp y -> Jenc.float y
+    StrictfpInUnionStrictfp y -> encodeStrictfp y
+
+strictfp : Jdec.Decoder Strictfp
+strictfp =
+    Jdec.succeed Strictfp
+
+encodeStrictfp : Strictfp -> Jenc.Value
+encodeStrictfp x =
+    Jenc.object
+        [
+        ]
+
+unionStruct : Jdec.Decoder UnionStruct
+unionStruct =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionStruct Jdec.float
+        , Jdec.map StructInUnionStruct struct
+        ]
+
+encodeUnionStruct : UnionStruct -> Jenc.Value
+encodeUnionStruct x = case x of
+    DoubleInUnionStruct y -> Jenc.float y
+    StructInUnionStruct y -> encodeStruct y
+
+struct : Jdec.Decoder Struct
+struct =
+    Jdec.succeed Struct
+
+encodeStruct : Struct -> Jenc.Value
+encodeStruct x =
+    Jenc.object
+        [
+        ]
+
+unionSubscript : Jdec.Decoder UnionSubscript
+unionSubscript =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSubscript Jdec.float
+        , Jdec.map SubscriptInUnionSubscript subscript
+        ]
+
+encodeUnionSubscript : UnionSubscript -> Jenc.Value
+encodeUnionSubscript x = case x of
+    DoubleInUnionSubscript y -> Jenc.float y
+    SubscriptInUnionSubscript y -> encodeSubscript y
+
+subscript : Jdec.Decoder Subscript
+subscript =
+    Jdec.succeed Subscript
+
+encodeSubscript : Subscript -> Jenc.Value
+encodeSubscript x =
+    Jenc.object
+        [
+        ]
+
+unionSuper : Jdec.Decoder UnionSuper
+unionSuper =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSuper Jdec.float
+        , Jdec.map SuperInUnionSuper super
+        ]
+
+encodeUnionSuper : UnionSuper -> Jenc.Value
+encodeUnionSuper x = case x of
+    DoubleInUnionSuper y -> Jenc.float y
+    SuperInUnionSuper y -> encodeSuper y
+
+super : Jdec.Decoder Super
+super =
+    Jdec.succeed Super
+
+encodeSuper : Super -> Jenc.Value
+encodeSuper x =
+    Jenc.object
+        [
+        ]
+
+unionSwitch : Jdec.Decoder UnionSwitch
+unionSwitch =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSwitch Jdec.float
+        , Jdec.map SwitchInUnionSwitch switch
+        ]
+
+encodeUnionSwitch : UnionSwitch -> Jenc.Value
+encodeUnionSwitch x = case x of
+    DoubleInUnionSwitch y -> Jenc.float y
+    SwitchInUnionSwitch y -> encodeSwitch y
+
+switch : Jdec.Decoder Switch
+switch =
+    Jdec.succeed Switch
+
+encodeSwitch : Switch -> Jenc.Value
+encodeSwitch x =
+    Jenc.object
+        [
+        ]
+
+unionSymbol : Jdec.Decoder UnionSymbol
+unionSymbol =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSymbol Jdec.float
+        , Jdec.map SymbolInUnionSymbol symbol
+        ]
+
+encodeUnionSymbol : UnionSymbol -> Jenc.Value
+encodeUnionSymbol x = case x of
+    DoubleInUnionSymbol y -> Jenc.float y
+    SymbolInUnionSymbol y -> encodeSymbol y
+
+symbol : Jdec.Decoder Symbol
+symbol =
+    Jdec.succeed Symbol
+
+encodeSymbol : Symbol -> Jenc.Value
+encodeSymbol x =
+    Jenc.object
+        [
+        ]
+
+unionSynchronized : Jdec.Decoder UnionSynchronized
+unionSynchronized =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSynchronized Jdec.float
+        , Jdec.map SynchronizedInUnionSynchronized synchronized
+        ]
+
+encodeUnionSynchronized : UnionSynchronized -> Jenc.Value
+encodeUnionSynchronized x = case x of
+    DoubleInUnionSynchronized y -> Jenc.float y
+    SynchronizedInUnionSynchronized y -> encodeSynchronized y
+
+synchronized : Jdec.Decoder Synchronized
+synchronized =
+    Jdec.succeed Synchronized
+
+encodeSynchronized : Synchronized -> Jenc.Value
+encodeSynchronized x =
+    Jenc.object
+        [
+        ]
+
+unionSystem : Jdec.Decoder UnionSystem
+unionSystem =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionSystem Jdec.float
+        , Jdec.map SystemInUnionSystem system
+        ]
+
+encodeUnionSystem : UnionSystem -> Jenc.Value
+encodeUnionSystem x = case x of
+    DoubleInUnionSystem y -> Jenc.float y
+    SystemInUnionSystem y -> encodeSystem y
+
+system : Jdec.Decoder System
+system =
+    Jdec.succeed System
+
+encodeSystem : System -> Jenc.Value
+encodeSystem x =
+    Jenc.object
+        [
+        ]
+
+unionTemplate : Jdec.Decoder UnionTemplate
+unionTemplate =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTemplate Jdec.float
+        , Jdec.map TemplateInUnionTemplate template
+        ]
+
+encodeUnionTemplate : UnionTemplate -> Jenc.Value
+encodeUnionTemplate x = case x of
+    DoubleInUnionTemplate y -> Jenc.float y
+    TemplateInUnionTemplate y -> encodeTemplate y
+
+template : Jdec.Decoder Template
+template =
+    Jdec.succeed Template
+
+encodeTemplate : Template -> Jenc.Value
+encodeTemplate x =
+    Jenc.object
+        [
+        ]
+
+unionThis : Jdec.Decoder UnionThis
+unionThis =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionThis Jdec.float
+        , Jdec.map ThisInUnionThis this
+        ]
+
+encodeUnionThis : UnionThis -> Jenc.Value
+encodeUnionThis x = case x of
+    DoubleInUnionThis y -> Jenc.float y
+    ThisInUnionThis y -> encodeThis y
+
+this : Jdec.Decoder This
+this =
+    Jdec.succeed This
+
+encodeThis : This -> Jenc.Value
+encodeThis x =
+    Jenc.object
+        [
+        ]
+
+unionThreadLocal : Jdec.Decoder UnionThreadLocal
+unionThreadLocal =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionThreadLocal Jdec.float
+        , Jdec.map ThreadLocalInUnionThreadLocal threadLocal
+        ]
+
+encodeUnionThreadLocal : UnionThreadLocal -> Jenc.Value
+encodeUnionThreadLocal x = case x of
+    DoubleInUnionThreadLocal y -> Jenc.float y
+    ThreadLocalInUnionThreadLocal y -> encodeThreadLocal y
+
+threadLocal : Jdec.Decoder ThreadLocal
+threadLocal =
+    Jdec.succeed ThreadLocal
+
+encodeThreadLocal : ThreadLocal -> Jenc.Value
+encodeThreadLocal x =
+    Jenc.object
+        [
+        ]
+
+unionThrow : Jdec.Decoder UnionThrow
+unionThrow =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionThrow Jdec.float
+        , Jdec.map ThrowInUnionThrow throw
+        ]
+
+encodeUnionThrow : UnionThrow -> Jenc.Value
+encodeUnionThrow x = case x of
+    DoubleInUnionThrow y -> Jenc.float y
+    ThrowInUnionThrow y -> encodeThrow y
+
+throw : Jdec.Decoder Throw
+throw =
+    Jdec.succeed Throw
+
+encodeThrow : Throw -> Jenc.Value
+encodeThrow x =
+    Jenc.object
+        [
+        ]
+
+unionThrows : Jdec.Decoder UnionThrows
+unionThrows =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionThrows Jdec.float
+        , Jdec.map ThrowsInUnionThrows throws
+        ]
+
+encodeUnionThrows : UnionThrows -> Jenc.Value
+encodeUnionThrows x = case x of
+    DoubleInUnionThrows y -> Jenc.float y
+    ThrowsInUnionThrows y -> encodeThrows y
+
+throws : Jdec.Decoder Throws
+throws =
+    Jdec.succeed Throws
+
+encodeThrows : Throws -> Jenc.Value
+encodeThrows x =
+    Jenc.object
+        [
+        ]
+
+unionToJSON : Jdec.Decoder UnionToJSON
+unionToJSON =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionToJSON Jdec.float
+        , Jdec.map ToJSONInUnionToJSON toJSON
+        ]
+
+encodeUnionToJSON : UnionToJSON -> Jenc.Value
+encodeUnionToJSON x = case x of
+    DoubleInUnionToJSON y -> Jenc.float y
+    ToJSONInUnionToJSON y -> encodeToJSON y
+
+toJSON : Jdec.Decoder ToJSON
+toJSON =
+    Jdec.succeed ToJSON
+
+encodeToJSON : ToJSON -> Jenc.Value
+encodeToJSON x =
+    Jenc.object
+        [
+        ]
+
+unionTopLevel : Jdec.Decoder UnionTopLevel
+unionTopLevel =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTopLevel Jdec.float
+        , Jdec.map TopLevelInUnionTopLevel topLevel
+        ]
+
+encodeUnionTopLevel : UnionTopLevel -> Jenc.Value
+encodeUnionTopLevel x = case x of
+    DoubleInUnionTopLevel y -> Jenc.float y
+    TopLevelInUnionTopLevel y -> encodeTopLevel y
+
+topLevel : Jdec.Decoder TopLevel
+topLevel =
+    Jdec.succeed TopLevel
+
+encodeTopLevel : TopLevel -> Jenc.Value
+encodeTopLevel x =
+    Jenc.object
+        [
+        ]
+
+unionTransient : Jdec.Decoder UnionTransient
+unionTransient =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTransient Jdec.float
+        , Jdec.map TransientInUnionTransient transient
+        ]
+
+encodeUnionTransient : UnionTransient -> Jenc.Value
+encodeUnionTransient x = case x of
+    DoubleInUnionTransient y -> Jenc.float y
+    TransientInUnionTransient y -> encodeTransient y
+
+transient : Jdec.Decoder Transient
+transient =
+    Jdec.succeed Transient
+
+encodeTransient : Transient -> Jenc.Value
+encodeTransient x =
+    Jenc.object
+        [
+        ]
+
+unionTrue : Jdec.Decoder UnionTrue
+unionTrue =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTrue Jdec.float
+        , Jdec.map TrueClassInUnionTrue trueClass
+        ]
+
+encodeUnionTrue : UnionTrue -> Jenc.Value
+encodeUnionTrue x = case x of
+    DoubleInUnionTrue y -> Jenc.float y
+    TrueClassInUnionTrue y -> encodeTrueClass y
+
+trueClass : Jdec.Decoder TrueClass
+trueClass =
+    Jdec.succeed TrueClass
+
+encodeTrueClass : TrueClass -> Jenc.Value
+encodeTrueClass x =
+    Jenc.object
+        [
+        ]
+
+unionTry : Jdec.Decoder UnionTry
+unionTry =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTry Jdec.float
+        , Jdec.map TryInUnionTry try
+        ]
+
+encodeUnionTry : UnionTry -> Jenc.Value
+encodeUnionTry x = case x of
+    DoubleInUnionTry y -> Jenc.float y
+    TryInUnionTry y -> encodeTry y
+
+try : Jdec.Decoder Try
+try =
+    Jdec.succeed Try
+
+encodeTry : Try -> Jenc.Value
+encodeTry x =
+    Jenc.object
+        [
+        ]
+
+unionTypealias : Jdec.Decoder UnionTypealias
+unionTypealias =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypealias Jdec.float
+        , Jdec.map TypealiasInUnionTypealias typealias
+        ]
+
+encodeUnionTypealias : UnionTypealias -> Jenc.Value
+encodeUnionTypealias x = case x of
+    DoubleInUnionTypealias y -> Jenc.float y
+    TypealiasInUnionTypealias y -> encodeTypealias y
+
+typealias : Jdec.Decoder Typealias
+typealias =
+    Jdec.succeed Typealias
+
+encodeTypealias : Typealias -> Jenc.Value
+encodeTypealias x =
+    Jenc.object
+        [
+        ]
+
+unionTypedef : Jdec.Decoder UnionTypedef
+unionTypedef =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypedef Jdec.float
+        , Jdec.map TypedefInUnionTypedef typedef
+        ]
+
+encodeUnionTypedef : UnionTypedef -> Jenc.Value
+encodeUnionTypedef x = case x of
+    DoubleInUnionTypedef y -> Jenc.float y
+    TypedefInUnionTypedef y -> encodeTypedef y
+
+typedef : Jdec.Decoder Typedef
+typedef =
+    Jdec.succeed Typedef
+
+encodeTypedef : Typedef -> Jenc.Value
+encodeTypedef x =
+    Jenc.object
+        [
+        ]
+
+unionTypeid : Jdec.Decoder UnionTypeid
+unionTypeid =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypeid Jdec.float
+        , Jdec.map TypeidInUnionTypeid typeid
+        ]
+
+encodeUnionTypeid : UnionTypeid -> Jenc.Value
+encodeUnionTypeid x = case x of
+    DoubleInUnionTypeid y -> Jenc.float y
+    TypeidInUnionTypeid y -> encodeTypeid y
+
+typeid : Jdec.Decoder Typeid
+typeid =
+    Jdec.succeed Typeid
+
+encodeTypeid : Typeid -> Jenc.Value
+encodeTypeid x =
+    Jenc.object
+        [
+        ]
+
+unionTypename : Jdec.Decoder UnionTypename
+unionTypename =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypename Jdec.float
+        , Jdec.map TypenameInUnionTypename typename
+        ]
+
+encodeUnionTypename : UnionTypename -> Jenc.Value
+encodeUnionTypename x = case x of
+    DoubleInUnionTypename y -> Jenc.float y
+    TypenameInUnionTypename y -> encodeTypename y
+
+typename : Jdec.Decoder Typename
+typename =
+    Jdec.succeed Typename
+
+encodeTypename : Typename -> Jenc.Value
+encodeTypename x =
+    Jenc.object
+        [
+        ]
+
+unionTypeof : Jdec.Decoder UnionTypeof
+unionTypeof =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionTypeof Jdec.float
+        , Jdec.map TypeofInUnionTypeof typeof
+        ]
+
+encodeUnionTypeof : UnionTypeof -> Jenc.Value
+encodeUnionTypeof x = case x of
+    DoubleInUnionTypeof y -> Jenc.float y
+    TypeofInUnionTypeof y -> encodeTypeof y
+
+typeof : Jdec.Decoder Typeof
+typeof =
+    Jdec.succeed Typeof
+
+encodeTypeof : Typeof -> Jenc.Value
+encodeTypeof x =
+    Jenc.object
+        [
+        ]
+
+unionUint : Jdec.Decoder UnionUint
+unionUint =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUint Jdec.float
+        , Jdec.map UintInUnionUint uint
+        ]
+
+encodeUnionUint : UnionUint -> Jenc.Value
+encodeUnionUint x = case x of
+    DoubleInUnionUint y -> Jenc.float y
+    UintInUnionUint y -> encodeUint y
+
+uint : Jdec.Decoder Uint
+uint =
+    Jdec.succeed Uint
+
+encodeUint : Uint -> Jenc.Value
+encodeUint x =
+    Jenc.object
+        [
+        ]
+
+unionUlong : Jdec.Decoder UnionUlong
+unionUlong =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUlong Jdec.float
+        , Jdec.map UlongInUnionUlong ulong
+        ]
+
+encodeUnionUlong : UnionUlong -> Jenc.Value
+encodeUnionUlong x = case x of
+    DoubleInUnionUlong y -> Jenc.float y
+    UlongInUnionUlong y -> encodeUlong y
+
+ulong : Jdec.Decoder Ulong
+ulong =
+    Jdec.succeed Ulong
+
+encodeUlong : Ulong -> Jenc.Value
+encodeUlong x =
+    Jenc.object
+        [
+        ]
+
+unionUnchecked : Jdec.Decoder UnionUnchecked
+unionUnchecked =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnchecked Jdec.float
+        , Jdec.map UncheckedInUnionUnchecked unchecked
+        ]
+
+encodeUnionUnchecked : UnionUnchecked -> Jenc.Value
+encodeUnionUnchecked x = case x of
+    DoubleInUnionUnchecked y -> Jenc.float y
+    UncheckedInUnionUnchecked y -> encodeUnchecked y
+
+unchecked : Jdec.Decoder Unchecked
+unchecked =
+    Jdec.succeed Unchecked
+
+encodeUnchecked : Unchecked -> Jenc.Value
+encodeUnchecked x =
+    Jenc.object
+        [
+        ]
+
+unionUndefined : Jdec.Decoder UnionUndefined
+unionUndefined =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUndefined Jdec.float
+        , Jdec.map UndefinedInUnionUndefined undefined
+        ]
+
+encodeUnionUndefined : UnionUndefined -> Jenc.Value
+encodeUnionUndefined x = case x of
+    DoubleInUnionUndefined y -> Jenc.float y
+    UndefinedInUnionUndefined y -> encodeUndefined y
+
+undefined : Jdec.Decoder Undefined
+undefined =
+    Jdec.succeed Undefined
+
+encodeUndefined : Undefined -> Jenc.Value
+encodeUndefined x =
+    Jenc.object
+        [
+        ]
+
+unionUnionUnion : Jdec.Decoder UnionUnionUnion
+unionUnionUnion =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnionUnion Jdec.float
+        , Jdec.map UnionInUnionUnionUnion union
+        ]
+
+encodeUnionUnionUnion : UnionUnionUnion -> Jenc.Value
+encodeUnionUnionUnion x = case x of
+    DoubleInUnionUnionUnion y -> Jenc.float y
+    UnionInUnionUnionUnion y -> encodeUnion y
+
+union : Jdec.Decoder Union
+union =
+    Jdec.succeed Union
+
+encodeUnion : Union -> Jenc.Value
+encodeUnion x =
+    Jenc.object
+        [
+        ]
+
+unionUnowned : Jdec.Decoder UnionUnowned
+unionUnowned =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnowned Jdec.float
+        , Jdec.map UnownedInUnionUnowned unowned
+        ]
+
+encodeUnionUnowned : UnionUnowned -> Jenc.Value
+encodeUnionUnowned x = case x of
+    DoubleInUnionUnowned y -> Jenc.float y
+    UnownedInUnionUnowned y -> encodeUnowned y
+
+unowned : Jdec.Decoder Unowned
+unowned =
+    Jdec.succeed Unowned
+
+encodeUnowned : Unowned -> Jenc.Value
+encodeUnowned x =
+    Jenc.object
+        [
+        ]
+
+unionUnsafe : Jdec.Decoder UnionUnsafe
+unionUnsafe =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnsafe Jdec.float
+        , Jdec.map UnsafeInUnionUnsafe unsafe
+        ]
+
+encodeUnionUnsafe : UnionUnsafe -> Jenc.Value
+encodeUnionUnsafe x = case x of
+    DoubleInUnionUnsafe y -> Jenc.float y
+    UnsafeInUnionUnsafe y -> encodeUnsafe y
+
+unsafe : Jdec.Decoder Unsafe
+unsafe =
+    Jdec.succeed Unsafe
+
+encodeUnsafe : Unsafe -> Jenc.Value
+encodeUnsafe x =
+    Jenc.object
+        [
+        ]
+
+unionUnsigned : Jdec.Decoder UnionUnsigned
+unionUnsigned =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUnsigned Jdec.float
+        , Jdec.map UnsignedInUnionUnsigned unsigned
+        ]
+
+encodeUnionUnsigned : UnionUnsigned -> Jenc.Value
+encodeUnionUnsigned x = case x of
+    DoubleInUnionUnsigned y -> Jenc.float y
+    UnsignedInUnionUnsigned y -> encodeUnsigned y
+
+unsigned : Jdec.Decoder Unsigned
+unsigned =
+    Jdec.succeed Unsigned
+
+encodeUnsigned : Unsigned -> Jenc.Value
+encodeUnsigned x =
+    Jenc.object
+        [
+        ]
+
+unionUshort : Jdec.Decoder UnionUshort
+unionUshort =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUshort Jdec.float
+        , Jdec.map UshortInUnionUshort ushort
+        ]
+
+encodeUnionUshort : UnionUshort -> Jenc.Value
+encodeUnionUshort x = case x of
+    DoubleInUnionUshort y -> Jenc.float y
+    UshortInUnionUshort y -> encodeUshort y
+
+ushort : Jdec.Decoder Ushort
+ushort =
+    Jdec.succeed Ushort
+
+encodeUshort : Ushort -> Jenc.Value
+encodeUshort x =
+    Jenc.object
+        [
+        ]
+
+unionUsing : Jdec.Decoder UnionUsing
+unionUsing =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionUsing Jdec.float
+        , Jdec.map UsingInUnionUsing using
+        ]
+
+encodeUnionUsing : UnionUsing -> Jenc.Value
+encodeUnionUsing x = case x of
+    DoubleInUnionUsing y -> Jenc.float y
+    UsingInUnionUsing y -> encodeUsing y
+
+using : Jdec.Decoder Using
+using =
+    Jdec.succeed Using
+
+encodeUsing : Using -> Jenc.Value
+encodeUsing x =
+    Jenc.object
+        [
+        ]
+
+unionVar : Jdec.Decoder UnionVar
+unionVar =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionVar Jdec.float
+        , Jdec.map VarInUnionVar var
+        ]
+
+encodeUnionVar : UnionVar -> Jenc.Value
+encodeUnionVar x = case x of
+    DoubleInUnionVar y -> Jenc.float y
+    VarInUnionVar y -> encodeVar y
+
+var : Jdec.Decoder Var
+var =
+    Jdec.succeed Var
+
+encodeVar : Var -> Jenc.Value
+encodeVar x =
+    Jenc.object
+        [
+        ]
+
+unionVirtual : Jdec.Decoder UnionVirtual
+unionVirtual =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionVirtual Jdec.float
+        , Jdec.map VirtualInUnionVirtual virtual
+        ]
+
+encodeUnionVirtual : UnionVirtual -> Jenc.Value
+encodeUnionVirtual x = case x of
+    DoubleInUnionVirtual y -> Jenc.float y
+    VirtualInUnionVirtual y -> encodeVirtual y
+
+virtual : Jdec.Decoder Virtual
+virtual =
+    Jdec.succeed Virtual
+
+encodeVirtual : Virtual -> Jenc.Value
+encodeVirtual x =
+    Jenc.object
+        [
+        ]
+
+unionVoid : Jdec.Decoder UnionVoid
+unionVoid =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionVoid Jdec.float
+        , Jdec.map VoidInUnionVoid void
+        ]
+
+encodeUnionVoid : UnionVoid -> Jenc.Value
+encodeUnionVoid x = case x of
+    DoubleInUnionVoid y -> Jenc.float y
+    VoidInUnionVoid y -> encodeVoid y
+
+void : Jdec.Decoder Void
+void =
+    Jdec.succeed Void
+
+encodeVoid : Void -> Jenc.Value
+encodeVoid x =
+    Jenc.object
+        [
+        ]
+
+unionVolatile : Jdec.Decoder UnionVolatile
+unionVolatile =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionVolatile Jdec.float
+        , Jdec.map VolatileInUnionVolatile volatile
+        ]
+
+encodeUnionVolatile : UnionVolatile -> Jenc.Value
+encodeUnionVolatile x = case x of
+    DoubleInUnionVolatile y -> Jenc.float y
+    VolatileInUnionVolatile y -> encodeVolatile y
+
+volatile : Jdec.Decoder Volatile
+volatile =
+    Jdec.succeed Volatile
+
+encodeVolatile : Volatile -> Jenc.Value
+encodeVolatile x =
+    Jenc.object
+        [
+        ]
+
+unionWcharT : Jdec.Decoder UnionWcharT
+unionWcharT =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWcharT Jdec.float
+        , Jdec.map WcharTInUnionWcharT wcharT
+        ]
+
+encodeUnionWcharT : UnionWcharT -> Jenc.Value
+encodeUnionWcharT x = case x of
+    DoubleInUnionWcharT y -> Jenc.float y
+    WcharTInUnionWcharT y -> encodeWcharT y
+
+wcharT : Jdec.Decoder WcharT
+wcharT =
+    Jdec.succeed WcharT
+
+encodeWcharT : WcharT -> Jenc.Value
+encodeWcharT x =
+    Jenc.object
+        [
+        ]
+
+unionWeak : Jdec.Decoder UnionWeak
+unionWeak =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWeak Jdec.float
+        , Jdec.map WeakInUnionWeak weak
+        ]
+
+encodeUnionWeak : UnionWeak -> Jenc.Value
+encodeUnionWeak x = case x of
+    DoubleInUnionWeak y -> Jenc.float y
+    WeakInUnionWeak y -> encodeWeak y
+
+weak : Jdec.Decoder Weak
+weak =
+    Jdec.succeed Weak
+
+encodeWeak : Weak -> Jenc.Value
+encodeWeak x =
+    Jenc.object
+        [
+        ]
+
+unionWhile : Jdec.Decoder UnionWhile
+unionWhile =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWhile Jdec.float
+        , Jdec.map WhileInUnionWhile while
+        ]
+
+encodeUnionWhile : UnionWhile -> Jenc.Value
+encodeUnionWhile x = case x of
+    DoubleInUnionWhile y -> Jenc.float y
+    WhileInUnionWhile y -> encodeWhile y
+
+while : Jdec.Decoder While
+while =
+    Jdec.succeed While
+
+encodeWhile : While -> Jenc.Value
+encodeWhile x =
+    Jenc.object
+        [
+        ]
+
+unionWillSet : Jdec.Decoder UnionWillSet
+unionWillSet =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWillSet Jdec.float
+        , Jdec.map WillSetInUnionWillSet willSet
+        ]
+
+encodeUnionWillSet : UnionWillSet -> Jenc.Value
+encodeUnionWillSet x = case x of
+    DoubleInUnionWillSet y -> Jenc.float y
+    WillSetInUnionWillSet y -> encodeWillSet y
+
+willSet : Jdec.Decoder WillSet
+willSet =
+    Jdec.succeed WillSet
+
+encodeWillSet : WillSet -> Jenc.Value
+encodeWillSet x =
+    Jenc.object
+        [
+        ]
+
+unionWith : Jdec.Decoder UnionWith
+unionWith =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionWith Jdec.float
+        , Jdec.map WithInUnionWith with
+        ]
+
+encodeUnionWith : UnionWith -> Jenc.Value
+encodeUnionWith x = case x of
+    DoubleInUnionWith y -> Jenc.float y
+    WithInUnionWith y -> encodeWith y
+
+with : Jdec.Decoder With
+with =
+    Jdec.succeed With
+
+encodeWith : With -> Jenc.Value
+encodeWith x =
+    Jenc.object
+        [
+        ]
+
+unionXor : Jdec.Decoder UnionXor
+unionXor =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionXor Jdec.float
+        , Jdec.map XorInUnionXor xor
+        ]
+
+encodeUnionXor : UnionXor -> Jenc.Value
+encodeUnionXor x = case x of
+    DoubleInUnionXor y -> Jenc.float y
+    XorInUnionXor y -> encodeXor y
+
+xor : Jdec.Decoder Xor
+xor =
+    Jdec.succeed Xor
+
+encodeXor : Xor -> Jenc.Value
+encodeXor x =
+    Jenc.object
+        [
+        ]
+
+unionXorEq : Jdec.Decoder UnionXorEq
+unionXorEq =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionXorEq Jdec.float
+        , Jdec.map XorEqInUnionXorEq xorEq
+        ]
+
+encodeUnionXorEq : UnionXorEq -> Jenc.Value
+encodeUnionXorEq x = case x of
+    DoubleInUnionXorEq y -> Jenc.float y
+    XorEqInUnionXorEq y -> encodeXorEq y
+
+xorEq : Jdec.Decoder XorEq
+xorEq =
+    Jdec.succeed XorEq
+
+encodeXorEq : XorEq -> Jenc.Value
+encodeXorEq x =
+    Jenc.object
+        [
+        ]
+
+unionYES : Jdec.Decoder UnionYES
+unionYES =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionYES Jdec.float
+        , Jdec.map YesInUnionYES yes
+        ]
+
+encodeUnionYES : UnionYES -> Jenc.Value
+encodeUnionYES x = case x of
+    DoubleInUnionYES y -> Jenc.float y
+    YesInUnionYES y -> encodeYes y
+
+yes : Jdec.Decoder Yes
+yes =
+    Jdec.succeed Yes
+
+encodeYes : Yes -> Jenc.Value
+encodeYes x =
+    Jenc.object
+        [
+        ]
+
+unionYield : Jdec.Decoder UnionYield
+unionYield =
+    Jdec.oneOf
+        [ Jdec.map DoubleInUnionYield Jdec.float
+        , Jdec.map YieldInUnionYield yield
+        ]
+
+encodeUnionYield : UnionYield -> Jenc.Value
+encodeUnionYield x = case x of
+    DoubleInUnionYield y -> Jenc.float y
+    YieldInUnionYield y -> encodeYield y
+
+yield : Jdec.Decoder Yield
+yield =
+    Jdec.succeed Yield
+
+encodeYield : Yield -> Jenc.Value
+encodeYield x =
+    Jenc.object
+        [
+        ]
+
+--- encoder helpers
+
+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
+makeNullableEncoder f m =
+    case m of
+    Just x -> f x
+    Nothing -> Jenc.null
diff --git a/base/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
index 8c5a0fb..32dda07 100644
--- a/base/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/light.schema/default/QuickType.elm
@@ -34,6 +34,12 @@ type alias LightParams =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
index d1c787a..b0f77fe 100644
--- a/base/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/min-max-items.schema/default/QuickType.elm
@@ -36,6 +36,12 @@ type UnionItem
     | StringInUnionItem String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
index 3b875d5..e55399d 100644
--- a/base/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmax-integer.schema/default/QuickType.elm
@@ -34,6 +34,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
index 1ca34e4..a937702 100644
--- a/base/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmax.schema/default/QuickType.elm
@@ -34,6 +34,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
index 725e5bd..f7d7849 100644
--- a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
@@ -39,6 +39,12 @@ type InUnion
     | StringInInUnion String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/multi-type-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/multi-type-enum.schema/default/QuickType.elm
index 46cc78e..b3ac965 100644
--- a/base/schema-elm/test/inputs/schema/multi-type-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/multi-type-enum.schema/default/QuickType.elm
@@ -40,6 +40,12 @@ type FooEnum
     | C
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/head/schema-elm/test/inputs/schema/nested-intersection-union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/nested-intersection-union.schema/default/QuickType.elm
new file mode 100644
index 0000000..1763e5a
--- /dev/null
+++ b/head/schema-elm/test/inputs/schema/nested-intersection-union.schema/default/QuickType.elm
@@ -0,0 +1,82 @@
+-- To decode the JSON data, add this file to your project, run
+--
+--     elm install NoRedInk/elm-json-decode-pipeline
+--
+-- add these imports
+--
+--     import Json.Decode exposing (decodeString)
+--     import QuickType exposing (quickType)
+--
+-- and you're off to the races with
+--
+--     decodeString quickType myJsonString
+
+module QuickType exposing
+    ( QuickType
+    , quickTypeToString
+    , quickType
+    , Item
+    )
+
+import Json.Decode as Jdec
+import Json.Decode.Pipeline as Jpipe
+import Json.Encode as Jenc
+import Dict exposing (Dict)
+
+type alias QuickType =
+    { input : List Item
+    }
+
+type alias Item =
+    { content : Maybe String
+    , id : Maybe String
+    , output : Maybe String
+    , summary : Maybe String
+    }
+
+-- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
+
+quickTypeToString : QuickType -> String
+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
+
+quickType : Jdec.Decoder QuickType
+quickType =
+    Jdec.succeed QuickType
+        |> Jpipe.required "input" (Jdec.list item)
+
+encodeQuickType : QuickType -> Jenc.Value
+encodeQuickType x =
+    Jenc.object
+        [ ("input", Jenc.list encodeItem x.input)
+        ]
+
+item : Jdec.Decoder Item
+item =
+    Jdec.succeed Item
+        |> Jpipe.custom (optionalField "content" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "id" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "output" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "summary" (Jdec.nullable Jdec.string) Nothing)
+
+encodeItem : Item -> Jenc.Value
+encodeItem x =
+    Jenc.object
+        [ ("content", makeNullableEncoder Jenc.string x.content)
+        , ("id", makeNullableEncoder Jenc.string x.id)
+        , ("output", makeNullableEncoder Jenc.string x.output)
+        , ("summary", makeNullableEncoder Jenc.string x.summary)
+        ]
+
+--- encoder helpers
+
+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
+makeNullableEncoder f m =
+    case m of
+    Just x -> f x
+    Nothing -> Jenc.null
diff --git a/base/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
index 9c4f0f3..769edb6 100644
--- a/base/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/non-standard-ref.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
index 2332f08..2d0ff8a 100644
--- a/base/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/nullable-optional-one-of.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type Kind
     | Two
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -40,7 +46,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "b" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "b" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "kind" kind
 
 encodeQuickType : QuickType -> Jenc.Value
diff --git a/base/schema-elm/test/inputs/schema/object-type-required.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/object-type-required.schema/default/QuickType.elm
index 0562367..71c2ddc 100644
--- a/base/schema-elm/test/inputs/schema/object-type-required.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/object-type-required.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -36,7 +42,7 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "foo" Jdec.string
-        |> Jpipe.optional "bar" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "bar" (Jdec.nullable Jdec.string) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
index 6d4f255..c3722f8 100644
--- a/base/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-any.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -36,7 +42,7 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "bar" Jdec.bool
-        |> Jpipe.optional "foo" (Jdec.nullable Jdec.value) Nothing
+        |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.value) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
index 12131e2..962fcce 100644
--- a/base/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-const-ref.schema/default/QuickType.elm
@@ -39,6 +39,12 @@ type alias Coordinate =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -46,13 +52,13 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "coordinates" (Jdec.nullable (Jdec.list coordinate)) Nothing
-        |> Jpipe.optional "count" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "label" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "coordinates" (Jdec.nullable (Jdec.list coordinate)) Nothing)
+        |> Jpipe.custom (optionalField "count" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "label" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "requiredCoordinates" (Jdec.list coordinate)
         |> Jpipe.required "requiredCount" Jdec.int
         |> Jpipe.required "requiredLabel" Jdec.string
-        |> Jpipe.optional "weight" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "weight" (Jdec.nullable Jdec.float) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
index 0264f3e..eb551b0 100644
--- a/base/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-constraints.schema/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -38,10 +44,10 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "optDouble" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "optInt" (Jdec.nullable Jdec.int) Nothing
-        |> Jpipe.optional "optPattern" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "optString" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "optDouble" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "optInt" (Jdec.nullable Jdec.int) Nothing)
+        |> Jpipe.custom (optionalField "optPattern" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "optString" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "reqZeroMin" Jdec.int
 
 encodeQuickType : QuickType -> Jenc.Value
diff --git a/base/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
index a6b2e76..62add1a 100644
--- a/base/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-date-time.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -39,9 +45,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "optional-date" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "optional-date-time" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "optional-time" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "optional-date" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "optional-date-time" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "optional-time" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "required-date" Jdec.string
         |> Jpipe.required "required-date-time" Jdec.string
         |> Jpipe.required "required-time" Jdec.string
diff --git a/base/schema-elm/test/inputs/schema/optional-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/optional-enum.schema/default/QuickType.elm
index 9b7d5b6..9499414 100644
--- a/base/schema-elm/test/inputs/schema/optional-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/optional-enum.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type Shortcut
     | Visible
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -41,7 +47,7 @@ quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
         |> Jpipe.required "name" Jdec.string
-        |> Jpipe.optional "shortcut" (Jdec.nullable shortcut) Nothing
+        |> Jpipe.custom (optionalField "shortcut" (Jdec.nullable shortcut) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
index d026f09..daa9a12 100644
--- a/base/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
@@ -29,6 +29,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
index bcf7c51..ea196f7 100644
--- a/base/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/prefix-items.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type Open
     | IntegerInOpen Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/ref-id-files.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/ref-id-files.schema/default/QuickType.elm
index be08b20..8cb921a 100644
--- a/base/schema-elm/test/inputs/schema/ref-id-files.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/ref-id-files.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
index ef2f9f0..bb42cc5 100644
--- a/base/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/renaming-bug.schema/default/QuickType.elm
@@ -131,6 +131,12 @@ type Name
     | Trolley
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -138,9 +144,9 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "version" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "fruits" (Jdec.nullable (Jdec.list fruit)) Nothing
-        |> Jpipe.optional "vehicles" (Jdec.nullable (Jdec.list vehicle)) Nothing
+        |> Jpipe.custom (optionalField "version" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "fruits" (Jdec.nullable (Jdec.list fruit)) Nothing)
+        |> Jpipe.custom (optionalField "vehicles" (Jdec.nullable (Jdec.list vehicle)) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
@@ -153,9 +159,9 @@ encodeQuickType x =
 fruit : Jdec.Decoder Fruit
 fruit =
     Jdec.succeed Fruit
-        |> Jpipe.optional "apple" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "berries" (Jdec.nullable (Jdec.list berry)) Nothing
-        |> Jpipe.optional "orange" (Jdec.nullable Jdec.bool) Nothing
+        |> Jpipe.custom (optionalField "apple" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "berries" (Jdec.nullable (Jdec.list berry)) Nothing)
+        |> Jpipe.custom (optionalField "orange" (Jdec.nullable Jdec.bool) Nothing)
 
 encodeFruit : Fruit -> Jenc.Value
 encodeFruit x =
@@ -168,9 +174,9 @@ encodeFruit x =
 berry : Jdec.Decoder Berry
 berry =
     Jdec.succeed Berry
-        |> Jpipe.optional "color" (Jdec.nullable color) Nothing
-        |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "shapes" (Jdec.nullable (Jdec.list shape)) Nothing
+        |> Jpipe.custom (optionalField "color" (Jdec.nullable color) Nothing)
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "shapes" (Jdec.nullable (Jdec.list shape)) Nothing)
 
 encodeBerry : Berry -> Jenc.Value
 encodeBerry x =
@@ -183,7 +189,7 @@ encodeBerry x =
 color : Jdec.Decoder Color
 color =
     Jdec.succeed Color
-        |> Jpipe.optional "rgb" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "rgb" (Jdec.nullable Jdec.float) Nothing)
 
 encodeColor : Color -> Jenc.Value
 encodeColor x =
@@ -194,8 +200,8 @@ encodeColor x =
 shape : Jdec.Decoder Shape
 shape =
     Jdec.succeed Shape
-        |> Jpipe.optional "geometry" (Jdec.nullable geometry) Nothing
-        |> Jpipe.optional "history" (Jdec.nullable history) Nothing
+        |> Jpipe.custom (optionalField "geometry" (Jdec.nullable geometry) Nothing)
+        |> Jpipe.custom (optionalField "history" (Jdec.nullable history) Nothing)
 
 encodeShape : Shape -> Jenc.Value
 encodeShape x =
@@ -207,8 +213,8 @@ encodeShape x =
 geometry : Jdec.Decoder Geometry
 geometry =
     Jdec.succeed Geometry
-        |> Jpipe.optional "rectShape" (Jdec.nullable rectShape) Nothing
-        |> Jpipe.optional "circularShape" (Jdec.nullable (Jdec.list circularShape)) Nothing
+        |> Jpipe.custom (optionalField "rectShape" (Jdec.nullable rectShape) Nothing)
+        |> Jpipe.custom (optionalField "circularShape" (Jdec.nullable (Jdec.list circularShape)) Nothing)
 
 encodeGeometry : Geometry -> Jenc.Value
 encodeGeometry x =
@@ -220,7 +226,7 @@ encodeGeometry x =
 circularShape : Jdec.Decoder CircularShape
 circularShape =
     Jdec.succeed CircularShape
-        |> Jpipe.optional "shapeName" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "shapeName" (Jdec.nullable Jdec.string) Nothing)
 
 encodeCircularShape : CircularShape -> Jenc.Value
 encodeCircularShape x =
@@ -231,7 +237,7 @@ encodeCircularShape x =
 rectShape : Jdec.Decoder RectShape
 rectShape =
     Jdec.succeed RectShape
-        |> Jpipe.optional "parts" (Jdec.nullable (Jdec.list part)) Nothing
+        |> Jpipe.custom (optionalField "parts" (Jdec.nullable (Jdec.list part)) Nothing)
 
 encodeRectShape : RectShape -> Jenc.Value
 encodeRectShape x =
@@ -242,9 +248,9 @@ encodeRectShape x =
 part : Jdec.Decoder Part
 part =
     Jdec.succeed Part
-        |> Jpipe.optional "depth" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "length" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "depth" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "length" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable Jdec.string) Nothing)
 
 encodePart : Part -> Jenc.Value
 encodePart x =
@@ -257,7 +263,7 @@ encodePart x =
 history : Jdec.Decoder History
 history =
     Jdec.succeed History
-        |> Jpipe.optional "class" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "class" (Jdec.nullable Jdec.string) Nothing)
 
 encodeHistory : History -> Jenc.Value
 encodeHistory x =
@@ -268,12 +274,12 @@ encodeHistory x =
 vehicle : Jdec.Decoder Vehicle
 vehicle =
     Jdec.succeed Vehicle
-        |> Jpipe.optional "brand" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "id" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "speed" (Jdec.nullable speed) Nothing
-        |> Jpipe.optional "subModule" (Jdec.nullable Jdec.bool) Nothing
-        |> Jpipe.optional "type" (Jdec.nullable vehicleType) Nothing
-        |> Jpipe.optional "year" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "brand" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "id" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "speed" (Jdec.nullable speed) Nothing)
+        |> Jpipe.custom (optionalField "subModule" (Jdec.nullable Jdec.bool) Nothing)
+        |> Jpipe.custom (optionalField "type" (Jdec.nullable vehicleType) Nothing)
+        |> Jpipe.custom (optionalField "year" (Jdec.nullable Jdec.string) Nothing)
 
 encodeVehicle : Vehicle -> Jenc.Value
 encodeVehicle x =
@@ -289,7 +295,7 @@ encodeVehicle x =
 speed : Jdec.Decoder Speed
 speed =
     Jdec.succeed Speed
-        |> Jpipe.optional "velocity" (Jdec.nullable limit) Nothing
+        |> Jpipe.custom (optionalField "velocity" (Jdec.nullable limit) Nothing)
 
 encodeSpeed : Speed -> Jenc.Value
 encodeSpeed x =
@@ -300,8 +306,8 @@ encodeSpeed x =
 limit : Jdec.Decoder Limit
 limit =
     Jdec.succeed Limit
-        |> Jpipe.optional "maximum" (Jdec.nullable Jdec.float) Nothing
-        |> Jpipe.optional "minimum" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "maximum" (Jdec.nullable Jdec.float) Nothing)
+        |> Jpipe.custom (optionalField "minimum" (Jdec.nullable Jdec.float) Nothing)
 
 encodeLimit : Limit -> Jenc.Value
 encodeLimit x =
@@ -313,9 +319,9 @@ encodeLimit x =
 vehicleType : Jdec.Decoder VehicleType
 vehicleType =
     Jdec.succeed VehicleType
-        |> Jpipe.optional "name" (Jdec.nullable name) Nothing
-        |> Jpipe.optional "width" (Jdec.nullable axis) Nothing
-        |> Jpipe.optional "length" (Jdec.nullable axis) Nothing
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable name) Nothing)
+        |> Jpipe.custom (optionalField "width" (Jdec.nullable axis) Nothing)
+        |> Jpipe.custom (optionalField "length" (Jdec.nullable axis) Nothing)
 
 encodeVehicleType : VehicleType -> Jenc.Value
 encodeVehicleType x =
diff --git a/base/schema-elm/test/inputs/schema/required-draft3.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/required-draft3.schema/default/QuickType.elm
index 9d454d3..76aed56 100644
--- a/base/schema-elm/test/inputs/schema/required-draft3.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/required-draft3.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/required-non-properties.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/required-non-properties.schema/default/QuickType.elm
index 3c65636..3a6a8df 100644
--- a/base/schema-elm/test/inputs/schema/required-non-properties.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/required-non-properties.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/required.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/required.schema/default/QuickType.elm
index 9d454d3..76aed56 100644
--- a/base/schema-elm/test/inputs/schema/required.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/required.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/schema-constraints.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/schema-constraints.schema/default/QuickType.elm
index 92bd284..7b53d3f 100644
--- a/base/schema-elm/test/inputs/schema/schema-constraints.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/schema-constraints.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/strict-optional.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/strict-optional.schema/default/QuickType.elm
index 9e994cb..f987752 100644
--- a/base/schema-elm/test/inputs/schema/strict-optional.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/strict-optional.schema/default/QuickType.elm
@@ -27,6 +27,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -34,7 +40,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "foo" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "foo" (Jdec.nullable Jdec.float) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
diff --git a/base/schema-elm/test/inputs/schema/top-level-array.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/top-level-array.schema/default/QuickType.elm
index 2523d2f..e74f687 100644
--- a/base/schema-elm/test/inputs/schema/top-level-array.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/top-level-array.schema/default/QuickType.elm
@@ -31,6 +31,12 @@ type alias TextClassificationOutputElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list textClassificationOutputElement
diff --git a/base/schema-elm/test/inputs/schema/top-level-enum.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/top-level-enum.schema/default/QuickType.elm
index 5600a2f..4ad94f6 100644
--- a/base/schema-elm/test/inputs/schema/top-level-enum.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/top-level-enum.schema/default/QuickType.elm
@@ -28,6 +28,12 @@ type QuickType
     | Two
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/top-level-primitive-array.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/top-level-primitive-array.schema/default/QuickType.elm
index 28d2093..9d2542f 100644
--- a/base/schema-elm/test/inputs/schema/top-level-primitive-array.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/top-level-primitive-array.schema/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = List String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list Jdec.string
diff --git a/base/schema-elm/test/inputs/schema/top-level-primitive.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/top-level-primitive.schema/default/QuickType.elm
index d531ee9..cf8eb77 100644
--- a/base/schema-elm/test/inputs/schema/top-level-primitive.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/top-level-primitive.schema/default/QuickType.elm
@@ -25,6 +25,12 @@ import Dict exposing (Dict)
 type alias QuickType = Float
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.float
diff --git a/base/schema-elm/test/inputs/schema/tuple.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/tuple.schema/default/QuickType.elm
index ea19878..8885d47 100644
--- a/base/schema-elm/test/inputs/schema/tuple.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/tuple.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type Tuple
     | IntegerInTuple Int
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/unevaluated-properties.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/unevaluated-properties.schema/default/QuickType.elm
index b434ca1..5337632 100644
--- a/base/schema-elm/test/inputs/schema/unevaluated-properties.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/unevaluated-properties.schema/default/QuickType.elm
@@ -55,6 +55,12 @@ type alias Item =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -62,7 +68,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "config" (Jdec.nullable config) Nothing
+        |> Jpipe.custom (optionalField "config" (Jdec.nullable config) Nothing)
 
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
@@ -73,9 +79,9 @@ encodeQuickType x =
 config : Jdec.Decoder Config
 config =
     Jdec.succeed Config
-        |> Jpipe.optional "closed" (Jdec.nullable closed) Nothing
-        |> Jpipe.optional "name" (Jdec.nullable Jdec.string) Nothing
-        |> Jpipe.optional "settings" (Jdec.nullable (Jdec.dict (Jdec.list item))) Nothing
+        |> Jpipe.custom (optionalField "closed" (Jdec.nullable closed) Nothing)
+        |> Jpipe.custom (optionalField "name" (Jdec.nullable Jdec.string) Nothing)
+        |> Jpipe.custom (optionalField "settings" (Jdec.nullable (Jdec.dict (Jdec.list item))) Nothing)
 
 encodeConfig : Config -> Jenc.Value
 encodeConfig x =
diff --git a/base/schema-elm/test/inputs/schema/union-int-double.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/union-int-double.schema/default/QuickType.elm
index 1706cf5..485a17a 100644
--- a/base/schema-elm/test/inputs/schema/union-int-double.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/union-int-double.schema/default/QuickType.elm
@@ -33,6 +33,12 @@ type Value
     | StringInValue String
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
diff --git a/base/schema-elm/test/inputs/schema/union.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/union.schema/default/QuickType.elm
index bc42a96..8fc8794 100644
--- a/base/schema-elm/test/inputs/schema/union.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/union.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickTypeElement =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickType : Jdec.Decoder QuickType
 quickType = Jdec.list quickTypeElement
@@ -42,9 +48,9 @@ quickTypeToString r = Jenc.encode 0 (Jenc.list encodeQuickTypeElement r)
 quickTypeElement : Jdec.Decoder QuickTypeElement
 quickTypeElement =
     Jdec.succeed QuickTypeElement
-        |> Jpipe.optional "one" (Jdec.nullable Jdec.int) Nothing
+        |> Jpipe.custom (optionalField "one" (Jdec.nullable Jdec.int) Nothing)
         |> Jpipe.required "two" Jdec.bool
-        |> Jpipe.optional "three" (Jdec.nullable Jdec.float) Nothing
+        |> Jpipe.custom (optionalField "three" (Jdec.nullable Jdec.float) Nothing)
 
 encodeQuickTypeElement : QuickTypeElement -> Jenc.Value
 encodeQuickTypeElement x =
diff --git a/base/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
index 2e9b62c..2389a1e 100644
--- a/base/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/uuid.schema/default/QuickType.elm
@@ -32,6 +32,12 @@ type alias QuickType =
     }
 
 -- decoders and encoders
+optionalField key decoder fallback =
+    Jdec.dict Jdec.value
+        |> Jdec.andThen (\m ->
+            case Dict.get key m of
+                Nothing -> Jdec.succeed fallback
+                Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
 
 quickTypeToString : QuickType -> String
 quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
@@ -39,11 +45,11 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
-        |> Jpipe.optional "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing
-        |> Jpipe.optional "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing
-        |> Jpipe.optional "nullable" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "arrNullable" (Jdec.nullable (Jdec.list (Jdec.nullable Jdec.string))) Nothing)
+        |> Jpipe.custom (optionalField "arrOne" (Jdec.nullable (Jdec.list Jdec.string)) Nothing)
+        |> Jpipe.custom (optionalField "nullable" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "one" Jdec.string
-        |> Jpipe.optional "optional" (Jdec.nullable Jdec.string) Nothing
+        |> Jpipe.custom (optionalField "optional" (Jdec.nullable Jdec.string) Nothing)
         |> Jpipe.required "unionWithEnum" Jdec.string
 
 encodeQuickType : QuickType -> Jenc.Value
