You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase Remote Config上传JSON文件提示格式错误,求排查原因

Firebase Remote Config JSON格式错误解决办法

你的JSON文件不符合Firebase Remote Config的规范,它要求特定的结构,不能直接用嵌套对象的形式存储配置。正确的格式需要包含parameters顶级字段,每个配置项要明确声明类型、默认值等元信息。

把你的配置改成以下格式即可:

{
  "parameters": {
    "welcome_message": {
      "defaultValue": {
        "value": "Welcome"
      },
      "type": "STRING"
    },
    "other_message": {
      "defaultValue": {
        "value": "Hello, there!"
      },
      "type": "STRING"
    },
    "feature_one_enabled": {
      "defaultValue": {
        "value": "false"
      },
      "type": "BOOLEAN"
    },
    "feature_two_enabled": {
      "defaultValue": {
        "value": "true"
      },
      "type": "BOOLEAN"
    }
  }
}

关键说明:

  • 所有配置参数必须放在parameters对象下
  • 每个参数需要指定type(支持STRING、BOOLEAN、NUMBER等)
  • 默认值要包裹在defaultValue.value中,注意布尔值要以字符串形式传入(比如"false"而非false)

内容的提问来源于stack exchange,提问作者Matthew Trent

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.15 20:12:05