Deserialize json to java using jackson - issues with special characters
问题 I am using jackson (jersey and jetty) for my REST webservices - and all is going well. But I have a requirement to include a special character in one of the name value pairs in json post request. i.e. json request (in post body)- { "id": "1", "print-color" : "red" } //"-" in "print-color" is giving problems. Now inside my corresponding java bean for this object Item.java class, I cant make a property with name print-color (because "-" is not allowed). How do I deal with it in mapping? Thanks.