1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,299
    Answers
    13
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default Answered: Why Ext.USE_NATIVE_JSON is false by default?

    Answered: Why Ext.USE_NATIVE_JSON is false by default?


    Why Ext.USE_NATIVE_JSON is false by default?

    Native JSON parsing is faster and more secure because it will not compile scripts.

  2. Legacy, mostly. There's a whole lot of code that works fine with:

    Code:
    {
        data: [{
            name: 'foo'
        }]
    }
    Then suddenly it all explodes. Most certainly it's better to use the native JSON, but it's off by default for the purposes of backwards compatibility.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Here is a previous thread that discusses this a little:
    http://www.sencha.com/forum/showthread.php?73110

    Scott.

  4. #3
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,299
    Answers
    13
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Thanks Scott, but this is a very old thread.

    You should try to parse using the native JSON parser first.

    Even jQuery is doing that

  5. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I will shoot this over to one of the senior developers so we can both find out

    Scott.

  6. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Answers
    431
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Legacy, mostly. There's a whole lot of code that works fine with:

    Code:
    {
        data: [{
            name: 'foo'
        }]
    }
    Then suddenly it all explodes. Most certainly it's better to use the native JSON, but it's off by default for the purposes of backwards compatibility.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2