Questions tagged [jpath]

JSONPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination with an XML document. Since a JSON structure is usually anonymous and doesn't necessarily have a "root member object" JSONPath assumes the abstract name $ assigned to the outer level object. JSONPath expressions can use the dot–notation $.store.book[0].title or the bracket–notation $['store']['book'][0]['title']

19 questions
34
votes
1 answer

JSON.NET JObject - how do I get value from this nested JSON structure

I have this JSON: { "client_id": "26075235", "client_version": "1.0.0", "event": "app.uninstall", "timestamp": 1478741247, "data": { "user_id": "62581379", "site_id": "837771289247593785", …
Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206
8
votes
1 answer

Is JPath the same as JSONPath in JSON.NET?

Although the names look similar, small changes could be tricky. Unfortunately I cannot find decent info about JPath. The docs of JSON.NET are talking about JPath and JSONPath and I think there are the same. Am I correct? A String that contains a…
Julian
  • 33,915
  • 22
  • 119
  • 174
3
votes
0 answers

Does Json.net support more complicated wildcard searches with SelectTokens()?

I know that I can do a wildcard search like this: jObject.SelectTokens("items.*.name"); I build the search path at runtime, its not hardcoded. In certain cases, I need to do a search for something a bit more complex like "q*", so that would result…
SledgeHammer
  • 7,338
  • 6
  • 41
  • 86
3
votes
0 answers

Json Path Expression to Convert array to string

I was trying to find a way to convert the json array to json string. http://jsonpath.com/ JSON { "firstName": "John", "lastName" : "doe", "age" : 26, "address" : { "streetAddress": "naist street", "city" : "Nara", …
devanathan
  • 768
  • 3
  • 10
  • 39
2
votes
0 answers

Fetching an Array inside JsonArray for JSON PATH

My JsonBody is { "acr_values":[ "AAL1", "AAL2" ], "poc":[ { "attribute1":"value1" }, { "attribute1":"value2" } ] } I'm trying to fetch the attribute acr_values as Array,…
krishviews
  • 31
  • 2
1
vote
1 answer

What is jpath for {"Type":"Ping"} in Json.Net?

I have a simple string from webSockets. And i stuck on jPath for SelectTokens() method. Is there any path which can help me grab $.Type only if it is equal to 'Ping'? var str= @"{""Type"":""Ping""}"; var token =…
Trinitron
  • 374
  • 3
  • 12
1
vote
1 answer

JSON Path - How to find the root elements based on child elements?

I have a JSON object, and I'm trying to find the root elements under it. Can someone please help me to figure this out? { "store" : { "10162021" : { "id" : 812340, "properties" : { "server" :…
rshdzrt
  • 125
  • 7
1
vote
1 answer

I need to get the primitive data type from json path using in-definite path

Given this document: { "slide": [{ "title": { "fontName": "Open Sans", "top": 188, "left": -22, "width": 597, "fontSize": 45, "valign": "bottom", …
Santhosh Tpixler
  • 361
  • 4
  • 12
0
votes
0 answers

Multiple jpath to Query

I predefined my data source. I want to specify multiple paths in one query. For example Here is my datasource ; const Jforce_DataSource = { Name: 'Jforce', ConnectionProperties: { DataProvider: 'JSON', ConnectString:…
user
  • 1
  • 3
0
votes
1 answer

Find all objects that contain a property with a given key using JPath

Is it possible to (and if so how do I) recursively get a list of all objects within an object that contains a property with a given key or a given key in a set of keys using JPath? Example For this object searching for the type property: [ { …
SacredGeometry
  • 863
  • 4
  • 13
  • 24
0
votes
0 answers

JPath for filtering properties not working

I'm new at JSONPath so I though maybe you could help me. I've got the following JSON: { "records":[ { "id":"recGyk2cLCzWoCFLj", "fields":{ "Etapa":0, "Enviado por":"EFG", …
0
votes
1 answer

Get Values form Json, using jpath

{ "data": [ { "id": "52fb62dc-a446-4fbb-9c7e-e75d8c90f6d9", "name": "abx", "address": { "address1": "New Address 1", "address2": "New Address 2", "Pin":"800001" …
Sai
  • 3
  • 2
0
votes
2 answers

Dynamically Generate the JSON Schema from the JSON file in JAVA without using the POJO

Any suggestions for getting the JPATH's for the input JSON file. Basically a tree structure of the JSON schema from the JSON file
Sandeep Shetty
  • 167
  • 2
  • 12
0
votes
0 answers

Escaping single quote in Jpath

I have a well formatted json like below: { "Slide":[ { "Code": "'!!!", "Status": "OK" }, { "Code": "123", "Status": "Failed" } ] } I use json path to filter…
SKN
  • 520
  • 1
  • 5
  • 20
0
votes
4 answers

Get the path of a key from nested JSON using Json.Net

I have a big nested JSON. I don't know the structure of the JSON. I just have a set of keys which are present in the JSON but I don't know where exactly in the JSON. How do I find out the path of a key from an unknown JSON structure assuming the key…
Sumit Kadam
  • 25
  • 1
  • 4
1
2