Swift - Wrong date format (JSON .NET) -


i'm trying make api call alamofire in app, strange error.

'there error deserializing object of type tucson.geocaching.wcf.api.createtrackablelogrequestv1. datetime content '\/date(1452942271163+0500)\/' not start '\/date(' , end ')\/' required json.' 

on website of api date format must this: "\/date(928174800000-0700)\/"

my code:

posttblog("gsycnp", text: "test", date: "\\/date(928174800000-0700)\\/", logtype: 48)  func posttblog (code: string, text: string, date: string, logtype: int) -> bool {     if let apikey = apikey {         let url = "https://api.groundspeak.com/livev6/geocaching.svc/createtrackablelog"         let parameters:[string : anyobject] = ["accesstoken":apikey, "trackingnumber":code, "utcdatelogged": date, "note":text, "logtype":logtype]          alamofire.request(.post, url, parameters: parameters, encoding: .json).responsestring { response in             print(response)         }            return true     } else {         return false     } } 

i have tried different things nothing seamed work. happy if me, thx.

it worked after turned "\\/date(928174800000-0700)\\/" "/date(928174800000)/"


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -