anchor.diff:              for KeyValue(k, v) in d :> seq<_> do o?(k) <- encEl v
               o)
   
  +[<JavaScript>]
  +module private Decode =
  +
  +    let Tuple (decs: (obj -> obj)[]) = Encode.Tuple decs
  +
  +    let List (decEl: obj -> 'T) =
  +        box (fun (a: obj[]) ->
  +            List.init a.Length (fun i -> decEl a.[i]))
  +
  +    let Set (decEl: obj -> 'T) =
  +        box (fun (a: obj[]) ->
  +            Set.ofArray(Array.map decEl a))
  +
  +    let Array decEl = Encode.Array decEl
  +
  +    let StringMap (decEl: obj -> 'T) =
  +        box (fun (o: obj) ->
  +            let m = ref Map.empty
  +            JS.ForEach o (fun k -> m := Map.add k o?(k) !m; false)
  +            !m)
  +
  +    let StringDictionary (decEl: obj -> 'T) =
  +        box (fun (o: obj) ->
  +            let d = System.Collections.Generic.Dictionary()
  +            JS.ForEach o (fun k -> d.[k] <- o?(k); false)
  +            d)
  +
   [<AutoOpen>]
   module private Macro =
   
  
positive.code:     let cCall t m x = J.Call (t, cString m, x)
      let cCallG l m x = cCall (J.Global l) m x
      let cCallE m x = cCallG ["WebSharper"; "Json"; "Encode"] m x
      let (|T|) (t: R.TypeDefinition) = t.FullName
      let (>>=) (m: Choice<E, string> as x) (f: E -> Choice<E, string>) =
          match m with
  
negative.code: 
          interface M.IMacro with
              member this.Translate(q, tr) =
                  match q with
                  // Deserialize<'T> x
                  | Q.CallModule({Generics = [t]}, [x]) ->
                      match encode cCallD t with
                      | Choice1Of2 dec ->
                          J.Application(dec, [cCallG ["JSON"] "parse" [tr x]])
                      | Choice2Of2 msg ->
                          failwithf "%A: %s" t msg
                  | _ -> tr q
  
  /// Serializes an object to JSON using the same readable format as Sitelets.
  /// For plain JSON stringification, see Json.Stringify.
  