Just curious what the state of JSON support is in DWR3. I've been using DWR for a while and love it, but have recently needed REST support and have started looking at JAX-RS. Unfortunately I'm not a huge fan of the way Jettison does it's serialization (can't return collections as top level objects, always nests object in attribute that names the class, etc...) DWR on the other hand, has always had a very natural java <-> javascript mapping and I imagine would handle JSON equally well. So I started wondering why can't DWR be used as a JAX-WS provider to handle JSON serialization? Turns out it isn't all that hard to do and I've done a quick proof-of-concept to that end :)
Point is, while doing all this I ran into a few issues that led me to believe that the JSON support isn't quite there yet, and just wanted to check to see where things stood. The issues I've seen:
- JsonSerializerFactory never properly initialized, so JSONUtil.serialize() throws NPE. Worked around it by trying LocalJsonSerializer, but that doesn't seem to produce valid JSON.
- Deserializer doesn't handle attributes with null values
- Deserializer doesn't handle Enum types
Apart from that, it wasn't much more than 100 lines of code or so to get a basic example working, and apart from the issues above I much prefer DWR's encoding over Jettison
On a side note, I know there has been some discussion on the various lists about REST support, though from the sounds of it, it's not quite the resource-centric view that JAX-RS takes. Any thought in adding 'real' REST support to DWR?