java - UnrecognizedPropertyException after changing structure of Firebase data -
this question has answer here:
there little problem firebase , firebase snapshot.getvalue(mmodelclass)
i have android app wich contains user list(model class - user.java) , interacts firebase, structure:
-user --$user_id ---name ---surname
i've published app, , want update app, add new field user structure in firebase:
-user --$user_id ... --status
if it, published app crash because old model - user.java doesn't has status field , can't edit pubslished version
crash text:
caused by: com.fasterxml.jackson.databind.exc.unrecognizedpropertyexception: unrecognized field "status" (class package.user), not marked ignorable (2 known properties: , "name", "surname"])
finally found answer:
import org.codehaus.jackson.annotate.jsonignoreproperties; @jsonignoreproperties(ignoreunknown = true) public class foo { ... }
Comments
Post a Comment