Questions tagged [jsonpath]

JSONPath is a means of using XPath-like syntax to query JSON structures. Not to be confused with rest-assured's JsonPath implementation based on Groovy's Gpath. Use the [json-path-expression] tag for questions about JSON path expressions in general and for questions about JSON path expression DSLs.

JSONPath is a means of using XPath-like syntax to query JSON structures.

It is not a standard, but it does offer a means of querying JavaScript structures directly without needing to convert to or from XML.
JSONPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination with an XML document.

Implementations:

Not to be confused with the standard of the same name by rest-assured: https://github.com/rest-assured/rest-assured/wiki/Usage#json-using-jsonpath

1786 questions
0
votes
3 answers

How can I define jsonPath for given json?

{ "name": "ninja", "contry": "India", "Account": [ { "id": "123", "orgId": 223, "investment": [ { "invetmentId": "111", "name": "India tech", "performance": [ { "id": "123", "performanceSet":…
Ninja
  • 433
  • 3
  • 10
0
votes
1 answer

Finding JSONPath value by a partial key

I have the following JSON: { "Dialog_1": { "en": { "label_1595938607000": "Label1", "newLabel": "Label2" } } } I want to extract "Label1" by using JSONPath. The problem is that each time I get a JSON with a…
Yishai S
  • 21
  • 3
0
votes
1 answer

JSONPATH - java.lang.NoSuchFieldError: defaultReader

I am trying to use Jayaway JSONPATH with my Spark RDD operations. (spark version 1.6.3) JsonPath version 2.0.0 I am getting the following stack trace when running. java.lang.NoSuchFieldError: defaultReader at…
Sam Berchmans
  • 127
  • 13
0
votes
2 answers

Check if column exists in Nested JSON

Below is my sample JSON { "_id":{ "$oid":"1564t8re13e4ter86" }, "object":{ "shop":"shop1", "domain":"Divers", "sell":[ { "location":{ …
Sam Berchmans
  • 127
  • 13
0
votes
0 answers

Filtering Bitbucket webhooks for AWS CodePipeline

I'm trying to set up JSONPath filtering on incoming Bitbucket webhooks so the pipeline will only start when a push is made to the branch the pipeline is watching. The relevant parts of the webhook request body are: { "push": { "changes": [ …
0
votes
1 answer

Parameterize my repo url by parsing webhook request body/JSONpath

I am working on a multibranch pipeline Jenkins setup and build is triggered using webhook in Git.. Here I have selected Git Branch source as - Git. When I push any change in git, webhook creates a request body with all push event details. How can I…
0
votes
1 answer

Scala - How to Split all List of List Json Nodes using json-path

I have a Json from which I want to pick List of List Json, where instance can be multiple inside List. Using json-path easily we can pick if giving index number of List/Array. But in a Big File we don't know total how many instance will be there and…
0
votes
0 answers

Extracting a value from JSON array without keys with JSONPATH

I don't know, whether it's possible at all, but here is my problem. This is a JSON containing an array without keys: { "SearchResults": { "tables": [ { "rows": [ [ "InternalExecutionError", "An…
AlexeyO
  • 44
  • 3
0
votes
1 answer

Camel unmarshall jsonpath to pojo

I'm trying to parse part of a message to a pojo so i can process it in java. The message contains json, but i only need a part of it, so i tried to use jsonpath to pick the part of the json i need, but then i can't unmarshal, i also found a method…
Bart
  • 61
  • 6
0
votes
0 answers

nifi regex failed to escape backslash "\"

Im trying to edit filename attribute with UpdateAttribute processor. I've created attribute name which is containing C:\Program Files\Filebeat\test-kafka\test_csv.csv. I would like to update filename attribute into test_csv.csv. this is what i've…
yuliansen
  • 470
  • 2
  • 14
  • 29
0
votes
2 answers

JSONPath validations in large response bodies (Gatling Scala)

I have a gatling (open source version) project that is pretty simple: it randomly picks filenames from a csv feeder, then sends the contents of the file to an endpoint and validates that it is getting 200 response codes back. The files being sent…
chrismead
  • 2,163
  • 3
  • 24
  • 36
0
votes
1 answer

Checking array item convert from jsonPath to JUnit hamcrest matcher

Hardly trying to check that json has array with two items: { "sections" : [ { "name" : "A", "description" : "aaa" }, { "name" : "B", "description" : "bbb" } ] } But only came…
nahab
  • 1,308
  • 17
  • 38
0
votes
2 answers

Is it possible to do json transformation using jsonata for api's exposed via apache camel?

Similar to camel-jolt, looking for an integration of apache camel with jsonata [https://jsonata.org/] query and transformation framework. We need to expose Rest API's using apache camel and do json transformation using json query language [jsonata…
shatk
  • 465
  • 5
  • 16
0
votes
1 answer

Extracting a single value from JSON with JSONPATH selector and mulltiple filters

This seems very much possible, but I can't get it to work. Could be my JSON or my jsonpath selector. Not sure. Here's the simple JSON showing a book inventory with the cost of 10 and 20 copies, along with which ones are On Sale: { "Books": { …
arzoum
  • 49
  • 4
0
votes
0 answers

JSONPath returns JProperty instead of JObject

I have the following JSON: { "signed": { "delegations": { "keys": { "blubb": { "keytype": "rsa-x509", "keyval": { "private": null, "public": "SomeOtherValue" } }, …
D.R.
  • 20,268
  • 21
  • 102
  • 205