Enfusion Script API
Loading...
Searching...
No Matches
BaseJsonSerializationSaveContainer Interface Reference

Container for saving data in json format IMPORTANT* This should never be instantiated, you should use any of the child classes!!! More...

Inheritance diagram for BaseJsonSerializationSaveContainer:
BaseSerializationSaveContainer BaseSerializationContainer Managed JsonSaveContainer PrettyJsonSaveContainer

Public Member Functions

proto string ExportToString ()
 
proto external bool SaveToFile (string fileName)
 
proto external void SetMaxDecimalPlaces (int maxDecimalPlaces)
 Sets the maximum number of decimal places for float output.
 
proto external int GetMaxDecimalPlaces ()
 
- 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

Container for saving data in json format IMPORTANT* This should never be instantiated, you should use any of the child classes!!!

Member Function Documentation

◆ ExportToString()

proto string BaseJsonSerializationSaveContainer.ExportToString ( )

◆ GetMaxDecimalPlaces()

proto external int BaseJsonSerializationSaveContainer.GetMaxDecimalPlaces ( )

◆ SaveToFile()

proto external bool BaseJsonSerializationSaveContainer.SaveToFile ( string fileName)

◆ SetMaxDecimalPlaces()

proto external void BaseJsonSerializationSaveContainer.SetMaxDecimalPlaces ( int maxDecimalPlaces)

Sets the maximum number of decimal places for float output.

This setting truncates the output with specified number of decimal places.

Example:

JsonSaveContainer container();
container.SetMaxDecimalPlaces(3);
container.StartObject("aa");
container.WriteValue("value", 0.12345); // "0.123"
container.EndObject();
Container for saving data in json format.
Definition JsonSaveContainer.c:14

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