C# 从实时数据库获取json数据

C# 从实时数据库获取json数据,c#,json,unity3d,firebase-realtime-database,C#,Json,Unity3d,Firebase Realtime Database,我正在使用firebase和unity c# 我存储了一个JSON对象(hero),然后当我尝试检索该对象时,它返回的JSON值的顺序与以前不同,我不知道这是否是错误的原因,但当我尝试将其解析回对象时,它永远不会工作 为什么会发生这种情况 public class hero1 : ScriptableObject { public string heroname; public string treasure; public string[] jewel;

我正在使用firebase和unity c# 我存储了一个JSON对象(hero),然后当我尝试检索该对象时,它返回的JSON值的顺序与以前不同,我不知道这是否是错误的原因,但当我尝试将其解析回对象时,它永远不会工作
为什么会发生这种情况

       public class hero1 : ScriptableObject
{
    public string heroname;
    public string treasure;
    public string[] jewel;
    public float hp;
    public float dps;
    public float def;
    public float spd;
    public float skillvalue;
    public string skilltype;
    public string passivetype;
    public int level;
    public int rank;
    public string type;
    public int starlevel;
    public float totalstats;

}```

this is the hero object that is saved

这就是它被保存的方式

  heroes1.stringo[x] =snapshot.Child("heroes").Child(herohchildnames[x].ToString()).GetRawJsonValue();
                    Debug.Log(snapshot.Child("heroes").Child(herohchildnames[x].ToString()).GetRawJsonValue());

这就是它被调用的方式

为了回答这个问题,我正在将数据解析成一个不同的对象,该对象与发送的原始对象具有相同的属性

请不要描述您的代码。相反,请编辑您的问题以包括。欢迎使用StackOverflow,尽管我相信您的问题对您来说非常有意义。它缺乏适合我们的信息。有时候你需要记住,我们是完全陌生的,我们无法调试一个故事。你越善于解释你的问题,我们就能越快地给你答案(或不回答)
  heroes1.stringo[x] =snapshot.Child("heroes").Child(herohchildnames[x].ToString()).GetRawJsonValue();
                    Debug.Log(snapshot.Child("heroes").Child(herohchildnames[x].ToString()).GetRawJsonValue());