JSON.onParsed event?

  • Ok, so here's how I'm having to do this...

    My AJAX call gets a JSON as a response and when the AJAX succeeds I tell it to parse that JSON file.

    Because I see no JSON.onParsed event, I'm having to check every single cycle to see if a JSON.hasKey exists, whether it does or not. If the JSON.hasKey succeeds as a result of the JSON being successfully parsed, it then proceeds to fire every single cycle of the event sheet because the key DOES exist. So this means, that when the .hasKey is triggered as true, I'm having to immediately delete that key from the JSON so that .hasKey doesn't keep firing. And even then, every single cycle of the even sheet, it's still checking to see if that key exists, which IMHO, is a waste of CPU cycles.

    Now I could set it to trigger once while true but that means, if I do an AJAX call for the same JSON later with different data in the key, it won't fire.

    Please tell me I'm missing the .onParsed event.

    Tagged:

  • 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)