Class JsonData.Bool
Represents a bool in JSON data.
public class JsonData.Bool : JsonData
- Inheritance
-
JsonData.Bool
- Implements
- Inherited Members
Constructors
Bool(bool)
public Bool(bool value)
Parameters
value
bool
Properties
value
public bool value { get; set; }
Property Value
Methods
Parse(TextReader, bool)
Reads the TextReader, starting at the given index, and attempts to parse it as a JsonData.Bool. If successful, the last read character will be the last character of the parsed JSON.
public static JsonData.Bool Parse(TextReader reader, bool mustReadAll)
Parameters
reader
TextReadermustReadAll
boolIf true, it will check that all the data in the reader was used when parsing. Setting this to false is useful for parsing JSON data inside a list or object.
Returns
Parse(string)
Attempts to parse the string into a JsonData.Bool.
public static JsonData.Bool Parse(string str)
Parameters
str
string
Returns
Parse(string, ref int)
Reads the string, starting at the given index, and attempts to parse the string as JsonData.Bool. If successful, the index will be moved to the last character of the null.
public static JsonData.Bool Parse(string str, ref int index)
Parameters
Returns
ToJsonString(bool)
Converts it into a string in JSON format.
public string ToJsonString(bool pretty)
Parameters
pretty
boolIf true, puts the string into pretty form - e.g. with indentations.
Returns
Operators
implicit operator bool(Bool)
public static implicit operator bool(JsonData.Bool jsonBool)
Parameters
Returns
implicit operator Bool(bool)
public static implicit operator JsonData.Bool(bool value)
Parameters
value
bool