8000 GitHub - andrei512/magic
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

andrei512/magic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

magic

A NSObject extension written in swift that gives a general implementation for loading data from a JSON and converting an object to a NSDictionary.

More details in this article by We ❤ Swift.

Usage

Copy magic.swift into your project.

let info = [
    "first_name": "Andrei",
    "last_name": "Puni",
    "age": 23
]

var user = User.fromJson(info)

println(user.firstName) // "Andrei"
println(user.lastName) // "Puni"
println(user.age) // 23

println(user.asJson())
//{
//    age = 23;
//    firstName = Andrei;
//    lastName = Puni;
//}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0