• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Expression based Json Query Engine

Avinash Ga
Ranch Hand
Posts: 78
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Here is a small utility to query the JsonObject for a particular property. It may be helpful to some of you.

It contains a static public method which accepts an expression, property separator and JsonObject.

The expression can be of the form Node1:Node2:Node3, where Node3 is the targetted property and ":" is a property seperator. See Sample.

if you want to query the name property of the above object then you can call the method as

The output of the method is list of string, i.e if the targeted property is a JsonObject then it will be toString() ed.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic