refactor: replace aeson ToJSON/FromJSON with json-fleece schemas

- RecipeSearchEntry: replace genericToJSON ToJSON with Fleece schema
  using object combinators (required, optionalNullable, list text)
- SchemaOrgRecipe: replace manual FromJSON instance with Fleece decoder
  that reuses existing helper functions for quirky fields
- Html.hs: use Fleece.Aeson.Encoder.encode instead of Data.Aeson.encode
- stack.yaml: add shrubbery + json-fleece extra-deps
- package.yaml: add json-fleece-aeson + json-fleece-core deps
- Remove unused LANGUAGE pragmas and redundant brackets
This commit is contained in:
2026-05-19 23:24:24 -04:00
parent baa3c2434f
commit 8f8dbecea5
7 changed files with 152 additions and 42 deletions
+8
View File
@@ -47,6 +47,8 @@ library
, directory
, filepath
, http-types
, json-fleece-aeson
, json-fleece-core
, optparse-applicative
, parsec
, text
@@ -79,6 +81,8 @@ executable check-recipes
, directory
, filepath
, http-types
, json-fleece-aeson
, json-fleece-core
, optparse-applicative
, parsec
, roux-server
@@ -112,6 +116,8 @@ executable roux-server
, directory
, filepath
, http-types
, json-fleece-aeson
, json-fleece-core
, optparse-applicative
, parsec
, roux-server
@@ -151,6 +157,8 @@ test-suite roux-server-test
, filepath
, hspec
, http-types
, json-fleece-aeson
, json-fleece-core
, optparse-applicative
, parsec
, roux-server