c# - Custom names when for FromUrl formatter -


before anything, let's @ example code

public class somerequest {     [jsonproperty("_desc")]     public string description {get;set;}      [jsonproperty("_index")]     public int startindex {get;set;} } . . . public httpresponsemessage get([fromuri] somerequest request) { ... } 

alright on post methods, somerequest deserialized , used custom names (_index , _desc) way not names wanted make point. when using method, though, full name of property have used in uri because formatter fromuri used while post method jsonformatter used. i'm looking way use custom names formatter way did json in post method.

thanks, peyman mo

use urldecode , urlencodeunicode methods of httputility class. read more here.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -