[plugin] JSON (import/export/generate/edit/inspect/...)

0 favourites
From the Asset Store
I18N - Translation plugin
$7.20 USD
10% off
The I18N (Translation) is a Construct plugin created to translate text in game.
  • I agree it's kind of a mess right now, so fair enough.

    C3 that is.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • uhm, excuse me. I can't do "Load JSON" with this plugin.

    I tried making JSON and load it but don't work. Then I try yours from github.com/FrenchYann/JSON_for_construct2 but still won't work.

    It gave me message above.

    But it worked with event

    Where did I go wrong? How to fix this? Thank you <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Here is the input:

    "{

    "Wizard": {

    "stats": {

    "hp":80,

    "mp":120,

    "str":2,

    "dex":2,

    "int":16

    },

    "spells": [ "Fireball", "Poison", "Meteor", "Ice Storm" ]

    }

    }"

    EDIT

    nevermind.

    I changed the jSON to below and works.

    {

    ""Wizard"": {

    ""stats"": {

    ""hp"":80,

    ""mp"":120,

    ""str"":2,

    ""dex"":2,

    ""int"":16

    },

    ""spells"": [ ""Fireball"", ""Poison"", ""Meteor"", ""Ice Storm"" ]

    }

    }

  • Hi ,

    I am calling below mentioned function in browser object. How to read the "resp" of this function in construct 2.

    If any one is having answer of this question please help.

    Browser.ExecJS("parent.saveGameScore ? parent.saveGameScore(" & lastscore & ", function (resp) {

    }) : console.log(122)")

    Thanks

  • Print the resulting string by inserting the browser plugin and in the action Browser: log(JSON.AsJson(0)). Then visit this site to check if the json is valid: JSON validator: jsonformatter-online.com

  • I just released a tiny new version with some minor bug fixes.

    More details on the first post or github (:

    JSON v1.2.2

    And I just noticed this plugin is still in the "Work in Progress Addons" section...

    I think it's stable enough to be promoted to the "Completed Addons" section.

    What d'ya think?

  • And I just noticed this plugin is still in the "Work in Progress Addons" section...

    I think it's stable enough to be promoted to the "Completed Addons" section.

    What d'ya think?

    Moved, per request.

  • zenox98

    4 years of dev, this plugins is AAA :D

  • Hey;

    I have a question. I try to reach ,"name":"KAFE", on this json;

    {"meta":{"code":200,"requestId":"asdasdasd"},"response":{"cafes":[{"id":"222sssaaa","name":"KAFE","contact":{"twitter":"kafe","instagram":"kafe","facebook":"213","facebookUsername":"kafe","facebookName":"kafe"},"location":{....................................[/code:3ic9x8qe]
    EDİT :  Resolved.
  • Yann or anyone else...

    I am trying to understand this plugin but im lost...

    I need to set data from this json: https://api.ipdata.co/ into my global variables. Is there any capx example on how to do this?

    lets say i want to set latitude to mine LAT variable.... how to do this?

    Thanx!

  • irina

    there

    if you are curious about the 0 in JSON.Value(0,"latitude") it means "from the root" of the object, as opposed to 1 which would mean "from current path" (used for loops and recursion)

  • Thanx!

  • I'm trying to get json from my url, but cant load to AJAX.LastData

    If i see your template is fine and work with your url but not for me

    here my capx https://drive.google.com/open?id=17VALJNbzh_RxBUGIa_1bj4NluT-1kpPs

    do i make a mistake on capx or json file?

    btw, json file is generated from php (get data from database mysql).

  • I can't access http://assets.marmisdev.win/result.json so I can't be sure but if I had to guess, you might not have sent proper headers from your server.

    in php you could try that (before any output)

     header("Access-Control-Allow-Origin: *");[/code:2mmfn43p]
  • sorry, move to http://tester.marmisdev.win/result.json

    I can access the url with enable CORS plugin on firefox.

    I can't access http://assets.marmisdev.win/result.json so I can't be sure but if I had to guess, you might not have sent proper headers from your server.

    in php you could try that (before any output)

     header("Access-Control-Allow-Origin: *");[/code:16y3kqai]
    

    I've also placed at the beginning of the .php file but still can't.

  • from https://api.ipdata.co/

    it works

    now using http://tester.marmisdev.win/result.json

    you can easily see that you don't send the proper cors header, and that's what construct is complaining about

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