简体   繁体   中英

How To Convert Weakly Typed JSON Into C# Readable Object

I have a WCF service that reads JSON from a Non .NET HTTP Request. I would like to use JSON.NET or some other tool to convert that JSON into a weakly typed object that can be read on the server side in C#. I hope not to have to create WCF data contacts for this process. I do not know the full schema of the returned JSON. Also, it may vary. I'm looking for something generic. Any suggestions on available tools for this task?

Thanks

it may vary but you have a few fixed types right? do you have types that will work for most situations?

Otherwise, maybe you can use DeserializeAnonymousType()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM