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??
@arunmohan19503 жыл бұрын
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?
@RetargetCommon3 жыл бұрын
Hi Arun, Thanks for feedback. I have tried to correct them and answer your queries in this video. kzbin.info/www/bejne/b2jKnYiZjNhosJI
@arunmohan19503 жыл бұрын
@@RetargetCommon Thanks a lot Amod. Yes, you explained my doubts well.
@samarthjain51702 жыл бұрын
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"])
@RetargetCommon2 жыл бұрын
You need to add annotation to ignore unknown properties.
@samarthjain51702 жыл бұрын
@@RetargetCommon in your video I think you havent added that annotation ?
@AmritAgarwal072 жыл бұрын
if we use @jsoninclude nonnull and non_empty with readValue() method then this annotation is not working
@arjunmutekar8399 Жыл бұрын
I want to replace the payload which is in List
@avishekbehera3 жыл бұрын
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.