anchor.diff:  					   []
   				   end ++ EncAcc
   		       end,
  +		       if AlreadySeen or not JSONEnabled ->
  +			       EncJSONAcc;
  +			  true ->
  +			       Call = make_function_call(
  +                                        make_enc_fun_name(ModName, Mod,
  +                                                          [Tag, json]),
  +                                        [Var]),
  +                               BRecName = atom_to_binary(H, utf8),
  +                               ResJSON = ?AST(['?a(BRecName)', '?Call']),
  +			       [erl_syntax:clause(
  +				  [?AST('?EncodeResult' = '?Var')],
  +				  none,
  +                                  [ResJSON])] ++ EncJSONAcc
  +		       end,
   		       if IsDuplicated ->
   			       NSAcc;
   			  HasXMLNSAttr ->
  
positive.code: 		       end,
  		       [Result|Seen]}
                    catch _:_ ->
                            {EncAcc, NSAcc, TagAcc, Seen}
                    end
            end, {[], [], [], []}, TaggedSpecs),
      if EncClauses /= [] ->
  	    [erl_syntax:function(?AST(do_encode), EncClauses)];
         true -> []
      end ++
      if TagClauses /= [] ->
  
negative.code:     get_fun_return_type(Fun, FunSpecs, dict:new()).
  
  get_fun_return_type({dec_enum, [Atoms]}, _, _) ->
      %% TODO: erl_types:t_atoms restricts the number of atoms to 13, this is a
      %% hack to allow any number of atoms
      %erl_types:t_atoms(Atoms);
      {c, atom, lists:usort(Atoms), unknown};
  get_fun_return_type({dec_int, [Min, _]}, _, _) ->
      if Min > 0 ->
              erl_types:t_pos_integer();
  