Learn Courses My Dashboard

Mod 2 Lesson 12 JSON Parsing

I am just starting this lesson and have recreated exactly what Chris has on his screen, yet I get the error "Consecutive statements on a line must be separated by ‘;’ ". Chris doesn’t have this error; why do I have it? I have checked that all the brackets, commas, etc. are there. Here are two screen shots. The one with the black background is Chris’ code; the one with the yellow background is mine.

I’m moving this to the app development category, because that’s the proper place to ask questions, not tutorial requests category.

You didn’t put a file extension on your file. You need to rename it called practice.json

Chris does not have the .json extension on his playground file. Why would I need to do so?

He’s not in a playground he’s in an iOS app that’s written in SwiftUI, and you can see on the top tab the file is data.json

Every file needs an extension

Oh. My Bad! LOl. thanks Michelle. this mod has so many playground and app files I got confused.
I don’t get any errors in the .json file. Thanks so much. I appreciate your help

1 Like