internal DynamicJson(XElement element, DynamicJsonType type) { Debug.Assert(type == DynamicJsonType.array || type == DynamicJsonType.@object); xml = element; jsonType = type; }
internal static XAttribute CreateTypeAttr(DynamicJsonType type) { return(new XAttribute("type", type.ToString())); }
/// <summary> /// Dynamic JSON /// </summary> public DynamicJson() { xml = new XElement("root", DynamicJsonHelper.CreateTypeAttr(DynamicJsonType.@object)); jsonType = DynamicJsonType.@object; }