Erlang : Tuple List into JSON
问题 I have a list of tuples which are http headers. I want to convert the list to a JSON object. I try mochijson2 but to no avail. So I have the following : [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"}, {'Accept-Encoding',"gzip,deflate"}, {'Accept-Language',"en-us,en;q=0.5"}, {'Cache-Control',"max-age=0"}, {'Connection',"close"}, {'Cookie',"uid=CsDbk0y1bKEzLAOzAwZUAg=="}, {'User-Agent',"Mozilla/5.0 (Macintosh; U