migamake / json-autotype

Automatic Haskell type inference from JSON input
149 stars 23 forks source link

support Double values #8

Closed ma1ko closed 8 years ago

ma1ko commented 8 years ago

The following JSON

{
"test" : 1.1
}

will generate this structure:

data TopLevel = TopLevel { 
    topLevelTest :: Int
  } deriving (Show,Eq,Generic)

The Double value will be silently round down to Int.