Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Nov 18, 2011
2 parents 2b4545c + 9d4f41d commit dfd3aa1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Data/Aeson/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ mungeField ('_':cs) = pack cs
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
Expand Down

0 comments on commit dfd3aa1

Please sign in to comment.