Skip to content

Add JSON Serialization

Compare
Choose a tag to compare
@myw myw released this 19 Sep 23:52
· 55 commits to v2 since this release

Non-breaking changes

  • Exposed the CuriousObject class to consumers as CuriousObjects.defaultType
  • Added object method toJSON to CuriousObject, which allows JSON.stringify to correctly
    serialize them
  • Added static method fromJSON to CuriousObject, which allows easier parsing from strings into
    CuriousObject instances