I have tried to use the Json.Convert method to get my content into xml however my html content is encoded (by json.net)
Note: I dont have access to the system.web dll
<br />
<br />
My class:
public class TemplateContent
{
public int ID { get; set; }
public string Name { get; set; }
public string VersionNumber { get; set; }
public string CoverPage { get; set; }
public string Body { get; set; }
}
I want the prop CoverPage - to be in straight up html without encodings
My code: first convert to json... (content is the above object)
var json = JsonConvert.SerializeObject(content);
return json;
then transform to xml
var myXmlNode = JsonConvert.DeserializeXNode(json, "Template");
Can this bit of the code JsonConvert.DeserializeXNode - be forced to decode the content? or leave the content as it is when converting into xml?
<Template>
<ID>14</ID>
<Name>name of report</Name>
<VersionNumber>1.0</VersionNumber>
<CoverPage>
<br />
<br />
<h3 style="text-align: center;">
<br class="GENTICS_ephemera" />
</h3>
<h3 style="text-align: center;">
<br class="GENTICS_ephemera" />
</h3>
<h3 style="text-align: center;">Property Valuation Report</h3>
</CoverPage>
<Body>
<h4 style="text-align: center;">Property Valuation Report</h4>
<p>
</p>
<p>
</p></Body>
</Template>
