fromJSON broken in 11.0.0?

Posted by: texel on 12 January 2018, 8:49 am EST

    • Post Options:
    • Link

    Posted 12 January 2018, 8:49 am EST

    Hi, I noticed there were changes to the fromJSON method in 11.0.0, and I also noticed my app broke! :slight_smile:

    I have re-saved the v10 ssjson files in Designer 11.0.0, and am still getting exceptions thrown from gc.spreads.sheets.all.11.0.0.js from running fromJSON(data).

    Anyone else with issues? Thanks.

  • Posted 14 January 2018, 10:45 pm EST

    Hello,

    I am not able to replicate this issue using the demo samples. Please refer to the attached video. I saved the JSON file from SpreadJS10 and opened it with SpreadJS11. It worked without any issues.

    Please try importing the JSON file with sample:

    …\Downloads\SpreadJS.Release.11.0.0\Spread.Sheets\Spread.Sheets.Release.11.0.0\samples\InspectorSample

    Please provide me your JSON file to test, in case the issue continues.

    Thanks,

    Deepak Sharma

  • Posted 14 January 2018, 10:47 pm EST

    Here is the video:

    Thanks,

    Deepak SharmaSpreadjs10toSpreadJS11.zip

  • Posted 15 January 2018, 3:23 am EST

    Hi, I am getting the error calling fromJSON(data) on data returned from an ajax query. Oddly, if I JSON.stringify the data into a string variable in VS debugger, copy and paste into a text file, that file imports successfully with your InspectorSample FileReader (as does the original .json file).

    However, calling spread.fromJSON(data) on the ajax result gives the following exception from gc.spread.sheets.all.11.0.0.min.js:

    Unhandled exception at line 33, column 6654 in http://localhost/Scripts/gc.spread.sheets.all.11.0.0.min.js

    0x800a138f - JavaScript runtime error: Unable to get property ‘style’ of undefined or null reference occurred

    Any ideas would be appreciated,

    tkx

  • Posted 16 January 2018, 1:06 am EST

    Hello,

    You must be using the JSON saved from SpreadJS with toJSON method. Or the JSON schema should match the schema for JSON saved from SpreadJS.

    Please make sure that you are using toJSON method to save the JSON. Let me know in case this does not work for you.

    Thanks,

    Deepak Sharma

  • Posted 16 January 2018, 1:44 am EST

    Hi I am using JSON saved with Spread.Sheets Designer 11.0, the “version” tag states 11.0.0.

    And trying to use an ajax fromJSON(data) call to read this into a spread component created from gc.spread.sheets.all.11.0.0.min.js.

    Thanks

  • Posted 16 January 2018, 8:23 am EST

    It is working now. I don’t think I changed anything, maybe it was a caching issue in IIS or the browser. Or else an outdated license key. Thanks for your help.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels