The purpose of this Plugin is to allow you to work with complex Json objects from within the event system. High level Objectives include

  1. Load multiple json files at one time.
  2. Each file represents a json object and can be loaded into a named slot.
  3. Query and set values from the Json file using standard javascript notation.
  4. Loop over sub object arrays and nested sub object arrays and retrieve and set values.
  5. Allow Caching to be utilized if required so that json changes will be available during the next run but without altering the json files themselves.
  6. Allow an altered slot to be reset back to original json
  7. Get the length of an array within the json object based on standard javascript notation.
  8. Create a new json slot from a copy of a sub object from another slot based on a query.
  9. Create a C3 Array plugin object from a query into a named slot.
  10. Create a C3 Dictionary plugin object from a query into a named slot.


  1. Note important info at the bottom of this page on local storage and looping.
  2. json files can only contain one root object, so the first character and last character should be { }
  3. When converting a sub object to a C3 array, the array can not contain anything other then basic 1D, 2D, and 3D arrays. Object in an array can not be converted to the C3 array.
  4. When converting a sub object to a C3 dictionary, the dictionary can not contain anything other then basic object with property keys and values. Any additional objects within the object you are converting will be ignored by the C3 dictionary.

Load in Json Files

To specify the files to load and what to label them for access later you must set the following properties on the JsonManager itself through the properties page. The two items to fill in are:

  1. Json Files to Load: Comma separated list of file names like file.json,file2.json
  2. Json File Slot List: Comma separated list of slot names to load the above files into like slot1,slot2

Available Functions

Please refer to the included example file, JsonAddOnTest.c3p, to view how to use all the features of the Plugin. It is well commented and show provide good examples of how to accomplish all of the different tasks.

Json files by url

Care must be taken when using a url to load a Json file. The plugin was originally designed to work with Json files included in the project. When testing on your local machine the preview pane runs with https, which makes loading a file from http an issue (If you are loading it from your local web server). If you use, it will trusted by the browser to make a call from https to http, but you'll need to make sure your local web server that is serving the Json file has Cors headers set. Once that is done you can load the file with a url in preview. Of course if you make a call to an external server that is using ssl already, it should work.

Local Stotage

This plugin uses local storage to manage it's internal function regardless of whether you use caching or not. It manages it's own named locations in storage so it won't interfere with other programs. However if you totally clear cache some where in your game, you could affect this plugin.


This only pertains to my Json array loops nested inside of another Json array loop condition.

Conditions (Loop) - There is a parameter to indicate if this loop is nested inside another Json array loop. Set this to Yes when you are nested inside another one so it knows to use the relative position of the first one to locate nodes. If there is only one Json loop array structure set this to No.

Actions - There is a parameter to indicate if this action is inside of a json array loop. Set to Yes if so and No otherwise. This allows the action to ignore the slot designation and use the relative path of the current loop item.

Expressions - There is a parameter to indicate if this expression is inside of a Json array loop. Set to Yes if so and No otherwise. This allows the expression to ignore the slot designation and use the relative path of the current loop item.


1.2.1 Stable (17.22 KB)


  • Deprecated addon Deprecated
  • License MIT License
  • Copyright Robert Greenberg. All rights reserved.


  • Download count933 total downloads
  • Latest download count 561 downloads of latest version
  • Average download count1 downloads per day average



  • Order by
