Downloaded JSON solutions are not understandable

Thanks for the answer :slight_smile:

Can you elaborate on why JSON files are saved in this format? When I open a javascript or other file with code in it, new lines don’t display as \n

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings

I understand what escape characters are and why they’re used - but why are they used inside JSON files, and not HTML files (for example) ?

Escape characters are necessary for formatting strings in JavaScript. JSON is JavaScript Object Notation. In order for the code to show up in the editor window broken into lines with indentation, the escape characters need to be there. Otherwise it would all be one long line.

Hi dude, I was dealing with this task for a friend, and as I was typing up my notice of creating a tool for this, your topic popped up. Here ya go:

10 Likes

Always nice to know that this isn’t ruled by bots, and get a nice help once in a while, thanks vipatron :slight_smile:

2 Likes

You’re welcome. I really hope you don’t mean @ArielLeslie . Nobody, not even Google, is that good at the Turing test (yet).

2 Likes

ye ye i know, it’s quite helpfull, just a bit annoying when you are desperate for an answer and gives you something completely unrelated arghhh

1 Like

Fair enough. I’m redoing the React challenges. When I get bored later today, I’m planning on adding new functionality that lets you:

  1. upload the .json file from your computer
  2. Save the first file in the .json under the name provided (although maybe a checkbox to allow the option of *.json => *.[js|html|css]
1 Like

ex machina

2 Likes

That sounds awesome,
Atm i’m just saving it to a copy of gitbook which saves it to a md that i can use to search for answers…
So having this problem just ended up me having a better documentation structure although having something to easily parse it makes my life way easier if i ever need to do it. :slight_smile: thanks
Also regarding Ariel, thank god she can’t pass the turing test otherwise we would have to start taking cover in zion or something…

1 Like

In the event that the JSON record includes the difficulties you need, at that point, you have to locate the key for the test you’re occupied with. The esteem will be the arrangement code as a string. When you parse the string the majority of the got away characters will be exhibited as their parsed partners.


Read Ecchi Manga

Wait… Is @ArielLeslie a bot.? :face_with_monocle: Maybe I’m missing something…

2 Likes

are you human

3 Likes

@Elthask For formatting JSON you might also try a text editor extension that can prettify the code. Here’s a link to an extension I have installed on Atom:

2 Likes

Thank you so much.
I was struggling with this and this solves the issue perfectly!

1 Like

So over on the slack learning buddies group, the question came up as well. I wrote a little codepen that will allow you to upload your downloaded file, and parse out the index bit, displaying it in a readable format.

Hope it helps.

Sweet! That will be a welcome change.