Friday , April 19 2024

JSON text is not properly formatted

If you are processing JSON data and the JSON data is not a valid JSON below error will be occurred.

Msg 13609, Level 16, State 7, Line 13

JSON text is not properly formatted. Unexpected character is found at position.

Be sure that the JSON data is correct. You can check whether its correct or not using ISJSON function. You can find detailed information about JSON functions in the article named “JSON Functions in SQL Server(TSQL)

For Example execute the below script. As you can see an error will be occured.

If you change the JSON data as below, the problem will be corrected.

You can find online json formatter to check your json is valid on the web.

In addition you can find usefult json examples on article JSON Comment Tutorial with Examples

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

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

Categories