From b531c21d870a86b286e1d598b130f9859b8371c7 Mon Sep 17 00:00:00 2001 From: Tristan Himmelman Date: Fri, 23 Jan 2015 12:21:33 -0500 Subject: [PATCH] removed references to MapperProtocol in Readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b7b00b47..979c4ae8 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ class User: Mappable { required init(){} - // MapperProtocol + // Mappable func map(mapper: Mapper) { username <= mapper["username"] age <= mapper["age"] @@ -37,7 +37,7 @@ class User: Mappable { } } -struct Temperature: MapperProtocol { +struct Temperature: Mappable { var celcius: Double? var fahrenheit: Double? @@ -50,7 +50,7 @@ struct Temperature: MapperProtocol { } ``` -Once your class implements MapperProtocol, the Mapper class handles everything else for you: +Once your class implements Mappable, the Mapper class handles everything else for you: Convert a JSON string to a model object: ```swift @@ -71,9 +71,9 @@ Object mapper can map classes composed of the following types: - Array\ - Dictionary\ - Optionals of all the abovee -- Object\ -- Array\ -- Dictionary\ +- Object\ +- Array\ +- Dictionary\ ##Custom Transfoms ObjectMapper also supports custom Transforms that convert values during the mapping process. To use a transform, simply create a tuple with the mapper["field_name"] and the transform of choice on the right side of the '<=' operator: