Example #1
0
        //リストの値を全てJSON形式に変換
        //各値を_maybeEncodeJSONObjectで各JSON形式に変換
        internal static List <object> _encodeAsJSONArray(IList list, bool allowNCMBObjects)
        {
            List <object> new_array = new List <object> ();

            foreach (object obj in list)
            {
                if (!NCMBObject._isValidType(obj))
                {
                    throw new NCMBException(new ArgumentException("invalid type for value in array: " + obj.GetType().ToString()));
                }
                new_array.Add(_maybeEncodeJSONObject(obj, allowNCMBObjects));
            }

            return(new_array);
        }