decodeObject :: Int -> Decoder Value
decodeObject n0 = do
    kvs <- go n0 []
    return $! Object (HashMap.fromList kvs)
  where
    go 0 acc = return acc
    go n acc = do k <- decodeString
                  v <- decodeValue
                  go (n-1) ((k, v) : acc)
decodeObject :: Int -> Decoder Value
decodeObject n0 = do
    kvs <- go n0 []
    return $! Object (HashMap.fromList kvs)
  where
    go 0 acc = return acc
    go n acc = do k <- decodeString
                  v <- decodeValue
                  go (n-1) ((k, v) : acc)
decodeObject n0 = do
    kvs <- go n0 []
    return $! Object (HashMap.fromList kvs)
  where
    go 0 acc = return acc
    go n acc = do k <- decodeString
                  v <- decodeValue
                  go (n-1) ((k, v) : acc)