1. #1
    Sencha User thejoker101's Avatar
    Join Date
    Mar 2007
    Posts
    348
    Vote Rating
    0
    thejoker101 is on a distinguished road

      0  

    Default Json Encoding in Provider

    Json Encoding in Provider


    Why does the Provider class always encode/decode values as JSON? I know this is necessary for the default CookieProvider, but shouldn't it be in the CookieProvider class, as opposed to the base Provider class? Is there a reason this is done this way?

  2. #2
    Ext JS Premium Member
    Join Date
    Oct 2009
    Location
    Melrose, MA
    Posts
    46
    Vote Rating
    3
    hjones is on a distinguished road

      0  

    Default


    I don't think it is doing a JSON encode in the provider.

    The encodeValue function are converting the state object(s) in to an encoded string format that isn't JSON. The resulting string is escaped and state object type information encoded within (in an abbreviated fashion) - perhaps someone else can answer why this approach rather than JSON - but it looks to me like it is optimal for the restricted storage of a cookie?

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    hjones, in extjs it is probably not using json. In GXT however we use json. We even use the json methods comming from GWT.


    thejoker101, you can extend Provider (create an own one) that does not use json. You can use anything you can store somewhere.

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar