On Monday, December 11, 2017 at 4:01:41 PM UTC+1, Colin Alworth wrote: > > Thanks Thomas, I'm excited to see where this will lead. > > Can you talk a little more about plans POJO support, as none of the three > existing options have any? Would you envision a wrapping tool that looks > like AutoBean/gwt-jackson, and where on that continuum are you thinking > (autobean is as late as possible, and generic enough to handle xml or other > underlying data formats, gwt-jackson parses then copies all json tree nodes > directly to bean values)? I also know there have been some experiments > around passing a reviver func to JSON.parse that could be interesting here. > Any thoughts on handling collections, whether to go with java.util, or try > for something shared js/jvm and only used within this library? >
No plan. at all. really. Might even never be in scope. What would look the closest to a plan would be to somehow expose the "raw" objects so you could "cast" them to jsinterop native types (collections are an issue there). And by using an API like "<T> T cast(Class<T> clazz)", a JVM adapter could use its own logic to do the mapping into new objects (note that JS and JVM would have different behavior wrt updating the objects) Raw objects could possibly also be fed into "wrappers" like AutoBeans (btw, if it weren't for the –understandable– JsInterop limitation that a native type cannot implement/extend a non-jstype interface, AutoBeans would probably not have to be wrappers, but only native or overlay methods and WeakMap <https://kangax.github.io/compat-table/es6/#test-WeakMap> for reified types; if the "schema" wasn't the Java interface you actually use in your code, those could easily be generated). -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/8c715dab-eb57-450e-bcb3-27638f69fa66%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
