Android Firebase如何在小孩中使用空间字符 [英] Android Firebase how to use the spacial characters in the childs

查看:114
本文介绍了Android Firebase如何在小孩中使用空间字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Firebase实时数据库中的新成员,我必须在数据库中保存一些特殊字符,如下面的
https://myProject.firebaseio.com/myProject/en/ $ fanny / weight

注意:孩子可能包含任何特殊的字符不只是

我怎么能处理这样的问题呢?



有一些家伙正在替换字符,但在我的情况下,我不应该改变的价值观,因为我必须显示它的用户是因为它对用户有意义。

唯一的解决方案是替换键中的无效字符。



如果您需要将原始值显示给用户,请将其存储为值。


I'm new in Firebase realtime database, and I have to save some special characters int the database like the following https://myProject.firebaseio.com/myProject/en/$fanny/weight

Note: the child could contain any special character not just only $

How could I handle such like this issue please?

as I see there are some guys are replacing the characters, but in my case I should not change the values, because I have to display it to the users as is because it has a meaningful to the user.

解决方案

The only solution is to replace the invalid characters in the keys.

If you need to display the original value to the user, also store it as a value.

这篇关于Android Firebase如何在小孩中使用空间字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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