Bad JSON escape sequence: \v - the war stories


Yesterday I did a small C# program for hash data in JSON. The are many files, which contains a lot of lines with JSON :)
I was using Json.NET the most popular JSON library for .NET.

One in 200000000 lines (the number is correct) was bad. It was like this:

{"data": {"str_1": "' \u001e\v \u0003\u001f"\u0003\u001d %\b)\v#"}}

And I receive an exception: Bad JSON escape sequence: \v. Path 'data.str_1', line 1, position [number]

\v is equal to vertical tab which is |

Google results

The first thing I did was to search Google for '\v' in JSON
I was looking for phrase like this: bad JSON escape sequence: \v.. The first result was How to escape special characters in building a JSON string on StackOverflow. There I founded that:

See this list of special character used in JSON : \b Backspace (ascii code 08) \f Form feed (ascii code 0C) \n New line \r Carriage return \t Tab \v Vertical tab \' Apostrophe or single quote (only valid in single quoted json strings) \" Double quote (only valid in double quoted json strings) \\ Backslash caracter

More over I found a source of above quote:

Next step: question on SO about Newtosoft.Json

I created a new question on SO: Newtosoft.Json Bad JSON escape sequence: \v.
Because I didn't receive any useful answer I decided to fix Newtosoft.Json. My decision appears as a pull request
Unexpectedly James Newton-King reject it and point me that \v is not valid according to spec on


Moreover he is right. According to both: RFC 4627 and which is same as ECMA-404 The JSON Data Interchange Standard the \v is not valid

Sum up

The unlucky escaped char took one day of my life. But I learn something new, so it is not a lost day

I also created a comment on and I hope they fix the definition.

The funny part is that some JSON validators accept \v some not :)

Below is a table with some JSON validators from first page on Google search

JSON validator Error on \v Remarks Show error Show valid Information sent Show error Show error Show error Show valid Show error