Table of Contents

Class JsonData.Float

Namespace
PAC.Json

Represents a float in JSON data.

public class JsonData.Float : JsonData
Inheritance
JsonData.Float
Implements
Inherited Members

Constructors

Float(float)

public Float(float value)

Parameters

value float

Properties

value

public float value { get; set; }

Property Value

float

Methods

Parse(TextReader, bool)

Reads the TextReader, starting at the given index, and attempts to parse it as a JsonData.Float. If successful, the last read character will be the last character of the parsed JSON.

public static JsonData.Float Parse(TextReader reader, bool mustReadAll)

Parameters

reader TextReader
mustReadAll bool

If 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

JsonData.Float

Parse(string)

Attempts to parse the string into a JsonData.Float.

public static JsonData.Float Parse(string str)

Parameters

str string

Returns

JsonData.Float

Parse(string, ref int)

Reads the string, starting at the given index, and attempts to parse the string as a JsonData.Float. If successful, the index will be moved to the last digit of the float.

public static JsonData.Float Parse(string str, ref int index)

Parameters

str string
index int

Returns

JsonData.Float

ToJsonString(bool)

Converts it into a string in JSON format.

public string ToJsonString(bool pretty)

Parameters

pretty bool

If true, puts the string into pretty form - e.g. with indentations.

Returns

string

Operators

explicit operator int(Float)

public static explicit operator int(JsonData.Float jsonfloat)

Parameters

jsonfloat JsonData.Float

Returns

int

implicit operator float(Float)

public static implicit operator float(JsonData.Float jsonfloat)

Parameters

jsonfloat JsonData.Float

Returns

float

implicit operator Float(int)

public static implicit operator JsonData.Float(int value)

Parameters

value int

Returns

JsonData.Float

implicit operator Float(float)

public static implicit operator JsonData.Float(float value)

Parameters

value float

Returns

JsonData.Float