Click here to Skip to main content
15,071,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
"ConnectionStrings": {
        "DefaultConnection": "Server=NDUATI-PC\SQLEXPRESS;Database=demoWebApp;Trusted_Connection=True;MultipleActiveResultSets=true"
    },


What I have tried:

I've tried adding @ before the connection string
"DefaultConnection": @"Server=NDUATI-PC\SQLEXPRESS;Database=demoWebApp;Trusted_Connection=True;MultipleActiveResultSets=true"

Which brings up a new error message that says 'unexpected character sequence in member value'
Posted
Updated 13-Oct-21 19:21pm

1 solution

Quote:
How do I solve the invalid escape sequence "\S" error in this json

Try to replace \ with \\
"ConnectionStrings": {
        "DefaultConnection": "Server=NDUATI-PC\\SQLEXPRESS;Database=demoWebApp;Trusted_Connection=True;MultipleActiveResultSets=true"
    },

JSON.simple - Escaping Special Characters[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900