1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    martinrame is on a distinguished road

      0  

    Question Valid JSon for Internet Explorer

    Valid JSon for Internet Explorer


    Hi, I'm trying to figure out what's the problem with the attached JSON file when I use it to populate a Tree in Internet Explorer. The file is valid for JSONLint, also it works well with FireFox and Google Chrome.

    Any hint? is there a size limit in JSON for IE?

    Thanks in advance,
    Leonardo.
    Attached Files

  2. #2
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    691
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    does you check for comas on wrong places?
    or test it with a subset of your result, with only 2 or 3 leafs?

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    martinrame is on a distinguished road

      0  

    Default


    Yes, It works with a smaller JSON. Also it is standard compliant, as it was checked in JSonLint and it says it's valid.

  4. #4
    Sencha User BitPoet's Avatar
    Join Date
    Sep 2008
    Location
    Bavaria
    Posts
    277
    Vote Rating
    1
    BitPoet is on a distinguished road

      0  

    Default


    Just a shoot in the dark, but have you tried escaping the non-ascii chars in your json?

  5. #5
    Sencha User
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    martinrame is on a distinguished road

      0  

    Default


    Sorry, but what are those non-ascii chars?, how can I escape those?

  6. #6
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    691
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    are there spanish special chars? like char with something in the top or < > or tags / ... something like that

  7. #7
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    691
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    i found a Ì maybe something like that is the problem

  8. #8
    Sencha User
    Join Date
    Dec 2008
    Posts
    85
    Vote Rating
    0
    martinrame is on a distinguished road

      0  

    Default


    Yes there are ñ, Ñ, and accented characters. In this file there isn't <,>, or /. How can I escape those?

  9. #9
    Sencha User BitPoet's Avatar
    Join Date
    Sep 2008
    Location
    Bavaria
    Posts
    277
    Vote Rating
    1
    BitPoet is on a distinguished road

      0  

    Default


    There are a number of accented characters (like á or í) in the JSON whose ascii value is bigger than 127. Encoding should be handled by whatever backend is generating your json.

    Another issue could also be differing character sets between response headers and actual json body. If your server announces the content to be UTF-8 (charset declaration in the http header, tools like firebug let you check that), make sure to also encode all string in UTF-8 before outputting them as json, the same with any other charset.

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,507
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    What is the actual problem?