C# Class SpilGames.Unity.Utils.JSONObject

Datei anzeigen Open project: spilgames/spil_event_unity_plugin Class Usage Examples

Public Properties

Property Type Description
b bool
keys List
list List
n double
n float
releaseQueue Queue
str string
type Type

Public Methods

Method Description
Absorb ( JSONObject obj ) : void
Add ( AddJSONConents content ) : void
Add ( JSONObject obj ) : void
Add ( bool val ) : void
Add ( float val ) : void
Add ( int val ) : void
Add ( string str ) : void
AddField ( string name, AddJSONConents content ) : void
AddField ( string name, JSONObject obj ) : void
AddField ( string name, bool val ) : void
AddField ( string name, float val ) : void
AddField ( string name, int val ) : void
AddField ( string name, string val ) : void
Bake ( ) : void
BakeAsync ( ) : IEnumerable
Clear ( ) : void
ClearPool ( ) : void
Copy ( ) : JSONObject

Copy a JSONObject. This could probably work better

Create ( ) : JSONObject
Create ( AddJSONConents content ) : JSONObject
Create ( string>.Dictionary dic ) : JSONObject
Create ( Type t ) : JSONObject
Create ( bool val ) : JSONObject
Create ( float val ) : JSONObject
Create ( int val ) : JSONObject
Create ( string val, int maxDepth = -2, bool storeExcessLevels = false, bool strict = false ) : JSONObject

Create a JSONObject by parsing string data

CreateBakedObject ( string val ) : JSONObject
CreateStringObject ( string val ) : JSONObject
GetField ( string name ) : JSONObject
GetField ( bool &field, string name, FieldNotFound fail = null ) : void
GetField ( double &field, string name, FieldNotFound fail = null ) : void
GetField ( float &field, string name, FieldNotFound fail = null ) : void
GetField ( int &field, string name, FieldNotFound fail = null ) : void
GetField ( string name, GetFieldResponse response, FieldNotFound fail = null ) : void
GetField ( string &field, string name, FieldNotFound fail = null ) : void
GetField ( uint &field, string name, FieldNotFound fail = null ) : void
HasField ( string name ) : bool
HasFields ( string names ) : bool
JSONObject ( ) : System.Diagnostics
JSONObject ( AddJSONConents content ) : System.Diagnostics
JSONObject ( JSONObject>.Dictionary dic ) : System.Diagnostics
JSONObject ( string>.Dictionary dic ) : System.Diagnostics
JSONObject ( JSONObject objs ) : System.Diagnostics
JSONObject ( Type t ) : System.Diagnostics
JSONObject ( bool b ) : System.Diagnostics
JSONObject ( double d ) : System.Diagnostics
JSONObject ( float f ) : System.Diagnostics
JSONObject ( string str, int maxDepth = -2, bool storeExcessLevels = false, bool strict = false ) : System.Diagnostics
Merge ( JSONObject obj ) : void
Print ( bool pretty = false ) : string
PrintAsync ( bool pretty = false ) : IEnumerable
RemoveField ( string name ) : void
SetField ( string name, JSONObject obj ) : void
SetField ( string name, bool val ) : void
SetField ( string name, float val ) : void
SetField ( string name, int val ) : void
StringObject ( string val ) : JSONObject
ToDictionary ( ) : string>.Dictionary
ToString ( ) : string
ToString ( bool pretty ) : string
this ( int index ) : JSONObject
this ( string index ) : JSONObject

Private Methods

Method Description
MergeRecur ( JSONObject left, JSONObject right ) : void

Merge object right into left recursively

Parse ( string str, int maxDepth = -2, bool storeExcessLevels = false, bool strict = false ) : void
Stringify ( int depth, StringBuilder builder, bool pretty = false ) : void
StringifyAsync ( int depth, StringBuilder builder, bool pretty = false ) : IEnumerable

Method Details

Absorb() public method

public Absorb ( JSONObject obj ) : void
obj JSONObject
return void

Add() public method

public Add ( AddJSONConents content ) : void
content AddJSONConents
return void

Add() public method

public Add ( JSONObject obj ) : void
obj JSONObject
return void

Add() public method

public Add ( bool val ) : void
val bool
return void

Add() public method

public Add ( float val ) : void
val float
return void

Add() public method

public Add ( int val ) : void
val int
return void

Add() public method

public Add ( string str ) : void
str string
return void

AddField() public method

public AddField ( string name, AddJSONConents content ) : void
name string
content AddJSONConents
return void

AddField() public method

public AddField ( string name, JSONObject obj ) : void
name string
obj JSONObject
return void

AddField() public method

public AddField ( string name, bool val ) : void
name string
val bool
return void

AddField() public method

public AddField ( string name, float val ) : void
name string
val float
return void

AddField() public method

public AddField ( string name, int val ) : void
name string
val int
return void

AddField() public method

public AddField ( string name, string val ) : void
name string
val string
return void

Bake() public method

public Bake ( ) : void
return void

BakeAsync() public method

public BakeAsync ( ) : IEnumerable
return IEnumerable

Clear() public method

public Clear ( ) : void
return void

ClearPool() public static method

public static ClearPool ( ) : void
return void

Copy() public method

Copy a JSONObject. This could probably work better
public Copy ( ) : JSONObject
return JSONObject

Create() public static method

public static Create ( ) : JSONObject
return JSONObject

Create() public static method

public static Create ( AddJSONConents content ) : JSONObject
content AddJSONConents
return JSONObject

