Skip to content

CoreDataMapper is a framework based on ObjectMapper. It's written in Swift that makes it easy for you to convert your CoreData objects to and from JSON.

Notifications You must be signed in to change notification settings

mlagast/CoreDataMapper

Repository files navigation

CoreDataMapper

CoreDataMapper is a framework based on ObjectMapper. It's written in Swift that makes it easy for you to convert your CoreData objects to and from JSON.

Features:

  • Mapping JSON to CoreData objects

The Basics

Create MapContext with NSManagedObjectContext and EntityName:

let mapperContext = CoreDataMapContext(managedObjectContext: managedObjectContext, entityName: entityName)
let mapper = Mapper<T>(context: mapperContext) # T is kind of NSManagedObjectModel and implements Mappable
let result = mapper.map(JSON: jsonObject) # jsonObject is kind of [String : Any]

References

ObjectMapper repository

About

CoreDataMapper is a framework based on ObjectMapper. It's written in Swift that makes it easy for you to convert your CoreData objects to and from JSON.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published