Want to leave a comment? Login or Register an account!
  • Hi, dude how you doing?

    i got some bug on your plugin, i just build it on the same platform which is html5. and upload it to my website. it works fine on every platform (pc, android) but ios. it wont load anything on ios browser... i delete your plugin on my project, and it works... hope you can fix this issue, thank you.

  • Hey there. It doesn't work on the latest versions of the Construct 3. Can you please update the plugin?

    • This plugin was deprecated and hasn't been supported for a long time. Ever since Construct added it's own JSON plugin I stopped supporting this and deprecated it. The one supplied by Construct is very good.

  • This is exactly what I needed, I have a quick question.

    I'm pulling in a JSON that has Items:, under that is 0, 1, 2, 3 etc. Under each of those numbers is a bunch of info. Is there a way I can query how many Child nests there are under Items? I'm probably not explaining it well at all.


    • 0
      • Stuff:
      • MoreStuff:
    • 1
      • Stuff:
      • MoreStuff:
    • 2
      • Stuff:
      • MoreStuff:
    • 3
      • Stuff:
      • MoreStuff:
    • 4
      • Stuff:
      • MoreStuff:

    Is there a way to get a count of each of the numbers so I know what the last number is?

    • This plugin is marked as deprecated. all the json functionality you need is available with the built in json plugin for c3. This plugin was created before that existed and is no longer needed.

      • But doesn't the buit in Json plugin require the JSON file to setup in a specific way? I'm pulling data from Youtube API so I can't change how the JSON file is structured.

        I'll dig deeper, thanks.

        Load more comments (2 replies)
  • Hey bro, I have issue with your plugin on desktop Safari. After exporting to HTML5 and upload to the website on desktop safari I got: [Error] Error while parsing the 'sandbox' attribute: 'allow-orientation-lock' is an invalid sandbox flag.

  • hi, again.

    is it possible to load multiple json, without import files and will be import after build? if so, how can i get the specific name of that files to load it on start dynamically?

    • The JSON manager has an action to load a string also. So you could use the built in ajax to get the file at runtime and load the string into the json manager. But make sure to still use the file loaded trigger before using it. Then just use different slots for the different files

  • Hi, nice plugin

    I cannot import a json response without a Array ?

    All my responses i need to "var result = {index: obj};"

    but doing this when i import to Array all values are "object Object"

    • A json file doesn't have to contain an array. It can be as simple or as complex as you need. If you can show me a sample of what you are working with, I can recommend how to work with it.

      • hi there, i really need to store a value from json to an array, its works so fine on editor but i cant access it after build, can you help me?

        Load more comments (6 replies)
      • My ajax response is like this:

        [ { "number": 123456789, "name": "Aparador 350V" } ]

        [ { "number": 123456789, "name": "Aparador 350V" } ]

        [ { "number": 123456789, "name": "Aparador 350V" } ]

        [ { "number": 123456789, "name": "Aparador 350V" } ]

        If i load to Slot i cannot access the data because i dont have a query string to "?[0].number"

        After javascript i can access with "index[0].number"

        AND if i load to array with query index all data inside the array become "object Object"

  • Great job rhg - it's nice to have a fully featured JSON plugin for the C3 runtime!

    • [-] [+]
    • 1
    • 1 points
    • (2 children)
    • it is my mistake , i found the mistake.

    • I will take a look at it. But looking at your example the first things that strikes me is getting a dictionary works by pointing at simple javascript object with properties, not an array. So in that case the query to use with the GetDictionaryFromJsonPath would be something like slot.friendlist[0]. I will look at this to make sure though


      Just tried it with your example and it works fine by loading a dictionary with the following:

      JsonManager.GetDictionaryFromJsonPath("world", "friendlist[0]", "No")

      You could also do something like:

      JsonManager.GetDictionaryFromJsonPath("world", "friendlist[" & str(JsonManager.GetJsonArrayLength("world", "friendlist", "No")-1) &"]", "No")

  • Could you add a condition that tests for when the loop has completed. I.e. its true *after* the last loop item has been processed.

    This would be ideal to trigger post-loop action, such as selecting an element in a listbox, that was filled with the the loop

    thank you,


    • You could just put a condition after the loop that will run as soon as the loop is done. I don't know if you really need an event for this.

      Also for commas in a string I would start1 with an empty string. Then when you try to append to it check if its empty. If its empty just add the string. If it's not empty add a comma first and then the string. Then you never have to worry about having too many commas

    • btw, sometimes its useful to also have a condition that tests true for when the last loop item processes, or even also the one before the last one. This helps customize construction tasks such a creation of json strings, where for last elements one does not add commas anymore.

  • It would be great if there could be additional dictionary like functionality, to construct a json, which can then be obtained via a toJson method.

    In my app, i need to update values in a google sheet. This means constructing an update json string as data for a ajax put call.

    now, the only way to do it is to build the string using concats

  • Load more comments (22 replies)