json serializer in haskell