Updating JSON using GPath

167 views
Skip to first unread message

amit Bansal

unread,
Mar 14, 2017, 7:28:39 AM3/14/17
to REST assured
I want to update a JSON by providing JsonPath which is a groovy GPath (having conditions like find, findAll and any). I could not find any support to update JSON. Nearest thing which I found is com.jayway.JsonPath which I can use to set value based on JsonPath but this JsonPath is different then GPath and is not useful for me. Is there a way to achieve this? 

Johan Haleby

unread,
Mar 14, 2017, 8:57:40 AM3/14/17
to rest-a...@googlegroups.com
This is not something you can do with REST Assured. REST Assured is for extracting and/or validation HTTP responses, not for changing them.

On Tue, Mar 14, 2017 at 12:20 PM, amit Bansal <amit.ba...@gmail.com> wrote:
I want to update a JSON by providing JsonPath which is a groovy GPath (having conditions like find, findAll and any). I could not find any support to update JSON. Nearest thing which I found is com.jayway.JsonPath which I can use to set value based on JsonPath but this JsonPath is different then GPath and is not useful for me. Is there a way to achieve this? 

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

amit Bansal

unread,
May 12, 2017, 3:51:58 AM5/12/17
to REST assured
Thanks a lot John. 


On Tuesday, 14 March 2017 18:27:40 UTC+5:30, Johan Haleby wrote:
This is not something you can do with REST Assured. REST Assured is for extracting and/or validation HTTP responses, not for changing them.
On Tue, Mar 14, 2017 at 12:20 PM, amit Bansal <amit.ba...@gmail.com> wrote:
I want to update a JSON by providing JsonPath which is a groovy GPath (having conditions like find, findAll and any). I could not find any support to update JSON. Nearest thing which I found is com.jayway.JsonPath which I can use to set value based on JsonPath but this JsonPath is different then GPath and is not useful for me. Is there a way to achieve this? 

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages