Unity Json File Read Writer by XJINE - 59

Games & Projects

JsonFileReadWriter provides simple functions to de/serialize json from/to file.

Unity 2019.3.5f1BSD 3-Clause "New" or "Revised" LicenseUpdated 1 year agoCreated on December 1st, 2019
Go to source

Unity_JsonFileReadWriter

JsonFileReadWriter provides simple functions to de/serialize json from/to file.

Import to Your Project

You can import this asset from UnityPackage.

Dependencies

You have to import following assets to use this asset.

How to Use

Following functions are sample.

WriterJson~ functions write the json of obj into .json file. When the file set as null the file name gets T. And when the dir set as null, the directory set as top.

WriteJsonToStreamingAssets<T>(T obj, string dir = null, string file = null)
WriteJsonToFile<T>(T obj, string dir = null, string file = null)
ReadJsonFromStreamingAssets<T>(string dir = null, string file = null)
ReadJsonFromFile<T>(string dir = null, string file = null)

The args of ReadJson~ works same as WriteJson~.

Show all projects by XJINE