Re: GsonDataFormat "useList" option?

2020-06-02 Thread Jeremy Ross
Solved the date parsing issue. Apparently gson can't handle OffsetDateTime out of the box. Here's my solution: Gson gson = new GsonBuilder().registerTypeAdapter(OffsetDateTime.class, new JsonDeserializer() { @Override public Object deserialize(JsonElement jsonElement, Type type, JsonDeser

Re: GsonDataFormat "useList" option?

2020-06-02 Thread Jeremy Ross
Hey Alex, Thank you. It looks like this may work. I'm getting a separate gson exception, but I believe it's because gson is expecting Birthdate to be an object, not a string: Expected BEGIN_OBJECT but was STRING at line 1 column 271 path $[0].Person.Birthdate. Separate issue I'll look into. On T

Re: GsonDataFormat "useList" option?

2020-06-02 Thread Alex Dettinger
Hi Jeremy, It reminds me something, could you please try something like below: https://github.com/apache/camel-quarkus/blob/master/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsRoute.java#L58..L61 hth, Alex On Tue, Jun 2, 20

GsonDataFormat "useList" option?

2020-06-02 Thread Jeremy Ross
Hi All, Is it possible to unmarshal a List of some type with the GsonDataFormat? JacksonDataFormat has this options, and lots others, but not seeing any such option for gson. Thanks!