Created attachment 35943 [details] screenshot For the response of a request of recipes, i found the following difference between Text response and JSON Path response: Response as Text: "seoMetadescription": "Winters toetje van warm banaan met chocolade, kaneel en slagroom.", Response as JSON Path Tester: "seoMetadescription" : "Winters toetje van warm banaan met chocolade, kaneel en slagroom.", Result[0]=Winters toetje van warm banaan met chocolade, kaneel en slagroom. Where the JSON Path response provides a faulty json, i suppose due to the comma in the value. Screenshot added
Can you describe in more detail, what you expect and what you got? I can't understand, what your exact problem is. Is it the inserted newline after the text "chocolade,"?
Correct. I would expect: Result[0]=Winters toetje van warm banaan met chocolade, kaneel en slagroom. The newline causes a faulty JSON string
Created attachment 35948 [details] Use real JSON parser to pretty print JSON This is a patch, that uses the json-smart libraray, that JMeter already includes and gets rid of the regex-parsing stuff. The formatted output differs a bit from the old one, but I don't think that this should be considered breaking our API.
+1 Thanks Felix
Thanks for the report. Will be fixed in JMeter 4.1. It would be really nice, if you could test the changes. Date: Tue May 29 19:12:30 2018 New Revision: 1832473 URL: http://svn.apache.org/viewvc?rev=1832473&view=rev Log: Don't break lines at commata when using JSON Path Tester Use JSON Parser and formatter to pretty print JSON strings. Bugzilla Id. 62397 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsJSON.java jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestRenderAsJson.java jmeter/trunk/xdocs/changes.xml
Thanks for the quick response and action to fix it :)
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4786