using System; using System.Text; using System.Collections.Generic; using sharp.extensions; using System.Reflection; using System.Linq; namespace sharp.json { public class JSONObject : JSON { public JSONObject() :base(JSONTypes.Object){} private Dictionary values = new Dictionary(); public override JSON this[string name] { get { return this.values[name]; } set { this.values[name] = value; } } public override int Count { get { return this.values.Count; } } public override bool Boolean { get { return this.values.Count > 0; } } public override bool Contains(object o) { return this.values.ContainsKey((string)o); } public override string[] prettyPrint() { List lines = new List(); lines.Add("{"); string[] keys = this.values.Keys.ToArray(); for (int n=0;n