示例#1
0
 public static void ReadStrings(ANode node, ref string[] variable)
 {
     if (node == null)
     {
         Debug.LogError("Dev.JSON.ReadStrings: Error at \"" + node.ToJSON() + "\": Null!");
     }
     else if (node is Array)
     {
         variable = node.AsArray.Children.Select(x => x.Value).ToArray();
     }
     else if (node is Data)
     {
         variable = new[] { node.Value };
     }
     else
     {
         Debug.LogError("Dev.JSON.TryReadStrings: Error at \"" + node.ToJSON() + "\": Array or Data expected!");
     }
 }
示例#2
0
 private void LogError()
 {
     Debug.LogError("Dev.JSON: Key \"" + _key + "\" not found in: " + _node.ToJSON());
 }