@@ -11,7 +11,7 @@ import Control.Alt ((<|>))
1111import Data.Argonaut.Core (Json)
1212import Data.Argonaut.Core (Json, jsonEmptyObject, jsonNull) as J
1313import Data.Argonaut.Decode.Class (decodeJson) as J
14−import Data.Argonaut.Decode.Combinators ((.?))
14+import Data.Argonaut.Decode.Combinators ((.:))
1515import Data.Argonaut.Encode.Class (class EncodeJson, encodeJson) as J
1616import Data.Argonaut.Encode.Combinators (extend) as J
1717import Data.Array as A
@@ -59,7 +59,7 @@ derive newtype instance ordElement ∷ Ord Element
5959
6060decodeElement ∷ Json → Either String Element
6161decodeElement = J.decodeJson >=> \obj →
62− map Element $ obj .? "element-6066-11e4-a52e-4f735466cecf" <|> obj .? "ELEMENT"
62+ map Element $ obj .: "element-6066-11e4-a52e-4f735466cecf" <|> obj .: "ELEMENT"
6363
6464encodeElement ∷ Element → Json
6565encodeElement (Element eid) = J.encodeJson $ FO.fromFoldable
@@ -77,8 +77,8 @@ type CreateSessionResponse =
7777
7878decodeCreateSessionResponse ∷ Json → Either String CreateSessionResponse
7979decodeCreateSessionResponse = J.decodeJson >=> \obj → do
80− session ← decodeSessionId =<< obj .? "sessionId"
81− capabilities ← decodeCapabilities =<< obj .? "capabilities"
80+ session ← decodeSessionId =<< obj .: "sessionId"
81+ capabilities ← decodeCapabilities =<< obj .: "capabilities"
8282 pure { session, capabilities }
8383
8484type ServerStatus =
@@ -87,7 +87,7 @@ type ServerStatus =
8787 }
8888
8989decodeServerStatus ∷ Json → Either String ServerStatus
90−decodeServerStatus = J.decodeJson >=> \obj → { ready: _, message: _ } <$> obj .? "ready" <*> obj .? "message"
90+decodeServerStatus = J.decodeJson >=> \obj → { ready: _, message: _ } <$> obj .: "ready" <*> obj .: "message"
9191
9292type Timeouts =
9393 { script ∷ Milliseconds
@@ -97,9 +97,9 @@ type Timeouts =
9797
9898decodeTimeouts ∷ Json → Either String Timeouts
9999decodeTimeouts = J.decodeJson >=> \obj → do
100− script ← map Milliseconds $ obj .? "script"
101− pageLoad ← map Milliseconds $ obj .? "pageLoad"
102− implicit ← map Milliseconds $ obj .? "implicit"
100+ script ← map Milliseconds $ obj .: "script"
101+ pageLoad ← map Milliseconds $ obj .: "pageLoad"
102+ implicit ← map Milliseconds $ obj .: "implicit"
103103 pure { script, pageLoad, implicit }
104104
105105encodeTimeouts ∷ Timeouts → Json
@@ -142,20 +142,20 @@ type Rectangle =
142142
143143decodeRectangle ∷ Json → Either String Rectangle
144144decodeRectangle = J.decodeJson >=> \obj → do
145− width ← obj .? "width"
146− height ← obj .? "height"
147− x ← obj .? "x"
148− y ← obj .? "y"
145+ width ← obj .: "width"
146+ height ← obj .: "height"
147+ x ← obj .: "x"
148+ y ← obj .: "y"
149149 pure { width, height, x, y }
150150
151151decodeRectangleLegacy ∷ { size ∷ Json, position ∷ Json } → Either String Rectangle
152152decodeRectangleLegacy { size, position } = do
153153 sobj ← J.decodeJson size
154154 pobj ← J.decodeJson position
155− x ← pobj .? "x"
156− y ← pobj .? "y"
157− width ← sobj .? "width"
158− height ← sobj .? "height"
155+ x ← pobj .: "x"
156+ y ← pobj .: "y"
157+ width ← sobj .: "width"
158+ height ← sobj .: "height"
159159 pure { width, height, x, y }
160160
161161encodeRectangleLegacy ∷ Rectangle → { size ∷ Json, position ∷ Json }
@@ -254,13 +254,13 @@ encodeCookie r = J.encodeJson $ FO.fromFoldable
254254
255255decodeCookie ∷ Json → Either String Cookie
256256decodeCookie = J.decodeJson >=> \obj → do
257− name ← obj .? "name"
258− value ← obj .? "value"
259− path ← maybify $ obj .? "path"
260− domain ← maybify $ obj .? "domain"
261− secure ← maybify $ obj .? "secure"
262− httpOnly ← maybify $ obj .? "httpOnly"
263− expiry ← maybify $ obj .? "expiry"
257+ name ← obj .: "name"
258+ value ← obj .: "value"
259+ path ← maybify $ obj .: "path"
260+ domain ← maybify $ obj .: "domain"
261+ secure ← maybify $ obj .: "secure"
262+ httpOnly ← maybify $ obj .: "httpOnly"
263+ expiry ← maybify $ obj .: "expiry"
264264 pure
265265 { name
266266 , value