Get data from JSON file with iOS and swift -


i have json file:

      var point :        [             {          "id": 1,          "name": "a",          "lastupdate": 1468011600,          "position": [36.8656974, 10.1687314]},           {          "id": 1,          "name": "a",          "lastupdate": 1468397003,          "position": [36.9009882, 10.3009531]          },          {          "id": 1,          "name": "a",          "lastupdate": 1467590490,          "position": [37.1691357, 10.0349865]          }           ] 

and need read data in viewcontroller, tried work swiftyjson failed. ps: code swift , not objective-c solutions?

you can use this great library. library provide parsing json dictionary simple (just 1-2 line of code).

p.s. recommended use this library mapping dictionary object

update install swiftyjson in podfile

platform :ios, '8.0' use_frameworks!  pod 'swiftyjson' 

then sudo pod install


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -