Closed GoogleCodeExporter closed 9 years ago
The compiler option 'underscore_on_vars' will do the trick.
See https://code.google.com/p/protostuff/wiki/CompilerOptions
Original comment by david.yu...@gmail.com
on 19 May 2014 at 2:12
Whilst that workaround makes it slightly more of an edge case, it's not
possible for me because I'm using Gson to convert the POJO into JSON. That
means that I get all of my results incorrectly. {"name":"Betsy"} becomes
{"name_":"Betsey"}
I don't mind too much that I get the wrong result for {"default_":"MyDefault"}
and I can't think of a way to fix that issue.
Original comment by matt...@jaggard.org.uk
on 20 May 2014 at 8:13
How protobuf code generator behaves in this case?
Original comment by schepano...@gmail.com
on 12 Feb 2015 at 10:15
Fixed in https://github.com/protostuff/protostuff-compiler, underscore is added to field name if it is reserved java keyword.
Original issue reported on code.google.com by
matt...@jaggard.org.uk
on 19 May 2014 at 8:39