/// <summary> /// Closes the context. /// </summary> /// <param name="obj">The object.</param> /// <exception cref="System.InvalidOperationException"> /// There is no current context.</exception> private void CloseContext(Json.JsonObject obj) { if (this.context == null) { throw new InvalidOperationException("There is no current context."); } this.context = null; this.JsonObject = obj; }
/// <summary> /// Initializes a new instance of the <see cref="JsonDecoder"/> class. /// </summary> /// <param name="json">The JSON object to decoder.</param> /// <param name="str">The string representation of the object.</param> private JsonDecoder(Json.JsonObject json, string str) { this.JsonObject = json; this.JsonString = str; }
/// <summary> /// Initializes a new instance of the <see cref="Context"/> class. /// </summary> /// <param name="parentEncoder">The parent.</param> public Context(JsonEncoder parentEncoder) { this.parent = parentEncoder; this.obj = new Json.JsonObject(); }