Re: Jackson serialisation of GenericJson subclasses

2018-05-11 Thread Tim Robertson
You're very welcome. Glad you have it sorted. On Fri, May 11, 2018 at 12:48 PM, Carlos Alonso wrote: > Hi Tim, many thanks for your help. It's definitely interesting, but > unfortunately not useful this time, I think, as that JsonTypeInfo and > JsonSubClasses annotations

Re: Jackson serialisation of GenericJson subclasses

2018-05-11 Thread Carlos Alonso
Hi Tim, many thanks for your help. It's definitely interesting, but unfortunately not useful this time, I think, as that JsonTypeInfo and JsonSubClasses annotations are on the base class, which, in my case, I don't own and even if I did, I don't think I could list all the subclasses GenericJson

Re: Jackson serialisation of GenericJson subclasses

2018-05-09 Thread Tim Robertson
Hi Carlos Here is an example of subclassing with Jackson using the @Type annotation that I did many years ago: https://github.com/gbif/gbif-api/tree/master/src/main/java/org/gbif/api/model/registry/eml/temporal It decorates the JSON with an extra field ("@Type" in this case) which instructs the

Jackson serialisation of GenericJson subclasses

2018-05-09 Thread Carlos Alonso
Hi everyone!! I'm working on BEAM-4257 issue and the approach I'm following is to create a new class 'BigQueryInsertError' that also extends 'GenericJson' and that contains three keys 'TableRow row', 'TableDataInsertAllResponse.InsertErrors error', and 'TableReference ref' and use this type as