6 May 2012 8:54 PM #1
Facing problem in JSON encoding and decoding using DirectJNgine
We are evaluating DirectJNgine for server side stack for ExtJs 4.1 and we are not able to find answers of following queries in case of Json encoding decoding by using DJN:
- When we actually need to write our own Json encoding decoding code while we can easily use Ext.Data.DirectStore for directly sending client side data to server side and vice-a-versa.
- Is it necessary to write inner static class for serialization and deserialization for each of the complex object like UserDetail object in subclass of DefaultGsonBuilderConfigurator.java.
- Is it needed to write serialization-deserialization logic in inner static classes of the class that is subclass of the DefaultGsonBuilderConfigurator.java or we can write these logic in non static inner classes.
- Suppose we have written separate inner static classes for serialization and deserialization of two objects like Date and UserDetail and using these inner static classes in configure() method as follows:
builder.registerTypeAdapter( Date.class, new JsonDateSerializer() ); builder.registerTypeAdapter( UserDetail.class, new JsonUserDetailSerializer() );