How does this Twitter API result become automatically HTML formatted?

Vilag

New Member
I know that Twitter is API-centric, meaning that it, like all Twitter apps, retrieves its data via the API. When I access https://api.twitter.com/1/legal/tos.json (or .xml if you prefer) I am given a \[code\]JSON\[/code\] formatted result that only seems to contain plaintext and no additional formatting. That being said, if we assume that https://twitter.com/tos retrieves it's data from the same resource, how does it become formatted with hyperlinks, headings, etc.?I've noticed that there are line breaks \[code\]\n\[/code\] which break the \[code\]JSON\[/code\] response into multiple segments. Is there some post-processing of this data to replace certain numbers of line breaks with specific HTML tags?For example:\[code\]\n\n\n => <h3>\n\n => <p>Tip => <p class="tip>\[/code\]However, the above formatting rules would not account for the hyperlinks strewn throughout the page. Any thoughts?
 
Back
Top