Forums Register Login

json ObjectMapper error

+Pie Number of slices to send: Send
Hi,
I have an issue with converting json to java bean object.
My bean class is like this:



This is the json string



and this is what I am calling from another class



But I am getting this error:



What I don't understand is why... Please let me know what is the possible issue here...
1
+Pie Number of slices to send: Send
The getter and setter are called "getEmailid" and "setEmailid". So, the field name, according to your JSON library, is "emailid", and not "emailId" (note the lower- and upper-case i). Likewise with getUserid, setUserid.

Make sure that the spelling is correct. Either call the methods getEmailId and setEmailId, or call the field "emailid" instead of "emailId" inside the JSON string.
+Pie Number of slices to send: Send
 

Jesper de Jong wrote:The getter and setter are called "getEmailid" and "setEmailid". So, the field name, according to your JSON library, is "emailid", and not "emailId" (note the lower- and upper-case i). Likewise with getUserid, setUserid.

Make sure that the spelling is correct. Either call the methods getEmailId and setEmailId, or call the field "emailid" instead of "emailId" inside the JSON string.



Ok, got it. Thanks for the reply. The class is an existing one which is used in the whole project. I guess, I can't change it now without impacting other functionality. So, I will handle it from my json string only.
What's a year in metric? Do you know this metric stuff tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3137 times.
Similar Threads
hibernate one to many mapping inserts into User table but not in mapped Email table.
Hibernate: IllegalArgumentException while trying to save object with date type valiable.
LoginBean doesn't compile
all properties of domain class USER get displayed in JSP correctly but the userID does not display.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:12:36.