Create() public static method

public static Create ( string>.Dictionary dic ) : JSONObject
dic string>.Dictionary
return JSONObject

Create() public static method

public static Create ( Type t ) : JSONObject
t Type
return JSONObject

Create() public static method

public static Create ( bool val ) : JSONObject
val bool
return JSONObject

Create() public static method

public static Create ( float val ) : JSONObject
val float
return JSONObject

Create() public static method

public static Create ( int val ) : JSONObject
val int
return JSONObject

Create() public static method

Create a JSONObject by parsing string data
public static Create ( string val, int maxDepth = -2, bool storeExcessLevels = false, bool strict = false ) : JSONObject
val string The string to be parsed
maxDepth int The maximum depth for the parser to search. Set this to to 1 for the first level, /// 2 for the first 2 levels, etc. It defaults to -2 because -1 is the depth value that is parsed (see below)
storeExcessLevels bool Whether to store levels beyond maxDepth in baked JSONObjects
strict bool Whether to be strict in the parsing. For example, non-strict parsing will successfully /// parse "a string" into a string-type
return JSONObject

CreateBakedObject() public static method

public static CreateBakedObject ( string val ) : JSONObject
val string
return JSONObject

CreateStringObject() public static method

public static CreateStringObject ( string val ) : JSONObject
val string
return JSONObject

GetField() public method

public GetField ( string name ) : JSONObject
name string
return JSONObject

GetField() public method

public GetField ( bool &field, string name, FieldNotFound fail = null ) : void
field bool
name string
fail FieldNotFound
return void

GetField() public method

public GetField ( double &field, string name, FieldNotFound fail = null ) : void
field double
name string
fail FieldNotFound
return void

GetField() public method

public GetField ( float &field, string name, FieldNotFound fail = null ) : void
field float
name string
fail FieldNotFound
return void

GetField() public method

public GetField ( int &field, string name, FieldNotFound fail = null ) : void
field int
name string
fail FieldNotFound
return void

GetField() public method

public GetField ( string name, GetFieldResponse response, FieldNotFound fail = null ) : void
name string
response GetFieldResponse
fail FieldNotFound
return void

GetField() public method

public GetField ( string &field, string name, FieldNotFound fail = null ) : void
field string
name string
fail FieldNotFound
return void

GetField() public method

public GetField ( uint &field, string name, FieldNotFound fail = null ) : void
field uint
name string
fail FieldNotFound
return void

HasField() public method

public HasField ( string name ) : bool
name string
return bool

HasFields() public method

public HasFields ( string names ) : bool
names string
return bool

JSONObject() public method

public JSONObject ( ) : System.Diagnostics
return System.Diagnostics

JSONObject() public method

public JSONObject ( AddJSONConents content ) : System.Diagnostics
content AddJSONConents
return System.Diagnostics

JSONObject() public method

public JSONObject ( JSONObject>.Dictionary dic ) : System.Diagnostics
dic JSONObject>.Dictionary
return System.Diagnostics

JSONObject() public method

public JSONObject ( string>.Dictionary dic ) : System.Diagnostics
dic string>.Dictionary
return System.Diagnostics

JSONObject() public method

public JSONObject ( JSONObject objs ) : System.Diagnostics
objs JSONObject
return System.Diagnostics

JSONObject() public method

public JSONObject ( Type t ) : System.Diagnostics
t Type
return System.Diagnostics

JSONObject() public method

public JSONObject ( bool b ) : System.Diagnostics
b bool
return System.Diagnostics

JSONObject() public method

public JSONObject ( double d ) : System.Diagnostics
d double
return System.Diagnostics

JSONObject() public method

public JSONObject ( float f ) : System.Diagnostics
f float
return System.Diagnostics

JSONObject() public method

public JSONObject ( string str, int maxDepth = -2, bool storeExcessLevels = false, bool strict = false ) : System.Diagnostics
str string
maxDepth int
storeExcessLevels bool
strict bool
return System.Diagnostics

Merge() public method

public Merge ( JSONObject obj ) : void
obj JSONObject
return void

Print() public method

public Print ( bool pretty = false ) : string
pretty bool
return string

PrintAsync() public method

public PrintAsync ( bool pretty = false ) : IEnumerable
pretty bool
return IEnumerable

RemoveField() public method

public RemoveField ( string name ) : void
name string
return void

SetField() public method

public SetField ( string name, JSONObject obj ) : void
name string
obj JSONObject
return void

SetField() public method

public SetField ( string name, bool val ) : void
name string
val bool
return void

SetField() public method

public SetField ( string name, float val ) : void
name string
val float
return void

SetField() public method

public SetField ( string name, int val ) : void
name string
val int
return void

StringObject() public static method

public static StringObject ( string val ) : JSONObject
val string
return JSONObject

ToDictionary() public method

public ToDictionary ( ) : string>.Dictionary
return string>.Dictionary

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( bool pretty ) : string
pretty bool
return string

this() public method

public this ( int index ) : JSONObject
index int
return JSONObject

this() public method

public this ( string index ) : JSONObject
index string
return JSONObject

Property Details

b public_oe property

public bool b
return bool

keys public_oe property

public List keys
return List

list public_oe property

public List list
return List

n public_oe property

public double n
return double

n public_oe property

public float n
return float

releaseQueue public_oe static_oe property

public static Queue releaseQueue
return Queue

str public_oe property

public string str
return string

type public_oe property

public Type type
return Type