Likely an easy Git question--code error in creating JSON object?

Hello again all,

Another question, this time in the Git lessons at the beginning. I’ve entered in the text, tried it with and without any whitespace and am still failing the code check. I am really not sure what I am doing incorrectly in creating this JSON object.

The code editor that I am using is Nano in the terminal window in CodeAlly. I do have gmail and github open so am authenticating.

Not sure where I am entering it incorrectly?

Directions in the step:

You can see the commit you made. It shows the message you gave with the commit, along with your username, email, the date, and a commit hash. The hash is that long string of characters. Open up your .json file and create an object with a reference for how to create a database that looks like this:

  "database": {
    "create": "CREATE DATABASE database_name;"

Make sure there’s one empty line at the bottom of the file and no extra spaces after the value or any of the curly brackets.

I don’t know, I haven’t done these challenges.

I do find all the extra white space before "create" to be a little troublesome. It’s not a violation of JSON but it says it’s being picky about other whitespace issues so maybe it’s being picky about that too, or maybe you have some unseen whitespace issues.

Try again. Make sure the indenting is correct, indenting two spaces. Make sure you do not have extra whitespace at the end of lines. Make sure there is an empty line at the bottom.

1 Like

I’ve went up to this step to try to reproduce issue. On my first try test passed without problems. However nano seem to be adding one empty line when writing something in the blank sql_reference.json after it’s created. Not being aware of that might lead to adding another blank line, what would make them two, and test wouldn’t be happy about it.

1 Like

Thanks again @sanity . I had not realized that nano sneaks in an extra blank line.

I did not press enter after the last brace and that was the trick!