scientificToDouble :: Scientific -> Double
scientificToDouble x = 
    case floatingOrInteger x of
        Left float -> float
        Right int -> fromIntegral int

------------------------------------------------------------------------
-- decode JSON object stream
scientificToDouble :: Scientific -> Double
scientificToDouble x = 
    case floatingOrInteger x of
        Left float -> float
        Right int -> fromIntegral int

------------------------------------------------------------------------
-- decode JSON object stream
scientificToDouble x = 
    case floatingOrInteger x of
        Left float -> float
        Right int -> fromIntegral int

------------------------------------------------------------------------
-- decode JSON object stream