W051Warning

Control escape in a Windows path

An escape like \t is a control character in what looks like a path.

What it means

In a string, \t is a TAB, \n a newline, and \b a backspace — not a backslash followed by a letter. A value like "C:\temp" therefore contains a tab and a partial path, which is almost never intended.

Example

Invalid
{ "dir": "C:\temp" }
Valid
{ "dir": "C:\\temp" }

How to fix it

Double every backslash so the path is literal: C:\\temp.

Validate your JSON to see this and every other issue highlighted in one pass.


Diagnostics on this page come from @jsonlint/core, the open-source engine that powers the JSONLint validator. Install it with npm install @jsonlint/core.