internal static Message[] FromArray(Dictionary <string, object?>?data, string field) { var array = TinyJsonParser.GetArrayField(data, field); var res = new Message[array.Count]; for (int i = 0; i < res.Length; i++) { var obj = (Dictionary <string, object?>?)array[i]; (var key, var value) = TinyJsonParser.GetStringPair(obj, "name", "description"); res[i] = new Message(key !, value !); } return(res); }
protected List <object?>?GetArray(string field) { return(TinyJsonParser.GetArrayField(m_data, field)); }