LitJson.JsonReader.Close C# (CSharp) Method

Close() public method

public Close ( ) : void
return void
        public void Close()
        {
            if (end_of_input)
                return;

            end_of_input = true;
            end_of_json  = true;

            if (reader_is_owned)
                reader.Close ();

            reader = null;
        }

Usage Example

Example #1
0
        public void BooleanTest()
        {
            string json = "[ true, false ]";

            JsonReader reader = new JsonReader (json);
            reader.Read ();

            reader.Read ();
            Assert.IsTrue ((bool) reader.Value, "A1");
            reader.Read ();
            Assert.IsTrue (! ((bool) reader.Value), "A2");

            reader.Close ();
        }
All Usage Examples Of LitJson.JsonReader::Close