Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON String Parsing #4

Closed
isair opened this issue Sep 4, 2014 · 0 comments
Closed

JSON String Parsing #4

isair opened this issue Sep 4, 2014 · 0 comments
Assignees
Milestone

Comments

@isair
Copy link
Owner

isair commented Sep 4, 2014

JSONHelper should be able to parse JSON strings and deserialize them as well. Which would make things like this possible:

class Person: Deserializable {
    var name = ""

    required init(data: [String: AnyObject]) {
        name <<< data["name"]
    }
}

var jsonString = "[{\"name\": \"I am\"},{\"name\": \"Groot!\"}]"
var people = [Person]()

people <<<<* jsonString

for person in people {
    println("\(person.name)")
}
@isair isair self-assigned this Sep 4, 2014
@isair isair added this to the 1.2.0 milestone Sep 4, 2014
@isair isair closed this as completed in ede6ea2 Sep 4, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant