From the course: Writing Secure Code in iOS by Infosec

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Object deserialization

Object deserialization

- Let's now talk about object deserialization. So you serialize an object, then you deserialize it. But what does that mean? It means we can take an object and we can turn it into, we can convert it into a bitstream, which means we can store it on storage, put it in a database, put it in a file, transmit it across a network to a website. It's a way of representing an object as a stream. The stream can then be reconstructed, it can be deserialized back into a clone of the original object. The only thing is that it won't have any of its previously linked methods. Serialization formats could include JSON, XML, YAML, YAML Ain't Markup Language, one of those little cute acronyms. In Swift, there is something called Codeable. It is a Swift 4 library for serialization. It's actually made up of two protocols, encodeable and decodable. You can serialize and deserialize to and from JSON, property lists, and some other formats using codeable, using the Codeable API. It lets you leverage the…

Contents