You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Pavel Gouchtchine <gu...@gmail.com> on 2016/11/10 14:51:43 UTC

How to keep a json path post-processor result in the original format

Hi All,
Is there an option for the json path post-process to keep original format
for the extracted values?

A JSON response is:
{
  "recordId" : "844ecda0-a213-40b6-ad70-2cf60f9242e8",
  "purchaseOrderNumber" : 24734,
  "orderLineNumber" : 1,
  "productNumber" : 871411,
  "productDescription" : "HOODED QUILT LINED X",
  "dealerPerUnitCostAmount" : 35.46,
  "pendingQuantity" : 1,
  "onOrderQuantity" : 0,
  "standingOrderQuantity" : 0,
  "pendingCancellationQuantity" : 0,
  "corporateDueDate" : "20160908",
  "storeDueDate" : "20160907",
  "orderTransmissionDate" : "99991231",
  "storeUsageCode" : "",
  "orderHoldCode" : "",
  "allowStandingOrder" : "Y",
  "promoPriceOnly" : "N"
}

The json path is $. My goal to reuse this object in the next request.
Unfortunately the json path post-process removes all quotes:

{recordId=844ecda0-a213-40b6-ad70-2cf60f9242e8, purchaseOrderNumber=24734,
orderLineNumber=1, productNumber=871411, productDescription=HOODED QUILT
LINED X, dealerPerUnitCostAmount=35.46, pendingQuantity=1,
onOrderQuantity=0, standingOrderQuantity=0, pendingCancellationQuantity=0,
corporateDueDate=20160908, storeDueDate=20160907,
orderTransmissionDate=99991231, storeUsageCode=, orderHoldCode=,
allowStandingOrder=Y, promoPriceOnly=N}

Thank you very much.
Pavel Gouchtchine

Re: How to keep a json path post-processor result in the original format

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 10.11.2016 um 15:51 schrieb Pavel Gouchtchine:
> Hi All,
> Is there an option for the json path post-process to keep original format
> for the extracted values?
>
> A JSON response is:
> {
>    "recordId" : "844ecda0-a213-40b6-ad70-2cf60f9242e8",
>    "purchaseOrderNumber" : 24734,
>    "orderLineNumber" : 1,
>    "productNumber" : 871411,
>    "productDescription" : "HOODED QUILT LINED X",
>    "dealerPerUnitCostAmount" : 35.46,
>    "pendingQuantity" : 1,
>    "onOrderQuantity" : 0,
>    "standingOrderQuantity" : 0,
>    "pendingCancellationQuantity" : 0,
>    "corporateDueDate" : "20160908",
>    "storeDueDate" : "20160907",
>    "orderTransmissionDate" : "99991231",
>    "storeUsageCode" : "",
>    "orderHoldCode" : "",
>    "allowStandingOrder" : "Y",
>    "promoPriceOnly" : "N"
> }
>
> The json path is $. My goal to reuse this object in the next request.
> Unfortunately the json path post-process removes all quotes:
>
> {recordId=844ecda0-a213-40b6-ad70-2cf60f9242e8, purchaseOrderNumber=24734,
> orderLineNumber=1, productNumber=871411, productDescription=HOODED QUILT
> LINED X, dealerPerUnitCostAmount=35.46, pendingQuantity=1,
> onOrderQuantity=0, standingOrderQuantity=0, pendingCancellationQuantity=0,
> corporateDueDate=20160908, storeDueDate=20160907,
> orderTransmissionDate=99991231, storeUsageCode=, orderHoldCode=,
> allowStandingOrder=Y, promoPriceOnly=N}
This is fixed in current trunk. Try a current nightly, or wait a few 
days and try the the next release candidate for JMeter 3.1 (which should 
be RC3).

Regards,
  Felix
>
> Thank you very much.
> Pavel Gouchtchine
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org