Use "::unknown" type casts to overcome binary protocol restrictions

Fixes #112
This commit is contained in:
Joe Nelson
2014-12-16 20:09:01 -08:00
parent 19b62c00ee
commit 9712549d64
7 changed files with 49 additions and 29 deletions
-8
View File
@@ -14,7 +14,6 @@ import Data.HashMap.Strict (keys, elems, filterWithKey, toList)
import Data.String.Conversions (cs)
import Data.List (sortBy)
import Data.Functor.Identity
import Data.Scientific (isInteger, formatScientific, FPFormat(..))
import qualified Data.Set as S
import qualified Data.ByteString.Lazy as BL
@@ -223,13 +222,6 @@ handleJsonObj reqBody handler = do
jErr = encode . object $
[("error", String "Expecting a JSON object")]
unquoted :: Value -> Text
unquoted (String t) = t
unquoted (Number n) =
cs $ formatScientific Fixed (if isInteger n then Just 0 else Nothing) n
unquoted (Bool b) = cs . show $ b
unquoted _ = ""
data TableOptions = TableOptions {
tblOptcolumns :: [Column]
, tblOptpkey :: [Text]