Windows Runtime – Special Characters in JSON (Parsed as HTML)


My app in progress uses a JSON data file that is parsed as HTML so that I can add bold and other useful HTML attributes to my data.

Until today, none of the special characters that I used within my bold tags presented any issues: *, ?, [ ], { }, !, >, >>

But, when I got the to the less than sign it was parsed as the opening of another HTML tag, and broke my lovely bold tags!

The solution was simple enough – simply encode the less than sign as I would in standard HTML, thus: <

So even though it works on WordPress, this is wrong:


And this is right:


Happy coding!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s