Create JSON Object from Class in Swift
I'm pretty new to iOS development and Swift (so please bear with me). I have a class object defined like this: class LocationPoint { var x: Double var y: Double var orientation: Double init(x: Double, y: Double, orientation: Double) { self.x = x self.y = y self.orientation = orientation } } In my delegate, I create an instance of the class and append it to an array (declared outside the delegate): var pt = LocationPoint(x: position.x, y: position.y, orientation: position.orientation) self.LocationPoints.append(pt) So far so good. I can show the array values in a textview object in my