VRC SDK
This project aims to completely document the VRChat Unity SDK
Loading...
Searching...
No Matches
VRC.SDK3.Data.VRCJson Class Reference
Inheritance diagram for VRC.SDK3.Data.VRCJson:
Collaboration diagram for VRC.SDK3.Data.VRCJson:

Static Public Member Functions

static bool TryDeserializeFromJson (string source, out DataToken result)
 Creates a DataList or DataDictionary from JSON string input. If successful, this returns true and the result token will be either a DataDictionary or DataList. If not successful, this returns false and puts an error explaining what the issue was in the result token.

TODO: Add more information about the JSON format that is expected, as it has some quirks mentioned on the documentation page. More...
 
static bool TrySerializeToJson (DataToken input, JsonExportType jsonExportType, out DataToken result)
 Attempts to convert a DataDictionary or DataList into JSON string output. If successful, this returns true and the result token will be a string with the final Json. If not successful, this returns false and puts an error explaining what the issue was in the result token.

TODO: Add more information about the JSON format that is expected, as it has some quirks mentioned on the documentation page. More...
 

Static Package Functions

static bool TryParseToken (string source, JsonType type, int index, out DataToken result)
 
static bool TryParseObject (string source, int index, out DataToken result)
 
static bool TryParseArray (string source, int index, out DataToken result)
 
static bool TryParseString (string source, ref int index, out DataToken result)
 
static bool TryParseNumber (string source, int index, out DataToken result)
 
static bool TryParseBool (string source, int index, out DataToken result)
 
static bool TryIdentifyType (string source, int index, out JsonType result)
 

Static Private Member Functions

static bool SerializeObject (DataDictionary dataDictionary, JsonExportType jsonExportType, StringBuilder builder, int indent, out DataToken error)
 
static bool SerializeArray (DataList dataList, JsonExportType jsonExportType, StringBuilder builder, int indent, out DataToken error)
 
static void AppendIndent (StringBuilder builder, int indent)
 
static void ScanObject (out bool success, string source, ref int index)
 
static void ScanArray (out bool success, string source, ref int index)
 
static void ScanString (out bool success, string source, ref int index)
 
static void ScanNumber (out bool success, string source, ref int index)
 
static void ScanBool (out bool success, string source, ref int index)
 
static void ScanNull (out bool success, string source, ref int index)
 
static void ScanUnknown (string source, ref int index)
 
static void SkipWhitespace (string source, ref int index)
 
static bool IsComplexObject (string source, int index)
 
static int GetStringEnd (string source, int index)
 
static bool IsComplexArray (string source, int index)
 
static void SkipToCharacter (string source, ref int index, char character)
 
static bool SkipToAnyCharacter (string source, ref int index, char[] characters)
 
static string UnEscapeCharacter (out bool success, string source, ref int index)
 
static string EscapeString (string input)
 
static string TrimWhitespace (string input)
 
static VRCJson ()
 

Static Private Attributes

static readonly char[] parseArrayChars
 
static readonly char[] scanObjectChars
 
static readonly char[] scanArrayChars
 
static readonly char[] scanStringChars
 
static readonly char[] scanWordChars
 
static readonly char[] whitespaceChars
 
static readonly char[] numberChars
 
static HashSet< DataTokenseenContainers
 

Detailed Description

Definition at line 8112 of file VRCSDK3.cs.

Constructor & Destructor Documentation

◆ VRCJson()

static VRC.SDK3.Data.VRCJson.VRCJson ( )
staticprivate

Definition at line 9317 of file VRCSDK3.cs.

Member Function Documentation

◆ AppendIndent()

static void VRC.SDK3.Data.VRCJson.AppendIndent ( StringBuilder  builder,
int  indent 
)
staticprivate

Definition at line 8446 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ EscapeString()

static string VRC.SDK3.Data.VRCJson.EscapeString ( string  input)
staticprivate

Definition at line 9246 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ GetStringEnd()

static int VRC.SDK3.Data.VRCJson.GetStringEnd ( string  source,
int  index 
)
staticprivate

Definition at line 9113 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ IsComplexArray()

static bool VRC.SDK3.Data.VRCJson.IsComplexArray ( string  source,
int  index 
)
staticprivate

Definition at line 9130 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ IsComplexObject()

static bool VRC.SDK3.Data.VRCJson.IsComplexObject ( string  source,
int  index 
)
staticprivate

Definition at line 9096 of file VRCSDK3.cs.

◆ ScanArray()

static void VRC.SDK3.Data.VRCJson.ScanArray ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 8936 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanBool()

static void VRC.SDK3.Data.VRCJson.ScanBool ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 9060 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanNull()

static void VRC.SDK3.Data.VRCJson.ScanNull ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 9072 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanNumber()

static void VRC.SDK3.Data.VRCJson.ScanNumber ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 9041 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ ScanObject()

static void VRC.SDK3.Data.VRCJson.ScanObject ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 8878 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanString()

static void VRC.SDK3.Data.VRCJson.ScanString ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 8998 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanUnknown()

static void VRC.SDK3.Data.VRCJson.ScanUnknown ( string  source,
ref int  index 
)
staticprivate

Definition at line 9083 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializeArray()

static bool VRC.SDK3.Data.VRCJson.SerializeArray ( DataList  dataList,
JsonExportType  jsonExportType,
StringBuilder  builder,
int  indent,
out DataToken  error 
)
staticprivate

Definition at line 8341 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializeObject()

static bool VRC.SDK3.Data.VRCJson.SerializeObject ( DataDictionary  dataDictionary,
JsonExportType  jsonExportType,
StringBuilder  builder,
int  indent,
out DataToken  error 
)
staticprivate

Definition at line 8231 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SkipToAnyCharacter()

static bool VRC.SDK3.Data.VRCJson.SkipToAnyCharacter ( string  source,
ref int  index,
char[]  characters 
)
staticprivate

Definition at line 9155 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ SkipToCharacter()

static void VRC.SDK3.Data.VRCJson.SkipToCharacter ( string  source,
ref int  index,
char  character 
)
staticprivate

Definition at line 9147 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ SkipWhitespace()

static void VRC.SDK3.Data.VRCJson.SkipWhitespace ( string  source,
ref int  index 
)
staticprivate

Definition at line 9088 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ TrimWhitespace()

static string VRC.SDK3.Data.VRCJson.TrimWhitespace ( string  input)
staticprivate

Definition at line 9252 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ TryDeserializeFromJson()

static bool VRC.SDK3.Data.VRCJson.TryDeserializeFromJson ( string  source,
out DataToken  result 
)
static

Creates a DataList or DataDictionary from JSON string input. If successful, this returns true and the result token will be either a DataDictionary or DataList. If not successful, this returns false and puts an error explaining what the issue was in the result token.

TODO: Add more information about the JSON format that is expected, as it has some quirks mentioned on the documentation page.

Parameters
sourceThe JSON string to convert to json.
resultThe DataToken to populate with the deserialized data. Will be an error data token type when there is a failure.
Returns
True if the JSON was successfully deserialized, false otherwise.


Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.

Definition at line 8149 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ TryIdentifyType()

static bool VRC.SDK3.Data.VRCJson.TryIdentifyType ( string  source,
int  index,
out JsonType  result 
)
staticpackage

Definition at line 9259 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseArray()

static bool VRC.SDK3.Data.VRCJson.TryParseArray ( string  source,
int  index,
out DataToken  result 
)
staticpackage

Definition at line 8631 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseBool()

static bool VRC.SDK3.Data.VRCJson.TryParseBool ( string  source,
int  index,
out DataToken  result 
)
staticpackage

Definition at line 8859 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseNumber()

static bool VRC.SDK3.Data.VRCJson.TryParseNumber ( string  source,
int  index,
out DataToken  result 
)
staticpackage

Definition at line 8788 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ TryParseObject()

static bool VRC.SDK3.Data.VRCJson.TryParseObject ( string  source,
int  index,
out DataToken  result 
)
staticpackage

Definition at line 8477 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseString()

static bool VRC.SDK3.Data.VRCJson.TryParseString ( string  source,
ref int  index,
out DataToken  result 
)
staticpackage

Definition at line 8740 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseToken()

static bool VRC.SDK3.Data.VRCJson.TryParseToken ( string  source,
JsonType  type,
int  index,
out DataToken  result 
)
staticpackage

Definition at line 8454 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TrySerializeToJson()

static bool VRC.SDK3.Data.VRCJson.TrySerializeToJson ( DataToken  input,
JsonExportType  jsonExportType,
out DataToken  result 
)
static

Attempts to convert a DataDictionary or DataList into JSON string output. If successful, this returns true and the result token will be a string with the final Json. If not successful, this returns false and puts an error explaining what the issue was in the result token.

TODO: Add more information about the JSON format that is expected, as it has some quirks mentioned on the documentation page.

Parameters
inputThe DataToken to convert to JSON.
jsonExportTypeThe format to export the JSON in.
resultThe DataToken to populate with the serialized data. Will be an error data token type when there is a failure. Convert this to a string to get the final JSON.
Returns
True if the JSON was successfully converted, false otherwise.


Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.

Definition at line 8196 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ UnEscapeCharacter()

static string VRC.SDK3.Data.VRCJson.UnEscapeCharacter ( out bool  success,
string  source,
ref int  index 
)
staticprivate

Definition at line 9169 of file VRCSDK3.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ numberChars

readonly char [] VRC.SDK3.Data.VRCJson.numberChars
staticprivate

Definition at line 8126 of file VRCSDK3.cs.

◆ parseArrayChars

readonly char [] VRC.SDK3.Data.VRCJson.parseArrayChars
staticprivate

Definition at line 8114 of file VRCSDK3.cs.

◆ scanArrayChars

readonly char [] VRC.SDK3.Data.VRCJson.scanArrayChars
staticprivate

Definition at line 8118 of file VRCSDK3.cs.

◆ scanObjectChars

readonly char [] VRC.SDK3.Data.VRCJson.scanObjectChars
staticprivate

Definition at line 8116 of file VRCSDK3.cs.

◆ scanStringChars

readonly char [] VRC.SDK3.Data.VRCJson.scanStringChars
staticprivate

Definition at line 8120 of file VRCSDK3.cs.

◆ scanWordChars

readonly char [] VRC.SDK3.Data.VRCJson.scanWordChars
staticprivate

Definition at line 8122 of file VRCSDK3.cs.

◆ seenContainers

HashSet<DataToken> VRC.SDK3.Data.VRCJson.seenContainers
staticprivate

Definition at line 8128 of file VRCSDK3.cs.

◆ whitespaceChars

readonly char [] VRC.SDK3.Data.VRCJson.whitespaceChars
staticprivate

Definition at line 8124 of file VRCSDK3.cs.


The documentation for this class was generated from the following file: