Niclas Hedhman a écrit : > I am about halfway through a new implementation that only has the the > "token"-level parsing (I think you call that "push"). It seems to simplify > the design, although a lot more code for token checks, but I think it is > the right thing to do.
Yep, push/token VS. pull/nodes/dom. But using "token" may be more appropriate here, "push" referring to event based parsers, my bad. > In this, it doesn't seem to hard to support both Map formats, basically by > key type. If key type is plain (String, number, date and few others) then > the object format will be used and otherwise the key/value entry format is > used. Sounds good. > As for "_type", I am not sure yet, but I think ParameterizedTypes will be > required and inability to provide that will simply serialize with Java > Object Serialization (if it cand) or fail. I will report back when I am > nearer to the tricky bits. IRRC, the issue with "_type" is polymorphism in deserialization. For example, if you need to deserialize some Property<Vehicle> that contains either a Car, a Bus or a Motocycle you need to read "_type" early.