User Tag List

Results 1 to 7 of 7

Thread: Can Fusin read data of .JSON files?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can Fusin read data of .JSON files?

    I have a .JSON file with some data ( stored locally ).
    How i can get Fusion to read data from the .JSON file?

    Maybe its the same way as reading text of a normal notepad/ text document?
    But then again, i dont really know how to proceed doint even that.

  2. #2
    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProUnicode Add-on

    Join Date
    Jun 2011
    Posts
    628
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!
    I can see its available for Windows, Android and HTML5, but but not for iOS correct ( maybe im missng something )?
    I think i would need this to be for iOS to be honest.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So i now have the JSON Object in my Fuson Applicatiomn, and a JSON file on my harddrive.
    The JSON file contains an Array ( type data "[]" ), the Array contains a list of Objects ( type data "{}" ), and each Object contains a String and a Number.

    I still dont know how to open, or load the JSON file.

    The JSON Object has an Action called "load JSON from string"...

    Im not sure what i should put here, as it states at the top of the window "JSON ( not a path name, the actuall JSON )", and that confuses me.

    Am i missunderstanding how the JSON Object works?
    What am i supposed to input, in the above window, for the JSON Object to load my JSON file from my hardisk?
    How do i make the JSON object load/ open a JSON file?

    ( there was an example with the JSON Extencion, but it seems to load data from the web and not from a file )

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured it out.
    The JSON Object wants you to feed it the entire 'content' of a JSON file.

    PROBLEM #1
    Feeding the contents directly into the expression editor doesnt quite work, as the data in JSON files often contain the characters ' " ' which the Expression Editor identifies as a Syntax Error, making it hard if not impossible to complete the Expression and hench load the JSON content.

    WORKAROUND
    I did find another Example, by the author, here:
    http://community.clickteam.com/threads/85914-JSON-Object/page3
    And learnt i need to first load the contents of the JSON file into the Edit Box Object, and then let the JSON Object load the contents of the Edit Box. This way there is no Syntax Error in the Expression Editor.

    PROBLEM #2
    Not entirely un-problematic however...
    As the Edit Box doesnt open JSON files, i had to create a new Note Pad document, past the JSON file content inside the Note Pad document, feed the Note Pad document to the Edit Box, and then feed the Edit Box to the JSON Object.

    I still havent found a direct way for the JSON Object, or Fusion, to read JSON files.

    Am i missing a piece of the puzzle?
    Is it possible for Fusion to open/ retrieve the contents of/ read .JSON files directly?

  6. #6
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    The Edit Box is indeed capable of loading json files, however you'll have to use the expression version of loading a file into the edit box, without the load dialog.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you BartekB!
    I did not expect that

    Im using the File Object to select files now, as a workaround

Similar Threads

  1. Send JSON data from Click fusion 2.5
    By ramyhakam in forum Extension Development
    Replies: 18
    Last Post: 28th March 2016, 07:32 PM
  2. trying to find alternative ways to read data
    By ttdread in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 30th January 2011, 11:21 PM
  3. MMF won't read music files included with mmf?
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th November 2008, 07:50 PM
  4. files under different extention read by mmf apps?
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd November 2008, 04:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •