Dictionary/Array JSON export without C2 wrapper

0 favourites
  • 3 posts
From the Asset Store
In this template the music plays without looping in your game
  • Hi (@Ashley),

    I have quite a bit of trouble with moving data via JSON export from Dictionaries and Arrays to other programs. I need to reparse all my structure to generate "genuine" JSON, and am still working on this code and its brittle. Its all lots of recursive structures, five levels down with an element of dynamism (some are four or three levels down, and some are five).

    It would be really great, if there was a JSON export geared for interoperability without C2s Dictionary and Array wrappers. This could then be imported straight into other programs -- such as Mathematica (where i want to do all the data visualization).

    thanks,

    Dan

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct 2's dictionary/array formats are not totally interoperable with JSON. For example you cannot have objects or arrays inside dictionary values. This is why C2 uses a variant of the format. It should not be difficult to convert between the two though (no recursion should be necessary!)

  • Thanks.

    In the end I (nested) looped (with conditions) through all the dictionary structures and used the JSON plugin to recreate JSON. Took some time to work out.

    Would there be value to have a compatible JSON export on dictionaries and arrays?

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