在我的Xamarin Forms应用程序中,我使用以下代码将一些值保存在Firebase Realtime数据库中,并且工作正常。
private FirebaseClient _firebaseClient = new FirebaseClient("MY_FIREBASE_URL_HERE");
await _firebaseClient.Child("CHILD_1").Child("CHILD_2").PutAsync("SOME_STRING_DATA_HERE");
如果我在PutAsync
函数中添加URL字符串,则会引发异常,提示 Invalid data; couldn't parse JSON object, array, or value
。因为我需要在Firebase中存储URL,所以该如何解决此问题。