HomeSQL ServerSQL Server Error Msg 13609 – JSON text is not properly formatted. Unexpected character ‘%lc’ is found at position %d.

SQL Server Error Msg 13609 – JSON text is not properly formatted. Unexpected character ‘%lc’ is found at position %d.

In this blog post, let’s learn about the error message “13609 – JSON text is not properly formatted. Unexpected character ‘%lc’ is found at position %d.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.

SQL Server Error Message

13609 – JSON text is not properly formatted. Unexpected character ‘%lc’ is found at position %d.

Reason for the Error

The SQL Server error message 13609 – “JSON text is not properly formatted. Unexpected character ‘%lc’ is found at position %d” occurs when you try to insert JSON data into a column, but the JSON text is not well-formed, meaning it does not conform to the syntax rules of JSON.

JSON is a text-based data format that uses a specific syntax to represent data. JSON data must be formatted correctly to be parsed and used by an application. The error message 13609 indicates that there is an unexpected character in the JSON text at a specific position.

For example, consider the following JSON text:

{
    "name": "John",
    "age": 30,
    "city": "New York"
    "state": "NY"
}

In this example, a comma is missing after the “city” property. This would result in the error message 13609 with the following details:

  • The unexpected character is the letter “s” in “state”
  • The position of the unexpected character is 52, which is the position of the “s” in “state”

Solution

To fix this error, you need to correct the JSON text to ensure that it is well-formed. In the example above, you would need to add a comma after the “city” property:

{
    "name": "John",
    "age": 30,
    "city": "New York",
    "state": "NY"
}

By ensuring that the JSON text is properly formatted, you can avoid the error message 13609 and successfully insert the JSON data into the column.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

When dealing with a relational database management system (RDBMS) like SQL Server, compatibility level is an important concept to understand....
In this blog post, let’s learn about the error message “49975 – Unable to load controller client certificate due to...
In this blog post, let’s learn about the error message “49973 – Cannot remove tempdb remote file to local tempdb...