HandyJSON is a framework written in Swift which makes 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), nor implements a 'mapping' function(writing value to memory directly to achieve property assignment). HandyJSON is totally dependent on the memory layout rules inferred from Swift runtime code. We are watching it and will follow every bit if it changes. To support deserialization from JSON, a class/struct needs to conform to 'HandyJSON' protocol. It's truly protocol, not some class inherited from NSObject. For struct, since the compiler provides a default empty initializer, we use it for free. HandyJSON supports deserialization from the designated path of JSON.

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
  • Custom transformations
  • Support struct
  • Type-Adaption, such as string json field maps to int property, int json field maps to string property

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow HandyJSON

HandyJSON Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of HandyJSON!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

Swift

Related Categories

Swift Object Oriented Software, Swift Libraries, Swift JSON Serialization Libraries

Registered

2022-02-09