Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Caeden117/SimpleJSON

 
 

Repository files navigation

SimpleJSON

A simple one class file to parse, modify, and export JSON.

SimpleJSONUnity

A one class extension to SimpleJSON that allows parsing, modifying, and exporting of common Unity objects (Vector2, Vector3, Quaternion, Rect, Color, etc.)

SimpleJSONBinary

A one class extension to SimpleJSON that provides methods to serialize a JSON object tree into a compact binary format.

Disclaimer

This forked version of Bunny83's SimpleJSON contains modifications that I've made for another project, ChroMapper. The changes are listed below.

Changes from Bunny83/SimpleJSON

  • Added JSONParseException which SimpleJSON throws instead of a generic Exception when calling JSON.Parse or JSONNode.Parse.
  • SimpleJSON now throws a JSONParseException when a new node starts being parsed before an existing node is completed.
    • Works on both new lines and on a single line.
    • For example, trying to parse { "_objectA": "someValue" "_objectB": "someOtherValue" } will throw a JSONParseException, whereas in the original SimpleJSON, the returned JSONNode will exclude _objectB.
  • Added support for Color in SimpleJSONUnity
    • Supports both Array format ([r, g, b]) and Object format ({ "r": r, "g": g, "b": b })
      • Alpha is optional, and defaults to 1. It is the 4th element in the Array format, and is named a in the Object format.
    • Only saves in the container type defined in JSONNode.ColorContainerType
      • You can easily change JSONNode.ColorContainerType to switch between Array format and Object format.

About

A simple JSON parser in C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%