# ParserException Class

> Base class of all JSON parser related exceptions which can be thrown when calling method MailMerge.MergeJsonData with an incorrect JSON string.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.Json`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Inherits:** `System.Exception`
- **Derived:** `TXTextControl.DocumentServer.Json.ExistingPropertyException`, `TXTextControl.DocumentServer.Json.InvalidCodePointException`, `TXTextControl.DocumentServer.Json.InvalidNumberFormatException`, `TXTextControl.DocumentServer.Json.MaxNestingDepthExceededException`, `TXTextControl.DocumentServer.Json.UnexpectedEndOfInputException`, `TXTextControl.DocumentServer.Json.UnexpectedTokenException`, `TXTextControl.DocumentServer.Json.UnknownLiteralNameTokenException`, `TXTextControl.DocumentServer.Json.UnknownParseErrorException`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.Json > ParserException Class
- **412 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-json/parserexception/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-json/parserexception/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-json/parserexception/llms-full.txt

---

### Description

Base class of all JSON parser related exceptions which can be thrown when calling method [MailMerge.MergeJsonData](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver/mailmerge/mergejsondata-method/llms-full.txt) with an incorrect JSON string.

### Syntax

```csharp
public abstract class ParserException : Exception
```

```vbnet
Public MustInherit Class ParserException
    Inherits Exception
```

### Examples

The following example includes the target site value from a Parser Exception object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Target Site: {parserException.TargetSite}");
Console.WriteLine("Parser Exception is ready for use.");
```

```vbnet
Console.WriteLine($"Target Site: {parserException.TargetSite}")
Console.WriteLine("Parser Exception is ready for use.")
```

---

## Nearby

- **Previous:** [InvalidNumberFormatException Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-json/invalidnumberformatexception/llms-full.txt)
- **Next:** [UnexpectedEndOfInputException Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-json/unexpectedendofinputexception/llms-full.txt)
