58. Convert JSON to POJO class to handle dynamic payload using Jackson| Rest Assured|

  Рет қаралды 12,450

Amod Mahajan

Amod Mahajan

Күн бұрын

Пікірлер: 12
@arunmohan1950
@arunmohan1950 3 жыл бұрын
Your videos are awesome Amod.
@RetargetCommon
@RetargetCommon 3 жыл бұрын
Glad you like them!
@GhoomoMereSang
@GhoomoMereSang 3 жыл бұрын
Thanks Amod. Not able to understand the purpose.As we have to create the POJO for this as well, so how we are saving effort??
@arunmohan1950
@arunmohan1950 3 жыл бұрын
Hi Amod. This is really informative. I think something is missing here at the last. Can you show how is the modified JSON and what should we do if we do not have any POJO?
@RetargetCommon
@RetargetCommon 3 жыл бұрын
Hi Arun, Thanks for feedback. I have tried to correct them and answer your queries in this video. kzbin.info/www/bejne/b2jKnYiZjNhosJI
@arunmohan1950
@arunmohan1950 3 жыл бұрын
@@RetargetCommon Thanks a lot Amod. Yes, you explained my doubts well.
@samarthjain5170
@samarthjain5170 2 жыл бұрын
Hi Amod, I am getting this error everytime, Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "streetName" (class Pojo.Address), not marked as ignorable (5 known properties: "houseNo", "city", "streetname", "state", "country"])
@RetargetCommon
@RetargetCommon 2 жыл бұрын
You need to add annotation to ignore unknown properties.
@samarthjain5170
@samarthjain5170 2 жыл бұрын
@@RetargetCommon in your video I think you havent added that annotation ?
@AmritAgarwal07
@AmritAgarwal07 2 жыл бұрын
if we use @jsoninclude nonnull and non_empty with readValue() method then this annotation is not working
@arjunmutekar8399
@arjunmutekar8399 Жыл бұрын
I want to replace the payload which is in List
@avishekbehera
@avishekbehera 3 жыл бұрын
Good approach and nice explanation Amod. But I feel this is not ideal if we have to test the API with multiple different sets of data. Example: I need to test with 10 sets of data using a data provider. I want all fields to be different data every time. Anyways I need to update them to different values. In this case, having a JSON file is an extra effort, we have POJO anyways. Rather - Improve the POJO with Lombok that reduces a lot of code - Use data provider to feed different sets of data to POJO to construct a payload - Similarly, we can have POJO for Response JSON too and we deserialize to do assertion based on fields. No need of reading the JSON file here. Let me know your thoughts.
37. Create Complex JSON Payload Using Java For Rest Assured
29:01
Amod Mahajan
Рет қаралды 14 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Automate Anything with AI Agents... Zero Code
1:14:53
Jack Roberts
Рет қаралды 2,3 М.
How to Handle Authentication in RestAssured
17:00
Mukesh otwani
Рет қаралды 48 М.
07 - Create Complex Nested Post Request body Using POJO Classes in RestAssured
27:23
Software Testing And Automation
Рет қаралды 13 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН