Import json in quizapp

Hi,
I am trying to connect with my json-file in the quizapp…

// Get bundle path to json file
let path = Bundle.main.path(forResource: “QuestionData”, ofType: “json”)

I always get the message (when debugging), that xcode can´t find the url. I checked the code, I inserted a complete new json file - nothing helped.

Maybe you have a hint? Otherwise I will simply start from scratch and hope to find the mistake. :frowning:

Yours
Nina

HI Nina,

Add a period to the JSON extension, as in “.json” and run it again and see if that sorts it out.

Blessings,
—Mark

Thanks Mark for your reply!!!

I have no clue why, but somehow it worked out with my code perfectly well - I didn´t change anything…
But thanks for your support :blush: