【问题标题】:How to solve Firebase - Invalid JSON data or key values. Key values can’t contain $ # [ ] / or如何解决 Firebase - 无效的 JSON 数据或键值。键值不能包含 $ # [ ] / 或
【发布时间】:2020-05-18 22:48:02
【问题描述】:

我知道这个问题是重复的,但我仍然没有找到解决方案..

现在我有一个 excel 文件,因为我将此 csv 文件转换为包含 URLJSON 文件,如下所示 JSON 简单文件:

[
{
    "First category level": "House",
    "Username": "Agent",
    "Picture URL": "https://aradi.online/files/11-2019/ad3419/large_1574371860125983298.jpeg, https://aradi.online/files/11-2019/ad3419/1574371963155915788_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720201765576925_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719641933844005_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720201702322421_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719671933648120_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720172054688102_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719711282962795_large.jpg, https://aradi.online/files/11-2019/ad3419/1574371976127814840_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719681510756892_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719721007832197_large.jpg, https://aradi.online/files/11-2019/ad3419/1574371980135907454_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719791550205986_large.jpg, https://aradi.online/files/11-2019/ad3419/157437198155029656_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719771029730786_large.jpg, https://aradi.online/files/11-2019/ad3419/1574371977262742584_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719841816940326_large.jpg, https://aradi.online/files/11-2019/ad3419/157437198935074321_large.jpg, https://aradi.online/files/11-2019/ad3419/157437198262102534_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719871045113443_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719921325866659_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719881907505281_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719862107386915_large.jpg, https://aradi.online/files/11-2019/ad3419/157437198853335430_large.jpg, https://aradi.online/files/11-2019/ad3419/1574371994716586575_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720001564968705_large.jpg, https://aradi.online/files/11-2019/ad3419/1574371994121122874_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719971677244500_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720222026002810_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720211496018484_large.jpg, https://aradi.online/files/11-2019/ad3419/1574372016638875820_large.jpg, https://aradi.online/files/11-2019/ad3419/15743719991920927875_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720021268623750_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720031938529177_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720211547065240_large.jpg, https://aradi.online/files/11-2019/ad3419/1574372008668788440_large.jpg, https://aradi.online/files/11-2019/ad3419/15743720101063489670_large.jpg, https://aradi.online/files/11-2019/ad3419/1574372012215551459_large.jpg",
    "Latitude": 31.87732437,
    "Longitude": 35.85965251,
    "Email": "info@aradi.online",
    "AOL Reference Number": "AOL-00022110103429",
    "Title": "280m-1Floor-3Bed-3Bath",
    "Size in M2": "280 m",
    "Property for": "Sale",
    "Price": "340,000 JOD",
    "Rental Price on Ad": "",
    "Building Condition": "Used",
    "Sell Price Per M2": "",
    "Rent Monthly Price per M2": "",
    "Rent Installment Value": "",
    "Rent Contract Payments": "",
    "Payment Method": "",
    "First Installment": "",
    "Number of Installment": "",
    "Installment Value": "",
    "Contact Type": "Owner",
    "Owner Name": "شركة الطيف لخدمات القيمة المضافة",
    "Broker Name": "",
    "Contact Number": "(962) 786-303090",
    "WhatsApp Link": "https://api.whatsapp.com/send?phone=962786303090&text=%D9%85%D8%B1%D8%AD%D8%A8%D8%A7%D9%8E%D9%8E%20%F0%9F%91%8B%20.%20%D8%B4%D9%81%D8%AA%20%D8%A5%D8%B9%D9%84%D8%A7%D9%86%20House%20%F0%9F%8F%A0%20%20%D8%B9%D9%84%D9%89%20%D9%85%D9%88%D9%82%D8%B9%20%D8%A3%D8%B1%D8%A7%D8%B6%D9%8A%20%D8%A3%D9%88%D9%86%20%D9%84%D8%A7%D9%8A%D9%86%20%D9%88%20%D9%85%D8%B9%D8%B1%D9%88%D8%B6%20%D9%84%D9%84%D8%A8%D9%8A%D8%B9%20%D9%88%20%D8%A7%D9%84%D9%85%D9%86%D8%B4%D9%88%D8%B1%F0%9F%93%A3%20%D8%AA%D8%AD%D8%AA%20%D8%B9%D9%86%D9%88%D8%A7%D9%86%20236m-1Floor-3Bed-3Bath%20%D9%88%20%D8%B1%D9%82%D9%85%20%D9%85%D8%B1%D8%AC%D8%B9%D9%8A%20AOL-00022110103429%20%E2%9C%8D%20%D9%88%20%D8%AD%D8%A7%D8%A8%20%D8%A3%D8%B3%D8%AA%D9%81%D8%B3%D8%B1%F0%9F%93%9E%20%D8%A3%D9%83%D8%AB%D8%B1%20%D8%B9%D9%86%D9%87%20.",
    "Listing Key": "AOI-3419-136515",
    "Country": "Jordan",
    "Province": "Amman",
    "Area": "Amman",
    "Address": "مرج الحمام",
    "Bedrooms": 3,
    "Bathrooms": 3,
    "Villa/House Floors Number": 1,
    "Built Year": 2004,
    "Villa/House Finishing": "Deluxe",
    "Villa/House Furnished": "Furnished",
    "Villa/House Living Room Number": 1,
    "Villa/House Guest Room Number": 2,
    "Villa/House Kitchen Type": "Separated",
    "Villa/House Main Bathroom Type": "Bathtub",
    "Villa/House Lot Size": "1014 m",
    "Villa/House Balconi Number": 2,
    "Villa/House Terrace Size M2": 44,
    "Description": "منزل مستقل مكون من طابق ارضي وتسوية   للبيع \n طريق المطار  خلف مدارس العالمية\n  منطقة فلل جميع الخدمات\n مساحة الأرض 1014 م البيت على شارعين\n مساحة الطابق الأرضي  280م مع ترسين \nمكون من 3 غرف نوم واحدة ماستر و 3 حمامات و معيشة وصالون كبير \n ثلاث مداخل للبيت\n حديقة وكراج سيارات كبير \n-مساحة التسوية 240م بحاجة الي تشطيب \nمدخل مستقل للتسوية\n بير ماء 30 م \n البيع بداعي السفر \n السعر قابل للتفاوض بعد المعاينة",
    "Villa/House Features": "Storage, Air Condition, Water well, Water Heating, Central Heating, Abajor, Double Glass, Intercom"
  },
.......................
]

我认为火力基地不接受像 / 这样的特殊字符,因为它是 URL 的一部分,

那么有什么解决方案可以存储这些类型的数据格式吗?..

请注意,我想出了这个链接:

Firebase - Invalid JSON data or key values. Key values can’t contain $ # [ ] / or

但没有找到解决方案...

我在这个JSON 文件中也有很多像"" 这样的空键我想我用String 替换它...

我希望这足够清楚......

【问题讨论】:

    标签: json firebase import


    【解决方案1】:

    你有像“别墅/家庭厨房类型”这样的钥匙

    它包含一个不应该包含的字符

    【讨论】:

    • 非常感谢你的回答我会试试这个,我会给你我的反馈:)
    猜你喜欢
    • 2016-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-21
    相关资源
    最近更新 更多