Would ayone know how to convert
tt :: (Int, [(Int, String)])
tt = (777, [(1, "AA") , (2, "BB") , (3, "CC")])
to JSON similar to
{
"user": 777,
"data": [
{ "num": 1 , "typ": "AA" },
{ "num": 2 , "typ": "BB" },
{ "num": 3 , "typ": "CC" }
]
}
using (preferably) Aeson ?