I am using a MongoDB server on Heroku running Parse.The error comes when I push the Sign Up button to send the form to my server. I believe it has something to do with the connection to the server and not the json format as the error suggests.
Code Block func login() { // remember user's login let username : String? = UserDefaults.standard.string(forKey: "username") // if loged in if username != nil { var window: UIWindow? let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let myTabBar = storyboard.instantiateViewController(withIdentifier: "tabBar") as! UITabBarController window?.rootViewController = myTabBar } } func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. var window: UIWindow? // accessing heroku app vi id & keys Parse.enableLocalDatastore() // Initialize Parse. Parse.setApplicationId("example", clientKey: "exmaple") // [Optional] Track statistics around application opens. PFAnalytics.trackAppOpened(launchOptions: launchOptions) // call login function login() // color of window window?.backgroundColor = .white return true