Skip to content

fhstp/UnityViewJson

Repository files navigation

UnityViewJson

A Unity package to view Json data using the builtin UI system

Changelog - License - Repo

⚠️ Development is paused ⚠️
No new features will be added or bugs fixed unless requested through an issue.
If you wish to fork this repository and continue the work, you are very welcome to do so.


Usage

Data format

First create a json document describing the shape of the data you want to display along with formatting information. The schema for this document can be found here.

You can parse your format document using the DataFormat.TryParse function.

Display style

You also need to choose some styling options for your data. These are configured using an instance of the DataStyle class and allow you to change things like text color.

View Json

First make sure you have prepared the format and style for the data. Next prepare the RectTransform you want to display the data in. ViewJson will attempt to display the data by fitting into this rect, so make sure it has sufficient size.

Finally to view your data, call ViewJson.TryViewJsonIn. You can monitor the returned code for any errors.

About

A Unity package to view Json data using the builtin UI system

Resources

License

Stars

Watchers

Forks

Packages

No packages published