Marc Knaup
05/26/2019, 12:25 AMKSerializer
do some look-ahead for the next token type when reading something?
E.g.
• if next token is string then decode as A
• if next token is object then decode as Bsandwwraith
05/27/2019, 10:48 AMdecoder
you use in advance, you can downcast to it in deserialize
Marc Knaup
05/27/2019, 10:51 AMdecodeString
guarded with a try catch and upon exception I try to decode an object instead.
Do you happen to have an example for a format which doesn't know the type of the current token/value?Marc Knaup
05/27/2019, 10:52 AMsandwwraith
05/27/2019, 10:54 AMsandwwraith
05/27/2019, 10:55 AMdecodeJson
which allows to consume current node of the tree (primitive/array/object)Marc Knaup
05/27/2019, 10:57 AM