Publisher | Hammer Solves Everything |
---|---|
File size | 21.97kB |
Number of files | 4 |
Latest version | 1 |
Latest release date | 2024-08-13 10:40:16 |
First release date | 2024-08-13 10:40:16 |
Supported Unity versions | 2018.4.2 or higher |
One-file JSON Parser can parse JSON in a single file, ItsJsonParser.cs.
You can easily use, copy, modify, reproduce, transmit, and distribute the software.
Feature
- Parse JSON string to class
- Parse class to JSON string
Details
- Nested classes and structs can be parsed
- Nested Arrays and Lists can be parsed
- Enum variables can be parsed as name
- Nullable variables can be parsed (when not null)
- SerializeField and NonSerialized attributes can be used to mark as parse target
Example
To JSON text from Class
FooClass foo = new FooClass();
string jsonText = ItsJsonParser.ToJson(foo);
From JSON text to Class
string jsonText = "{\"foo\":1, \"bar\":\"baz\"}";
FooClass foo = ItsJsonParser.FromJson<FooClass>(jsonText);