My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Eric Torreborre

10 likes

·

938 reads

2 comments

Arnaud Bailly
Arnaud Bailly
Dec 27, 2023

Nice article! FWIW, this is exactly how Idris2's JSON library works: Checkout JSON.Encoder in idris2-json

·
·1 reply
Eric Torreborre
Eric Torreborre
Author
·Dec 27, 2023

Great, I didn't know that! I can see that there's indeed some space for providing other Encoders with different outputs. I haven't seen it applied to a direct ByteString encoding though. I suspect that this might change the Encoder interface a bit to be closer to what is presented in my post and in aeson. Actually even with aeson I don't understand why list is not taking Series as a parameter: hackage.haskell.org/package/aeson-2.2.1.0/d...

·