@@ -134,16 +134,16 @@ let authorDecoder = (~fieldName: string, ~authors) => {
134
134
let decode = (json : JSON .t ): result <t , string > => {
135
135
open Json .Decode
136
136
switch {
137
- author : json -> field ("author" , string , _ )-> decodeAuthor (~fieldName = "author" , ~authors ),
137
+ author : json -> ( field ("author" , string , _ ) )-> decodeAuthor (~fieldName = "author" , ~authors ),
138
138
co_authors : json
139
- -> optional (field ("co-authors" , authorDecoder (~fieldName = "co-authors" , ~authors ), ... ), _ )
139
+ -> ( optional (field ("co-authors" , authorDecoder (~fieldName = "co-authors" , ~authors ), ... ), _ ) )
140
140
-> Option .getOr ([]),
141
- date : json -> field ("date" , string , _ )-> DateStr .fromString ,
142
- badge : json -> optional (j => field ("badge" , string , j )-> decodeBadge , _ )-> Null .fromOption ,
143
- previewImg : json -> optional (field ("previewImg" , string , ... ), _ )-> Null .fromOption ,
144
- articleImg : json -> optional (field ("articleImg" , string , ... ), _ )-> Null .fromOption ,
145
- title : json -> ( field ("title" , string , _ ) ),
146
- description : json -> ( nullable (field ("description" , string , ... ), _ ) ),
141
+ date : json -> ( field ("date" , string , _ ) )-> DateStr .fromString ,
142
+ badge : json -> ( optional (j => field ("badge" , string , j )-> decodeBadge , _ ) )-> Null .fromOption ,
143
+ previewImg : json -> ( optional (field ("previewImg" , string , ... ), _ ) )-> Null .fromOption ,
144
+ articleImg : json -> ( optional (field ("articleImg" , string , ... ), _ ) )-> Null .fromOption ,
145
+ title : json -> field ("title" , string , _ ),
146
+ description : json -> nullable (field ("description" , string , ... ), _ ),
147
147
} {
148
148
| fm => Ok (fm )
149
149
| exception DecodeError (str ) => Error (str )
0 commit comments