Commits

Bryan O'Sullivan committed f04aacd Merge

Merge

  • Participants
  • Parent commits 8625b65, 13582f2

Comments (0)

Files changed (1)

Data/Aeson/Generic.hs

 mungeField cs       = pack cs
 
 
+-- Skip leading '_' in field name so we can use keywords
+-- etc. as field names.
+mungeField :: String -> Text
+mungeField ('_':cs) = pack cs
+mungeField cs       = pack cs
+
+
 toJSON_generic :: (Data a) => a -> Value
 toJSON_generic = generic
   where