2 ms·
This looks cool, but I'm also interested in seeing if compared to GSON not just Jackson. Is the `JsonField` annotation mandatory? In most cases my variable name
by jc4p 12y ago
This looks cool, but I'm also interested in seeing if compared to GSON not just Jackson. Is the `JsonField` annotation mandatory? In most cases my variable names are the same as the field names in the JSON, which is why I love using GSON since it auto-picks up on that.
It looks kind of odd in your sample code too, it'd be nice if it could auto-try those fields, but I can see why that won't work if this is compile-time rather than at processing-time like GSON (it has no way of checking against the JSON to see if that assumption is true) -- maybe have `JsonType` take and optional parameter that enables "guess types" mode?
- tonytung 12y agoHi! I'm one of the authors of this library. The code this library emits is very similar to the json/jackson/manual serializer/deserializer in https://github.com/eishay/jvm-serializers/wiki https://github.com/eishay/jvm-serializers/wiki. Conveniently, GSON is benchmarked there too. You're right, the field names could be guessed at compile time. Please feel free to submit a PR! Thanks!