I discovered that the path $..state does not properly find "state" in the 
following:

{"values":[{"fullPath":"admin 
group","groupId":1}],"message":"","state":"adminSucceed","metaCROp":"noAction"}

Rather, one must use $.state.  Apparently the general search, $..state, 
requires a more complex object.  I do use that formulation in other, 
successful, applications of JSON Path Extraction.

Can anyone explain why the original fails?

Thanks

-steve

____________________________________________
Steve Schleimer
Technical Director | Coraid
Tel: +1 650 730-5123
[email protected]<mailto:[email protected]> | 
www.coraid.com<http://www.coraid.com>
[cid:[email protected]]
Redefining Storage

On May 25, 2013, at 12:26 PM, Steve Schleimer wrote:

(In advance, sorry for not formatting this using the standard text wrappers.  I 
do not know what they are or how to use them in an email.  That said, ...)

I am using JSON Path Assertion to sense the state of responses from  certain 
HTTP operations.  The responses to the operations are simple JSON maps.  An 
example of which is:

{"values":[{"fullPath":"admin 
group","groupId":1}],"message":"","state":"adminSucceed","metaCROp":"noAction"}

The path I use in the JSON Path Assertion to extract the interesting component 
of the message is:

$..state

The expected value is:

adminSucceed

Of course, I check "Validate against expected value".

The setup is as follows:


The operation succeeds and the test always fails.  I have made "admin succeed" 
a child of "HTTP Request" and it still fails.

Clearly, I do not understand something here.  Please illuminate.

Thanks

-steve
____________________________________________
Steve Schleimer
Technical Director | Coraid
Tel: +1 650 730-5123
[email protected]<mailto:[email protected]> | 
www.coraid.com<http://www.coraid.com/>
<0clip_image002.png>
Redefining Storage


---------------------------------------------------------------------
To unsubscribe, e-mail: 
[email protected]<mailto:[email protected]>
For additional commands, e-mail: 
[email protected]<mailto:[email protected]>

Reply via email to