Generally for logging purposes I'm need to convert object to Json sting. It is very helpful to keep track of incoming or outgoing objects. It is very easy but some time hard to remember as well. So It is better to keep this object to json conversion code here.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myObjectAsJsonStringInCSharp = Newtonsoft.Json.JsonConvert.SerializeObject(myObj); |
No comments:
Post a Comment