Hi, I found it annoying to have to copy/paste JSON response data into a Perl script to pretty-print it, so I developed a patch adding a 'Render JSON' button alongside the 'Render XML' one, which I'll attach once I've submitted this.
Sorry, I wrote this at work, and forgot I need to run the patch through Google's Open Source liaison people. Doing that now.
Created attachment 20320 [details] Patch to add pretty JSON rendering to 'Response Data' tab of 'View Results Tree' node. I've updated the documentation, but as with the previous Google contribution, the associated images will need to be updated.
Thanks. Are there any public sites that I can test it on?
You don't need a real JSON site: Just point it at a page with some JSON in it. Like... this very page once the following's been posted! :) It'll parse anything looking even vaguely like JSON, including JavaScript with some embedded. There's some example JSON at http://www.json.org/example.html but it's been pretty-printed already... here's the collapsed version: {"glossary": {"title":"example glossary","GlossDiv": {"title": "S","GlossList": {"GlossEntry": {"ID": "SGML","SortAs": "SGML","GlossTerm": "Standard Generalized Markup Language","Acronym": "SGML","Abbrev": "ISO 8879:1986","GlossDef": {"para": "A meta-markup language, used to create markup languages such as DocBook.","GlossSeeAlso": ["GML", "XML"]},"GlossSee": "markup"}}}} } Cheers.
Uh.. well, it would if the " character weren't quoted. Try this: http://geocities.com/tim_baverstock/
Thanks, applied to SVN in r545917. BTW, the patch was a bit awkward to apply, as it was not in unified diff format.
(In reply to comment #6) > Thanks, applied to SVN in r545917. Great! > BTW, the patch was a bit awkward to apply, as it was not in unified diff > format. Really? I'm sorry about that: I generated it with 'diff -u', which I thought was right. Thanks for bearing with it!
(In reply to comment #7) > (In reply to comment #6) > > BTW, the patch was a bit awkward to apply, as it was not in unified diff > > format. > Really? I'm sorry about that: I generated it with 'diff -u', which I thought was > right. Thanks for bearing with it! I see now - the patch is in unified diff, but the original file name is wrong. Or perhaps Eclipse is just being picky - I've noticed some other patches that looked OK did not get applied in their entirety. S.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1952