You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2018/05/22 12:22:40 UTC

[Bug 62397] New: JSON Path tester and comma in response interpretation

https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

            Bug ID: 62397
           Summary: JSON Path tester and comma in response interpretation
           Product: JMeter
           Version: 4.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: lars.vogelaar@onior.com
  Target Milestone: ---

Created attachment 35943
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35943&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

--- Comment #6 from lars.vogelaar@onior.com ---
Thanks for the quick response and action to fix it :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

--- Comment #2 from lars.vogelaar@onior.com ---
Correct. I would expect:

Result[0]=Winters toetje van warm banaan met chocolade, kaneel en slagroom.

The newline causes a faulty JSON string

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
+1
Thanks Felix

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |JMETER_4.1

--- Comment #5 from Felix Schumacher <fe...@internetallee.de> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
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,"?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 62397] JSON Path tester and comma in response interpretation

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62397

--- Comment #3 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 35948
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35948&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.