Click here to Skip to main content
14,774,504 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everybody,

I tried to pass an object variable to Newtonsoft.Json.JsonConvert.DeserializeObject, and I know you only can pass string variables, anyone knows what is the way to convert the next value storage in my object variable:

"[{"UdcCode":"ATTACHMENT_EDIT_MODE","UdcId":"EDIT_MODE_CREATE","UdcName":"CREATE",
"UdcValueA":"CREATE","UdcValueB":null,"UdcValueC":null,"UdcValueD":null,"ParentUdcCode":null,"ParentUdcId":null,
"CreatedDate":"/Date(1430865340205)/","UpdatedDate":"/Date(1430865340205)/","CreatedUser":"SISTEMA",
"UpdatedUser":null,"Source":null,"UdcValueE":null,"UdcValueF":null,"UdcValueG":null,"UdcValueH":null,
"UdcValueI":null,"UdcValueJ":null,"UdcValueK":null,"UdcValueL":null,"UdcValueM":null,"UdcValueN":null,
"UdcValueO":null,"ParentEntityName":"UDC","ParentEntityKeyId":"56e785a7-4e47-471f-bfc4-d9b8bc0a529e"}]"

And then use Newtonsoft.Json.JsonConvert.DeserializeObject to cast that information to some business entity.

Thanks!!
Posted
Comments
   
And what's your question?
—SA
BillWoodruff 6-May-15 5:24am
   
This is unclear. What is the "object" you serialized with JSON in the first place: what is its structure ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900