Loading...
Searching...
No Matches
BaseJsonSaveContainer 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 BaseJsonSaveContainer:
SaveContainer SerializationContainer BaseJsonSerializationSaveContainer JsonSaveContainer PrettyJsonSaveContainer

Public Member Functions

proto external string SaveToString ()
 
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 ()
 

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

◆ GetMaxDecimalPlaces()

proto external int BaseJsonSaveContainer.GetMaxDecimalPlaces ( )

◆ SaveToFile()

proto external bool BaseJsonSaveContainer.SaveToFile ( string fileName)

◆ SaveToString()

proto external string BaseJsonSaveContainer.SaveToString ( )

◆ SetMaxDecimalPlaces()

proto external void BaseJsonSaveContainer.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: