private static object ComputeValue(object value)
            {
                if (value == null)
                {
                    return(null);
                }

                JArray array = value as JArray;

                if (array != null)
                {
                    // we use the arraylist because that's all the property grid needs...
                    ArrayList list = new ArrayList();
                    for (int i = 0; i < array.Count; i++)
                    {
                        JObject subo = array[i] as JObject;
                        if (subo != null)
                        {
                            JTypeDescriptor td = new JTypeDescriptor(subo);
                            list.Add(td);
                        }
                        else
                        {
                            JValue jv = array[i] as JValue;
                            if (jv != null)
                            {
                                list.Add(jv.Value);
                            }
                            else
                            {
                                // etc.
                            }
                        }
                    }
                    // we don't support adding things
                    return(ArrayList.ReadOnly(list));
                }
                else
                {
                    // etc.
                }
                return(value);
            }
            private static object ComputeValue(object value)
            {
                if (value == null)
                    return null;

                JArray array = value as JArray;
                if (array != null)
                {
                    // we use the arraylist because that's all the property grid needs...
                    ArrayList list = new ArrayList();
                    for (int i = 0; i < array.Count; i++)
                    {
                        JObject subo = array[i] as JObject;
                        if (subo != null)
                        {
                            JTypeDescriptor td = new JTypeDescriptor(subo);
                            list.Add(td);
                        }
                        else
                        {
                            JValue jv = array[i] as JValue;
                            if (jv != null)
                            {
                                list.Add(jv.Value);
                            }
                            else
                            {
                                // etc.
                            }
                        }
                    }
                    // we don't support adding things
                    return ArrayList.ReadOnly(list);
                }
                else
                {
                    // etc.
                }
                return value;
            }