In my VC++ project, I have a server response that looks like this that gets assigned to a System::String:
{
"someValue": "1",
"someObject": {
"content": "<div id=\"someContent\">text<\/div>"
}
}
The true JSON object is a little more complex, but the above demonstrates that the JSON object has some values containing HTML. The response also contains escaped characters.
As I'm using .NET, I'd like to know the best option to:
- Read the JSON object
- Convert the HTML string to unescaped HTML that can be read with my HTML parser
My previous approach to unescaping the HTML in these types of responses was to use the .NET method Replace.
Aucun commentaire:
Enregistrer un commentaire