JSON interface?

0 favourites
  • 8 posts
From the Asset Store
J.BoB Impact Action Interface Sound Pack comes with 120 high-quality sound effects
  • Would it be possible to add an interface for the JSON plugin. having the Json data exposed in js would be very useful. also being able to set JSON back into the plugin would be great as well. This will really help managing data structure across JS and Events. It would also help avoid having to create a bunch of wrapper functions just to move data around.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes would be very helpful.

    How did you solve it so far? I also have some returned JSON data i need to load to the JSON object.

  • I parse and stringfy data back and fourth between the event sheet and the JS scripts, I normally try and handle all the data manipulation in the scripting API and then have a wrapper functions that read or updates the JSON object.

  • Agree, this would be really great! I also am always doing stringify and parse for scripting and C3 functions / events.

    Right now I pass into C3 Functions that call scripting JSON.GetAsCompactString and then in the scripting I must parse, then for output from scripting back as a C3 return value meant for a C3 JSON object, I must again do JSON.stringify and then on C3 side, must do a JSON -> parse.

    If we had the scripting control for the C3 JSON object. Instead we could pass in JSON.UIDs as parameters for the function, in scripting we can select the object and read the JSON values and then we can also update another JSON object (or the same JSON object) as an 'output' of the function.

  • Yeah it's a bit tricky to say the least. I'm doing api calls that return JSON so some way to more easily shuffle data around between scripts and C3 in general would be better.

    I'm not very good at scripting so I would prefer to do most of the work with events, after passing the data over.

  • From latest beta:

    JSON plugin: script interface to access JSON data

    Thank you Scirra, will try it out!

  • While we are waiting for the stable document update here are the functions I see in the debugger for the JSON SDK (beta r201)

  • While we are waiting for the stable document update here are the functions I see in the debugger for the JSON SDK (beta r201)

    Awesome thanks! I'll play around with it too. Very useful!.

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