How do I import a JSON file without errors? [SOLVED]

0 favourites
  • 1 posts
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • I have imported JSON files into C3 before, but I'm having an issue with my latest JSON file.

    After the import, I double click on the file and I just see a bunch of text:

    {"c2array": true, "size": [334, 6, 1], "data": [[["6/6/2023"], ["muck"], ["tithe"], ["rout"], ["I've recently been reading a really interesting book... 
    

    Normally when this happens I can find a little red underline that tells me why (and where) the import failed, but there doesn't seem to be one. I copied all of the text and pasted it into a JSON validator. It tells me the file is valid!

    The only potential clue I have is that the text between quotes is maroon until about halfway through. After that all the text is black. Is this an indication of a potential issue? I've looked at the spot with the color change and everything looks fine.

    There are no visible errors in C3 and JSON Lint says the file is valid. How do I find the problem? Not sure where to look.

    UPDATE: I had chatGPT re-write my export code and after a few iterations it seems to be working now!

    The non-working version had the brackets and values on the same line. The working version has everything on different lines. Both are valid JSON formats, but perhaps C3 needs the new lines?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)