Layer7 API Management

Policy Repository: JSON path expression samples 

Aug 29, 2018 09:22 AM

A few examples of JSON Path expressions, includes:

 

  • Slice (start/end) operator
  • Subscript (fixed/expression) operator.
  • Match operator
  • Equality operator
  • Less than or equal operator
  • Greater than or equal operator
  • Not equal operator

 

The policy sets the source JSON in a variable named msg and uses the Evaluate JSON Path Expression Assertion.

 

To use:

 

1) Open policy manager and create a test service

2) Download the attached file and import the XML file into your new service

3) Hit the endpoint via your desired user agent (i.e: browse, SOAPUI, etc).

 

9 items are returned showing the results of their respective operators.

Statistics
0 Favorited
9 Views
1 Files
0 Shares
4 Downloads
Attachment(s)
zip file
JSONPathExpressions.xml.zip   1 KB   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.