encodeValue (Number n)  = case floatingOrInteger n of
                            Left  d -> encodeDouble d
                            Right i -> encodeInteger i
encodeValue (Number n)  = case floatingOrInteger n of
                            Left  d -> encodeDouble d
                            Right i -> encodeInteger i
encodeValue (Number n)  = case floatingOrInteger n of
                            Left  d -> encodeDouble d
                            Right i -> encodeInteger i