Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.2K
Views
JSON Parsing Issue - 'S' is an invalid escapable character within a JSON

I have the following JSON in appsettings file , it has a connection string.

 {
      "Logging": {
        "LogLevel": {
          "Default": "Warning"
        }
      },
      "ApplicationInsights": {
        "InstrumentationKey": "8eje88w0-1509-4ae0-b58c-1a7ee5b9c7e4"
      },
       "ConnectionStrings": {
        "DefaultConnString": "Server=MYPC\SQLEXPRESS;Database=CoreService.Mark;Trusted_Connection=True;"
      },
      "AllowedHosts": "*"
    }

But upon executing the program.I keep getting the following error.I tried to find any errors,but could not locate any.Please advice

Unhandled exception. System.FormatException: Could not parse the JSON file.
 ---> System.Text.Json.JsonReaderException: 'S' is an invalid escapable character within a JSON string. The string should be correctly escaped. LineNumber: 10 | BytePositionInLine: 42
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In your ConnectionStrings. DefaultConnString field, you're escaping S (before SQLExpress;). As the error suggests, you can't do that.

You can fix this by adding another escape character (backslash, \) in front of the pre-existing one. Backslashes are escapable characters and the end result will be the wanted one, you'll get one backslash in that position.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!