|
enum | Type {
Null
, String
, Number
, Object
,
Array
, Bool
, Baked
} |
|
|
| JSONObject (Type t) |
|
| JSONObject (bool b) |
|
| JSONObject (float f) |
|
| JSONObject (Dictionary< string, string > dic) |
|
| JSONObject (Dictionary< string, JSONObject > dic) |
|
| JSONObject (AddJsonContents content) |
|
| JSONObject (IEnumerable< JSONObject > objects) |
|
| JSONObject (string str, int maxDepth=-2, bool storeExcessLevels=false, bool strict=false) |
|
delegate void | AddJsonContents (JSONObject self) |
|
void | Absorb (JSONObject obj) |
|
void | Add (JSONObject obj) |
|
void | AddField (string name, bool val) |
|
void | AddField (string name, float val) |
|
void | AddField (string name, string val) |
|
void | AddField (string name, JSONObject obj) |
|
void | RemoveField (string name) |
|
bool | HasFields (params string[] names) |
|
override string | ToString () |
|
string | ToString (bool pretty) |
|
Dictionary< string, string > | ToDictionary () |
|
|
List< JSONObject > | List [get] |
|
bool | IsContainer [get] |
|
Type | ObjectType [get, set] |
|
List< string > | Keys [get] |
|
string | String [get] |
|
float | F [get] |
|
bool | B [get] |
|
JSONObject | this[int index] [get, set] |
|
JSONObject | this[string index] [get, set] |
|
◆ Create()
static JSONObject CloudOnce.Internal.JSONObject.Create |
( |
string |
val, |
|
|
int |
maxDepth = -2 , |
|
|
bool |
storeExcessLevels = false , |
|
|
bool |
strict = false |
|
) |
| |
|
inlinestatic |
Create a JSONObject by parsing string data
- Parameters
-
val | The string to be parsed |
maxDepth | 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 | Whether to store levels beyond maxDepth in baked JSONObjects |
strict | Whether to be strict in the parsing. For example, non-strict parsing will successfully parse "a string" into a string-type |
- Returns
- The created JSON object.
The documentation for this class was generated from the following file:
- Assets/Extensions/CloudOnce/Internal/Data/JSONObject/JSONObject.cs