private bool TrySetMember(string name, object value) { __names.Add(name); _arrayEntries = new Dictionary <string, object>(); _properties[name] = new DHash(value); return(true); }
public DHash AddDHash(string name) { var dhash = new DHash(); __names.Add(name); _properties[name] = dhash; return(dhash); }
private static DHash FromJsonDictionary(DHash dhash, IDictionary <string, object> jsonDictionary) { foreach (var o in jsonDictionary) { if (o.Value is IDictionary <string, object> ) { DHash nested = dhash.AddDHash(o.Key); FromJsonDictionary(nested, o.Value as IDictionary <string, object>); } else { dhash.TrySetMember(o.Key, o.Value); } } return(dhash); }
private static dynamic FromJsonDictionary(IDictionary <string, object> jsonDictionary) { var dhash = new DHash(); return(FromJsonDictionary(dhash, jsonDictionary)); }