anchor.diff:  				   || {enum, _, E1, I1} <- En] ];
   type_to_text({type, _, <<"boolean">>, _}) ->
       "\"1\" (true) | \"0\" (false)";
  +type_to_text({type, _, <<"union">>, Ts}) ->
  +    [ "One of:", [["~n* ", type_to_text(T)] || T <- Ts] ];
   type_to_text({type, _, T, _}) ->
       T;
   type_to_text(T) when is_binary(T) ->
  
positive.code: rpc_params([{anyxml,_,N,Is}|T], Data, Imports) ->
      [{binary_to_list(N), "", descr(Is), anyxml}
       | rpc_params(T, Data, Imports)];
  rpc_params([{list,_,N,Items}|T], Data, Is) ->
      [{binary_to_list(N), {array, [{struct, rpc_params(Items, Data, Is)}]},
        descr(Items), type(Items, Data, Is)}
       | rpc_params(T, Data, Is)];
  rpc_params([_|T], Data, Is) ->
      rpc_params(T, Data, Is);
  rpc_params([], _, _) ->
      [].
  
  markdown(File, JSON) ->
      case file:open(File, [write]) of
  
negative.code: 	[] ->
  	    error({type_error, [X, T]})
      end;
  to_json_type(X, {type, _, <<"union">>, Ts} = Type) ->
      to_json_type_union(Ts, X, Type);
  to_json_type(X, _) ->
      X.
  
  to_json_type_union([T|Ts], X, Type) ->
      try to_json_type(X, T)
      catch
  	error:_ ->
  	    to_json_type_union(Ts, X, Type)
      end;
  to_json_type_union([], X, Type) ->
      error({type_error, [X, Type]}).
  
  json_rpc(YangFile) ->
      json_rpc(YangFile, []).
  