{"action":"created","issue":{"url":"https://api.github.com/repos/grke/burp/issues/285","labels_url":"https://api.github.com/repos/grke/burp/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/grke/burp/issues/285/comments","events_url":"https://api.github.com/repos/grke/burp/issues/285/events","html_url":"https://github.com/grke/burp/issues/285","id":73971294,"number":285,"title":"Un-prettify the json output for Burp-UI","user":{"login":"ziirish","id":449711,"avatar_url":"https://avatars.githubusercontent.com/u/449711?v=3","gravatar_id":"","url":"https://api.github.com/users/ziirish","html_url":"https://github.com/ziirish","followers_url":"https://api.github.com/users/ziirish/followers","following_url":"https://api.github.com/users/ziirish/following{/other_user}","gists_url":"https://api.github.com/users/ziirish/gists{/gist_id}","starred_url":"https://api.github.com/users/ziirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziirish/subscriptions","organizations_url":"https://api.github.com/users/ziirish/orgs","repos_url":"https://api.github.com/users/ziirish/repos","events_url":"https://api.github.com/users/ziirish/events{/privacy}","received_events_url":"https://api.github.com/users/ziirish/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-07T12:35:12Z","updated_at":"2015-05-08T10:50:20Z","closed_at":"2015-05-08T10:50:20Z","body":"Because of the way Burp-UI parses the output of the client monitor mode, it would be nice not to have a pretty json output and have it all on the same line. That will make the output more predictable and will greatly improve performances.\r\n\r\nThis patch is a good start:\r\n\r\n```\r\n--- a/src/server/monitor/json_output.c\r\n+++ b/src/server/monitor/json_output.c\r\n@@ -20,6 +20,8 @@ static int write_all(struct asfd *asfd)\r\n                buf+=w;\r\n                len-=w;\r\n        }\r\n+       if(!ret) ret=asfd->write_strn(asfd, CMD_GEN /* not used */, \"\\n\", 1);\r\n+\r\n        yajl_gen_clear(yajl);\r\n        return ret;\r\n }\r\n@@ -30,7 +32,7 @@ static int json_start(struct asfd *asfd)\r\n        {\r\n                if(!(yajl=yajl_gen_alloc(NULL)))\r\n                        return -1;\r\n-               yajl_gen_config(yajl, yajl_gen_beautify, 1);\r\n+               yajl_gen_config(yajl, yajl_gen_beautify, 0);\r\n        }\r\n        if(yajl_map_open_w()) return -1;\r\n        return 0;\r\n```"},"comment":{"url":"https://api.github.com/repos/grke/burp/issues/comments/100190943","html_url":"https://github.com/grke/burp/issues/285#issuecomment-100190943","issue_url":"https://api.github.com/repos/grke/burp/issues/285","id":100190943,"user":{"login":"grke","id":695039,"avatar_url":"https://avatars.githubusercontent.com/u/695039?v=3","gravatar_id":"","url":"https://api.github.com/users/grke","html_url":"https://github.com/grke","followers_url":"https://api.github.com/users/grke/followers","following_url":"https://api.github.com/users/grke/following{/other_user}","gists_url":"https://api.github.com/users/grke/gists{/gist_id}","starred_url":"https://api.github.com/users/grke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grke/subscriptions","organizations_url":"https://api.github.com/users/grke/orgs","repos_url":"https://api.github.com/users/grke/repos","events_url":"https://api.github.com/users/grke/events{/privacy}","received_events_url":"https://api.github.com/users/grke/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T10:50:20Z","updated_at":"2015-05-08T10:50:20Z","body":"Done in 2.0.19.\r\nYou can send the monitor this:\r\nj:pretty-print-off\r\nor\r\nj:pretty-print-on\r\nBy default, it is on."}}