I am using Json (object) to return JsonResult in ASP.Net MVC.
One of the properties of the object is a string that must be encoded in Base64.
public class MyClass
{
public string BlockOfText = "Hello World";
}
Must be converted to the following Json result
{
"BlockOfText" : "SGVsbG8gV29ybGQ="
}
How can I tell Json Serializer about encoding a Base64 property?
source
share