c# - should web api content negotiation from xml to json insert @? -


i have xml document want return via web api call.

i want allow user option of response via content negotiation.

 [httpget]  public httpresponsemessage get()  {       var doc = new xmldocument();       doc.loadxml("<myexport someproperty='some value'></myexport>");        return request.createresponse(httpstatuscode.ok, doc);   } 

when request accept header of application/json get:

{   "myexport": {     "@someproperty": "some value"   } } 

is correct @ included in property name?

if why?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -