新的firebase json注释 [英] New firebase json annotations

查看:112
本文介绍了新的firebase json注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的实体使用自动值,并注释它们以允许json解析。

新的sdk中有新的注释: Exclude IgnoreExtraProperties ThrowOnExtraProperties @PropertyName https://firebase.google.com/docs/reference/android/com/google/firebase/database/PropertyName 。但PropertyName似乎从sdk中丢失了。

解决方案

我们错过了 @PropertyName 注释。它将被包含在下一次更新中。



查看此答案,以便使用最新的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