From 85cfc5b016bc363153d2f5118f0961dd309a1833 Mon Sep 17 00:00:00 2001 From: Eugene Nikolsky Date: Wed, 19 Sep 2018 11:31:57 -0700 Subject: [PATCH] README: replace the `<|` operators with `[]` in the example This is to follow-up the [PR][] that removed `<|` operators from the code. [PR]: https://github.com/thoughtbot/Argo/pull/488 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bdf6665..50dab98 100644 --- a/README.md +++ b/README.md @@ -110,12 +110,12 @@ struct User { extension User: Decodable { static func decode(_ json: JSON) -> Decoded { return curry(User.init) - <^> json <| "id" - <*> json <| "name" - <*> json <|? "email" // Use ? for parsing optional values - <*> json <| "role" // Custom types that also conform to Decodable just work - <*> json <| ["company", "name"] // Parse nested objects - <*> json <|| "friends" // parse arrays of objects + <^> json["id"] + <*> json["name"] + <*> json[optional: "email"] // Use `[optional:]` for parsing optional values + <*> json["role"] // Custom types that also conform to Decodable just work + <*> json["company", "name"] // Parse nested objects + <*> json["friends"] // parse arrays of objects } }