News for hackers. Stuff that matters.
Re:The Serde Rust Framework by dwohnitmok on Thursday October 14, 2021 @11:27PM (#28873873)
> In Haskell it's a bit more awkward, but you can kinda pull something similar off in terms of ergonomics. I've not worked with JSON in Haskell that much that I need to look for it, but I don't remember there being something as ergonomic as serde.

I think Haskell's most popular JSON library aeson is basically the same thing and probably a source of inspiration for serde.

  data MyCustomType = ... deriving (Generic, ToJSON, FromJSON)
or if you want more control you can use deriving-aeson

  -- I prefer snake case instead
  data MyCustomType = ...
    deriving Generic
    deriving (FromJSON, ToJSON)
    via CustomJSON '[FieldLabelModifier CamelToSnake]
Re:The Serde Rust Framework by spoiler on Friday October 15, 2021 @03:04AM (#28875143)
Ah, I've heard about aeson, but not used it. Thanks for pointing it out!