java - Unable to parse a json field class using Jackson jar -


i have json response :

"site":[                  {                     "href":"https:www.abc.com",                   "class":"child"                } ] 

i trying parse response using jackson jars in java. cant create field class(as keyword) in pojo map field. tried class_ , _class returns org.codehaus.jackson.map.exc.unrecognizedpropertyexception: unrecognized field "class" searches field class in pojo site.java how can such scenarios handled?

your property name in pojo cannot name "class", can specify jackson use property name "class" annotation.

@jsonproperty("class") private string clazz; 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -