internal static BaseJsonDumper GetWrapperFor(BaseJsonDumper parent, JToken instance, int depth, DumpOptions options) { switch (instance) { case JObject jObject when jObject.Count == 0: return(new JEmptyObjectDumper(parent, jObject, depth, options)); case JObject jObject: return(new JObjectDumper(parent, jObject, depth, options)); case JArray jArray when jArray.Count == 0: return(new JEmptyArrayDumper(parent, jArray, depth, options)); case JArray jArray: return(new JArrayDumper(parent, jArray, depth, options)); case JValue jValue: return(new JTokenDumper(parent, jValue, depth, options)); default: return(new JTokenDumper(parent, instance, depth, options)); } }
public JObjectDumper(BaseJsonDumper parent, JObject instance, int depth, DumpOptions options) : base(parent, instance, depth, options) { }
public JArrayDumper(BaseJsonDumper parent, JArray instance, int depth, DumpOptions options) : base(parent, instance, depth, options) { }
public BaseJsonDumper(BaseJsonDumper parent, T jsonValue, int depth, DumpOptions options) : base(parent, depth, options) { JsonValue = jsonValue; }
public JTokenDumper(BaseJsonDumper parent, JToken instance, int depth, DumpOptions options) : base(parent, instance, depth, options) { }
protected BaseJsonDumper(BaseJsonDumper parent, int depth, DumpOptions options) { Parent = parent; Depth = depth; Options = options; }