c# - Map Json to Dictionary -
i trying map json dictionary. before had dictionary key of type 'long' . after realizing mapping happen key needs of type 'string or 'object'.
now type definition in c# :
public class styleitemcreatecommand { public long styleid { get; set; } public dictionary<string, string> selecteditemtocolormap { get; set; } }
and json generating this:
{"styleid":"1710","selecteditemtocolormap":{"1391":"583","21531":"7733"}}
but still somehow not beingness mapped. using asp.net mvc controllers service, beingness consumed jquery client.
mvc method signature following:
[httppost] public actionresult create(styleitemcreatecommand command) { }
the dictionary object null. help appreciated. thanks.
now after searching around web found out asp.net mvc not gonna implicitly. found reply : [http://stackoverflow.com/a/15220050/756722]
c# jquery asp.net-mvc json
No comments:
Post a Comment