Convert to XML or JSON data with advanced options

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Conversion MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-conversion -- dnx GroupDocs.Conversion.Mcp --yes
Folders, licensing and more →

GroupDocs.Conversion provides the WebConvertOptions class to give you control over the conversion result while converting to JSON, XML or other web data formats. To convert your document to XML or JSON format, specify the desired format using the Format property.

The following code snippet shows how to convert a CSV spreadsheet to JSON format:

using (Converter converter = new Converter("sample.csv"))
{
    WebConvertOptions options = new WebConvertOptions
    {
        Format = WebFileType.Json
    };
    converter.Convert("converted.json", options);
}