matthewcheok / JSONCodable

Hassle-free JSON encoding and decoding in Swift
MIT License
602 stars 66 forks source link

Not able to read using jsondecodable #41

Closed aleemilu75 closed 7 years ago

aleemilu75 commented 8 years ago

[ { "ID": 568, "av": 125435865, "ad": "2016-06-07", "ar": 0, "at": 0, "ah": 0, "aj": "te" } ]

struct Messages { let id: [[String:AnyObject]]? }

matthewcheok commented 8 years ago

Your JSON is an array of a single dictionary. You can only do this if you use Messages to process one level higher.

Nadohs commented 8 years ago

I have an implementation working for this. Only on swift-3 branch right now though. PR here: https://github.com/matthewcheok/JSONCodable/pull/42/