aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/app/Schema.hs
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/Schema.hs')
-rw-r--r--frontend/app/Schema.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend/app/Schema.hs b/frontend/app/Schema.hs
index 8e49d47..c15e1d1 100644
--- a/frontend/app/Schema.hs
+++ b/frontend/app/Schema.hs
@@ -9,6 +9,9 @@ module Schema
)
where
+#ifdef ghcjs_HOST_OS
+import Data.Text qualified as T
+#endif
import Control.Applicative ((<|>))
import Data.Aeson qualified as A
import Data.Aeson.Key qualified as AK
@@ -42,6 +45,11 @@ instance A.FromJSON Schema where
<*> v A..: "title"
<*> v A..: "type"
+#ifdef ghcjs_HOST_OS
+instance A.FromJSONKey MisoString where
+ parseJSON = fromMisoString @T.Text <$> parseJSON
+#endif
+
data Property
= Type MisoString
| Reference MisoString