anchor.diff:                      | Some "System.Nullable`1" -> nble dD fo ta
                       | _ -> 
                           obj dD fo ta
  -            with e -> fun _ -> raise e
  +            with e -> fun _ -> raise (System.Exception("Error during RPC JSON conversion", e))
           if ta.Type = null then raise (NoEncodingException ta.Type) else
               match serializers.TryGetValue ta.Type with
               | true, x when Option.isSome (scalar x) ->
  
positive.code:     else
      let fs = getObjectFields t
      let ms = fs |> Array.map (fun x -> x :> System.Reflection.MemberInfo)
      let es = fs |> Array.map (fun f ->
          let ta = TAttrs.Get(i, f.FieldType, f)
          (i.GetEncodedFieldName f.DeclaringType f.Name,
           encodeOptionalField dE ta))
      fun (x: obj) ->
          match x with
          | null ->
  
negative.code:     let format info =
          {
              AddTag = addTag info
              GetEncodedFieldName = fun t ->
                  let typ = AST.Reflection.ReadTypeDefinition t
                  match info.Classes.TryGetValue typ with
                  | true, cls -> 
                      let fields = cls.Fields
                      fun f ->
                      match fields.TryGetValue f with
                      | true, (M.InstanceField n | M.OptionalField n) -> n
                      | true, M.IndexedField i -> string i
                      | true, _ ->
                          failwithf "A static field not serializable: %s.%s" 
                              t.FullName f                                          
                      | _ ->
                          failwithf "Failed to look up translated field name for %s in type %s with fields: %s" 
                              f typ.Value.FullName (cls.Fields.Keys |> String.concat ", ")
                  | _ ->
                      match info.CustomTypes.TryGetValue typ with
                      | true, M.FSharpRecordInfo fs -> 
                          fun f ->
                              fs |> List.pick (fun rf -> 
                                  if rf.Name = f then 
                                      Some rf.JSName
                                  else None)
                      | _ -> id
              GetUnionTag = defaultGetUnionTag
              EncodeUnionTag = defaultEncodeUnionTag
              GetEncodedUnionFieldName = fun _ i -> "$" + string i
  