Ufxtract

Powerful, easy to use .Net microformats parser

Output to JSON-P

The UfDataToJSON data convertor allows you to output an JSON string from the parsed microformts. You can add a callback function name to the dataConvertor.Convert call. This will wrap the JSON object in a JavaScript function call. This is oftern refer to as JSON-P.

Code example

using UfXtract;

string url = "http://www.glennjones.net/about/";

UfWebRequest webRequest = new UfWebRequest();
webRequest.Load(url, UfFormats.HCard());

if (webRequest.Data.Nodes.Count > 0)
{
   UfDataToJson dataConvertor = new UfDataToJson();
   Response.ContentType = "application/json";
   Response.Write(dataConvertor.Convert(webRequest.Data, UfFormats.HCard(), "myFuction"));
}
Download Code MIT Open Source License About the UfXtract .Net library

Output formats

Formats

Inputs

.Net

Reporting and Errors