proliferation of backslashes during dictionary json "export"

  • Hi,

    In my game I have a dictionary that holds the json of another dictionary that holds the json of another dictionary that holds ... you get it ... about 5 levels down ...

    When i export the json of the "root" dictionary and save the generated text in a file I get a backslash "\" (probably escape chars) for each json in json, so i end up with a file that has lots of these \\\\\" \\\\\".

    Is this a bug of a feature? I.e. is this necessary for json export import to work or is this a bug.

  • " and ' need are the standard string encapsulation markers. Everything inside "" or "" is the value of the string.

    "this is a string"

    'string is a string'

    So what happens if you have "This is a "embedded" string"?

    Is Embedded inside a string? no it's not. infact this would just break the string and now the word embedded is out the string and sitting in the code as meaning less code. That then breaks code and not just the string.

    There are two solutions.

    "this is an 'embedded' string where we switch string closing types"

    or

    'this is another \"embedded string string where we use an embedding marker for nesting more \\"strings inside\\" other\" strings"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok.thanks. its a feature

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