News for hackers. Stuff that matters.
Re:Elm in Production: 25K Lines Later by wraithm112 on Monday July 31, 2017 @01:41PM (#14894250)
With respect to the snake-cased fields issue, it's actually not that hard to do that with Generic in Haskell.

  data Person = Person
       { personFirstName :: Text
       , personLastName  :: Text
       } deriving (Generic)

  instance ToJSON Person where
     toJSON = genericToJSON $ aesonPrefix snakeCase
  instance FromJSON Person where
     parseJSON = genericParseJSON $ aesonPrefix snakeCase
Which produces messages like:

  {
   "first_name": "John",
   "last_name": "Doe"
  }

There are no comments on this comment yet.