HandyJSON

HandyJSON is a framework written in Swift which to make converting model objects( pure classes/structs ) to and from JSON easy on iOS.

Compared with others, the most significant feature of HandyJSON is that it does not require the objects inherit from NSObject(not using KVC but reflection), neither implements a ‘mapping’ function(writing value to memory directly to achieve property assignment).

HandyJSON is totally depend on the memory layout rules infered from Swift runtime code. We are watching it and will follow every bit if it changes.

Features:

  • Serialize/Deserialize Object/JSON to/From JSON/Object
  • Naturally use object property name for mapping, no need to specify a mapping relationship
  • Support almost all types in Swift, including enum
  • Support struct
  • Custom transformations
  • Type-Adaption, such as string json field maps to int property, int json field maps to string property

Posted

in

, ,

by

Tags:

Comments

Leave a Reply