Load A Json File With the Auto-Correct function

0 favourites
  • 4 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hey everyone ,

    It seems bizarre , but loading an array doesn't work anymore , or is it my syntax that is the problem (?)

    Okay , How to reproduce

    I got a JSON code here

    {"c2array":true,"size":[5,5,1],"data":[[[0],[0],["Exit"],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],["Exit"],[0],[0]]]}

    I click on load ;

    I insert the code like this

    "{"c2array":true,"size":[5,5,1],"data":[[[0],[0],["Exit"],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0]],[[0],[0],["Exit"],[0],[0]]]}"

    but then , C2array is a syntax error

    I remove the ""

    but then {} are syntax errors

    and don't tell me to set the code to a variable , because I got 50 other codes to load ...

    Thanks for help

  • The Workaround right now should be installing an old version ...

    But We should have a function to remove auto-syntax in the future , What do you think of that Ashley ?

    Edit : Nevermind , the project was saved with an new version and won't work with the new ones . Is there an option to remove that or a way to hack the version and remove the Auto-Syntax ?

  • You need "" inside a string to indicate a single ". I wouldn't bother doing it that way, just import project files and AJAX request them, and then you never need to bother with these horribly messy expressions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmmm ... Never thinked about it this way

    Well , thanks for response !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)