Yepp, something like that would work. I am currently working on persisting object graphs eagerly. When I come across the local storage I will take a look at piriti again.
Please use http://groups.google.com/group/mobile-objects-discuss for further discussions. On 31 Aug., 11:20, Harald Pehl <[email protected]> wrote: > I started Piriti as an XML mapper for GWT back in January 2010. JSON mapping > was introduced some months later. So it has no relation to AutoBeans. It's > just an alternative way to (de)serialize POJOs. Although the output is very > similar, Piriti is not based on marker interfaces, but real POJOs. See > alsohttp://code.google.com/p/piriti/wiki/Comparisonfor a comparison with other > mappers. > > The idea off hooking into graph traversal is an interesting concept. I would > suggest events and handlers to get notified when a model / property is > written to JSON resp. read from JSON: > > public interface JsonWriter<T> { > ... > HandlerRegistration addWriteModelHandler(WriteModelHandler<T> handler); > HandlerRegistration addWritePropertyHandler(WritePropertyHandler<?> > handler); > ... > > } > > public interface WriteModelHandler<T> extends EventHandler { > void onBeforeWriteModel(WriteModelEvent<T> event); > void onAfterWriteModel(WriteModelEvent<T> event); > > } > > public interface WritePropertyHandler<T> extends EventHandler { > void onBeforeWriteProperty(WritePropertyEvent<T> event); > void onAfterWriteProperty(WritePropertyEvent<T> event); > void onSkipProperty(WritePropertyEvent<T> event); > > } > > What do you think? > > - Harald -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
