1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    6
    Vote Rating
    0
    gracethief is on a distinguished road

      0  

    Question Unanswered: a problem in ST2.0 on Ext.decode(json string).Help!

    Unanswered: a problem in ST2.0 on Ext.decode(json string).Help!


    var json='{"a":"\d{4}"}';
    var d=Ext.decode(json);

    then I got a object d with a property a which value is 'd{4}', the '\' was lost. but this worked properly in ExtJs.

    Could anybody help me to solve this problem?

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    12
    Vote Rating
    1
    Answers
    1
    JohnWileman is on a distinguished road

      0  

    Default


    From first glance I would say that your string is not encoded properly I managed to get the result you wanted with:

    Code:
    var json=Ext.encode('{a:\"\\d{4}\"}');
    var d=Ext.decode(json);
    I was just interested in you problem (I like puzzles ) so I hope I'm of help and not hinderance!

Thread Participants: 1

Tags for this Thread