新的firebase json注释 [英] New firebase json annotations
问题描述
我为我的实体使用自动值,并注释它们以允许json解析。
新的sdk中有新的注释: Exclude
, IgnoreExtraProperties
, ThrowOnExtraProperties
和 @PropertyName
: https://firebase.google.com/docs/reference/android/com/google/firebase/database/PropertyName 。但PropertyName似乎从sdk中丢失了。
我们错过了 @PropertyName $在此版本的Android版Firebase SDK中使用c $ c>注释。它将被包含在下一次更新中。
查看此答案,以便使用最新的Firebase SDK明确使用Jackson: >
I'm using autovalue for my entities and annotated them to allow json parsing.
There are new annotations in the new sdk: Exclude
, IgnoreExtraProperties
, ThrowOnExtraProperties
and @PropertyName
: https://firebase.google.com/docs/reference/android/com/google/firebase/database/PropertyName. But PropertyName seems to be missing from the sdk..
We missed the @PropertyName
annotation in this release of the Firebase SDK for Android. It will be included in the next update. No news yet on when that will be out.
See this answer for a way to use Jackson explicitly with the latest Firebase SDK: How to deserialise a subclass in Firebase using getValue(Subclass.class)
这篇关于新的firebase json注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!