1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    37
    Vote Rating
    0
    jksnu is on a distinguished road

      0  

    Default Is gson2.1.jar is compatible with Djn2.0

    Is gson2.1.jar is compatible with Djn2.0


    Hi,

    We are using DJN 2.0 for implmenting ExtDirect server side stack and now it has gson1.3.jar. But, due to this old version jar, we are not able utilize several new features of Gson. Now the latest version of gson.jar is 2.2.
    So, if we use gson2.2.jar with DJN, will DJN behave normally or gson2.2 is not compatible with DJN2.1.

  2. #2
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Use Djn 2.1, it is fully tested against Gson 2.2.1.
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    37
    Vote Rating
    0
    jksnu is on a distinguished road

      0  

    Default How to use Transient keyword

    How to use Transient keyword


    Hi Pagullo,

    Thank you very much for your response. I am now using DJN 2.1 and its working fine with Gson2.2.1.jar. But, now we need to obstruct some properties of the response object to be serealiazed. E.g.
    Code:
    @DirectMethod
    public User getUser()
    {
           return new User();
    }
    User.java---
    Code:
    Class User
    {
          String userName="Jitendra";
          String transient address = "Address123";
    }
    Now, from Gson guidelines, to obstruct "address" from being serialized to json, we have to use
    Code:
    GsonBuilder builder = new GsonBuilder().excludeFieldsWithModifiers(Modifier.TRANSIENT);
    That means, we have to create GsonBuilder object with excludeFieldWithModifiers(). I have tried this code in the GsonBuilderConfiguratorForTesting.java in configure() method like
    Code:
    @Override
      public void configure(GsonBuilder builder, GlobalConfiguration configuration) {
        super.configure(builder, configuration);
        builder.excludeFieldsWithModifiers(Modifier.TRANSIENT);
        addCustomSerializationSupport(builder);
      }
    But, every things working fine and not any error is shown, but control does not come in callback function on clientside.
    I believe, DJN is definately providing some way of configuration to implement transient attributes, but I am not finding it. Please suggest me how can i do this.
    leve

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi