[Haskell-cafe] ANN: text-json-qq - json quasiquatation

Oscar Finnsson oscar.finnsson at gmail.com
Fri Jun 18 19:36:29 EDT 2010


Hi,

I've just uploaded the first version of text-json-qq
(http://hackage.haskell.org/package/text-json-qq).

It's a quasiquatation library converting json into Haskell (Text.JSON).

You can use it like:

> user = [$jsonQQ| {name: "Pelle", age: 34.3, likes: ["mac", "Haskell"] } |]

or you can use Haskell variables with the <<x>>-syntax like:

> user = [$jsonQQ| {name: <<name>>, age: <<age>>} |]
> name = "Pelle"
> age = 34 :: Integer

It seems to have some performance problems at the moment so I guess
I'll have to learn how to profile my code.

-- Oscar


More information about the Haskell-Cafe mailing list