Skip to main content

InWorldContainer.DataSaveJSON

Declaration#

public virtual void DataSaveJSON(string filename)

Parameters#

NameDescription
filenameName of file to create/update. Application.persistentDataPath is automatically prepended.

Description#

Saves JSON data to a specified file

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(InWorldContainer target, string filename)    {        target.DataSaveJSON(filename);    }}

Declaration#

public virtual string DataSaveJSON(bool removeNulls, bool makeReadable)

Parameters#

NameDescription
removeNullsRemove null items
makeReadableOutput JSON in a readable format with returns and tabs

Description#

Saves JSON data to a JSON strting

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(InWorldContainer target)    {        string result = target.DataSaveJSON(true, true);    }
}