Enfusion Script API
Loading...
Searching...
No Matches
JsonApiStruct Interface Reference
Inheritance diagram for JsonApiStruct:
Managed AnimExportProfileChannelsRequest AnimExportProfileChannelsResponse AnimExportProfilesRequest AnimExportProfilesResponse AnimExportTrackExportRequest AnimExportTrackExportResponse BakeInfoRequest BakeInfoResponse BanListPageParams BlenderOperatorDescription CheckEmatRequest CheckEmatResponse CheckGUIDRequest CheckGUIDResponse DSConfig DSGameConfig DSGameProperties DSMod EBTAddonInfo EBTInfoRequest ExportEmatRequest ExportEmatResponse ExportPropertiesRequest ExportPropertiesResponse ExportTerrainRequest ExportTerrainResponse FBXReportToolRequest FBXReportToolResponse GamematInfoRequest GamematInfoResponse GetPortalMatRequest GetPortalMatResponse GetRelativePathRequest GetRelativePathResponse GetRoomsIds LayerPresetsRequest LayerPresetsResponse LoadedProjectsRequest LoadedProjectsResponse MaterialPreviewGetMapping MaterialPreviewRequest MaterialPropertiesRequest MaterialPropertiesResponse MaterialValidatorRequest MaterialValidatorResponse OpenXOBRequest OpenXOBResponse OverrideMeshObjectMaterialRequest OverrideMeshObjectMaterialResponse PageParams PrefabImportErrorResponse PrefabImportRequest PrefabImportResponse PrefabImporterRequest PrefabImporterResponse RegisterResourceRequest RegisterResourceResponse RoomFilterBase TextureRequest TextureResponse TextureValidationRequest TextureValidationResponse TextureValidatorRequest TextureValidatorResponse ValidateFBXUtilsReq ValidateFBXUtilsRes

Public Member Functions

proto external void RegV (string name)
 Register script variable for automatic processing of JSON stream.
 
proto external void UnregV (string name)
 Unregister script variable from automatic processing of JSON stream.
 
proto external void RegAll ()
 Register all variable present on object for auto processing (it is not recursive!)
 
proto external void Push (JsonApiStruct obj)
 Push object to parse (only during parse operation)
 
proto external void StartObject (string name)
 Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto external void EndObject ()
 End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto external void StoreObject (string name, JsonApiStruct obj)
 Add scripted object to hierarchy (calls through hierarchy)
 
proto external void StoreFloat (string name, float value)
 Add float value to hierarchy.
 
proto external void StoreInteger (string name, int value)
 Add integer value to hierarchy.
 
proto external void StoreBoolean (string name, bool value)
 Add boolean value to hierarchy.
 
proto external void StoreString (string name, string value)
 Add string value to hierarchy.
 
proto external void StoreVector (string name, vector value)
 Add vector value to hierarchy.
 
proto external void StartArray (string name)
 Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto external void EndArray ()
 End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto external void ItemObject (JsonApiStruct obj)
 Add scripted unnamed/ array object.
 
proto external void ItemFloat (float value)
 Add unnamed/ array float value.
 
proto external void ItemInteger (int value)
 Add unnamed/ array integer value.
 
proto external void ItemBoolean (bool value)
 Add unnamed/ array boolean value.
 
proto external void ItemString (string value)
 Add unnamed/ array string value.
 
proto external void ItemVector (vector value)
 Add unnamed/ array vector value.
 
proto external void ItemArray ()
 Start an array inside an array.
 
proto external void SetDone ()
 Call this when you've done packing or unpacking (interrupt operation)
 
proto external void SetFail ()
 Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.
 
proto external void Pack ()
 Start object packing now - for use at main thread only!
 
proto external void ExpandFromRAW (string data)
 Start object unpacking from RAW string data.
 
proto external string AsString ()
 Get packed JSON as string (!only if you called Pack() first, it may return null)
 
proto external bool HasData ()
 Return true if there are present JSON data which can be expanded on script object (typically you check this after load of file)
 
proto external bool PackToFile (string FileName)
 Pack() content and Save to file/ Keep content handle alive if it existed.
 
proto external bool SaveToFile (string FileName)
 Save JSON to file (only If something was loaded or received previously!)
 
proto external bool LoadFromFile (string FileName)
 Load JSON from file and Expand.
 
void OnExpand ()
 Event when expand (unpack) process starts.
 
void OnPack ()
 Event when pack starts - you will pack your stuff here.
 
void OnSuccess (int errorCode)
 Event called when operation finished with Success errorCode is EJsonApiError.
 
void OnError (int errorCode)
 Event called when operation finished with Error errorCode is EJsonApiError.
 
void OnObject (string name)
 Called when parsing object.
 
void OnStartArray (string name)
 Called when parsing array.
 
void OnEndArray (int itemCount)
 Called when array end, returns count of items.
 
void OnItemObject (int index, string name)
 Called when parsing object.
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Detailed Description


object which allow to parse upon generic JSON structure and format it back

Member Function Documentation

◆ AsString()

proto external string JsonApiStruct.AsString ( )

Get packed JSON as string (!only if you called Pack() first, it may return null)

◆ EndArray()

proto external void JsonApiStruct.EndArray ( )

End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ EndObject()

proto external void JsonApiStruct.EndObject ( )

End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ ExpandFromRAW()

proto external void JsonApiStruct.ExpandFromRAW ( string data)

Start object unpacking from RAW string data.

◆ HasData()

proto external bool JsonApiStruct.HasData ( )

Return true if there are present JSON data which can be expanded on script object (typically you check this after load of file)

◆ ItemArray()

proto external void JsonApiStruct.ItemArray ( )

Start an array inside an array.

◆ ItemBoolean()

proto external void JsonApiStruct.ItemBoolean ( bool value)

Add unnamed/ array boolean value.

◆ ItemFloat()

proto external void JsonApiStruct.ItemFloat ( float value)

Add unnamed/ array float value.

◆ ItemInteger()

proto external void JsonApiStruct.ItemInteger ( int value)

Add unnamed/ array integer value.

◆ ItemObject()

proto external void JsonApiStruct.ItemObject ( JsonApiStruct obj)

Add scripted unnamed/ array object.

◆ ItemString()

proto external void JsonApiStruct.ItemString ( string value)

Add unnamed/ array string value.

◆ ItemVector()

proto external void JsonApiStruct.ItemVector ( vector value)

Add unnamed/ array vector value.

◆ LoadFromFile()

proto external bool JsonApiStruct.LoadFromFile ( string FileName)

Load JSON from file and Expand.

◆ OnEndArray()

void JsonApiStruct.OnEndArray ( int itemCount)

Called when array end, returns count of items.

◆ OnError()

void JsonApiStruct.OnError ( int errorCode)

Event called when operation finished with Error errorCode is EJsonApiError.

◆ OnExpand()

void JsonApiStruct.OnExpand ( )

Event when expand (unpack) process starts.

Implemented in DSGameConfig, and DSGameProperties.

◆ OnItemObject()

void JsonApiStruct.OnItemObject ( int index,
string name )

Called when parsing object.

◆ OnObject()

void JsonApiStruct.OnObject ( string name)

Called when parsing object.

◆ OnPack()

◆ OnStartArray()

void JsonApiStruct.OnStartArray ( string name)

Called when parsing array.

◆ OnSuccess()

void JsonApiStruct.OnSuccess ( int errorCode)

Event called when operation finished with Success errorCode is EJsonApiError.

◆ Pack()

proto external void JsonApiStruct.Pack ( )

Start object packing now - for use at main thread only!

◆ PackToFile()

proto external bool JsonApiStruct.PackToFile ( string FileName)

Pack() content and Save to file/ Keep content handle alive if it existed.

◆ Push()

proto external void JsonApiStruct.Push ( JsonApiStruct obj)

Push object to parse (only during parse operation)

◆ RegAll()

proto external void JsonApiStruct.RegAll ( )

Register all variable present on object for auto processing (it is not recursive!)

◆ RegV()

proto external void JsonApiStruct.RegV ( string name)

Register script variable for automatic processing of JSON stream.

◆ SaveToFile()

proto external bool JsonApiStruct.SaveToFile ( string FileName)

Save JSON to file (only If something was loaded or received previously!)

◆ SetDone()

proto external void JsonApiStruct.SetDone ( )

Call this when you've done packing or unpacking (interrupt operation)

◆ SetFail()

proto external void JsonApiStruct.SetFail ( )

Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.

◆ StartArray()

proto external void JsonApiStruct.StartArray ( string name)

Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StartObject()

proto external void JsonApiStruct.StartObject ( string name)

Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StoreBoolean()

proto external void JsonApiStruct.StoreBoolean ( string name,
bool value )

Add boolean value to hierarchy.

◆ StoreFloat()

proto external void JsonApiStruct.StoreFloat ( string name,
float value )

Add float value to hierarchy.

◆ StoreInteger()

proto external void JsonApiStruct.StoreInteger ( string name,
int value )

Add integer value to hierarchy.

◆ StoreObject()

proto external void JsonApiStruct.StoreObject ( string name,
JsonApiStruct obj )

Add scripted object to hierarchy (calls through hierarchy)

◆ StoreString()

proto external void JsonApiStruct.StoreString ( string name,
string value )

Add string value to hierarchy.

◆ StoreVector()

proto external void JsonApiStruct.StoreVector ( string name,
vector value )

Add vector value to hierarchy.

◆ UnregV()

proto external void JsonApiStruct.UnregV ( string name)

Unregister script variable from automatic processing of JSON stream.


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