Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why json file is giving unexpected enfd of string waring?

I’m not used to working on json files. As shown in the image below, when I copy the content in PublicPem field of json file, it shows red curly lines at three places, and gives me the warning Unexpected end of string. Question: How can we fix this error – and what’s the cause of the error?

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Have you checked to make sure there’s no new line characters? Paste the JSON into a text editor and make sure it is plain text with no unprintable characters, like newline. Since your publicPem entry is so neatly formatted and your privatePem entry goes past, I bet this is the problem and hence the unterminated string error.

You could also try pasting the JSON into an online JSON formatter.

p.s. Next time asking a question like this, post the text and not an image. Then someone who answers the question could actually check that for you.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading