Johnzon, TomEE 7 and JSON-B

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Johnzon, TomEE 7 and JSON-B

Berner Martin
Hello, everybody,
In TomEE 7.x Johnzon is the standard implementation of JASON-B, if I understood it correctly.
I try to replace Johnzon specific annotations like @JohnzonIgnore and @JohnzonConverter with standard annotations of javax.xml.bind.
@JsonbTransient works as a full replacement to @JohnzonIgnore. Other annotations like @JsonbDateFormat and
@JsonbTypeAdapters are not considered.
And although there is the org.apache.johnzon.jsonb.converter.JsonbLocalDateConverter in the Lybrary org.apache.johnzon:johnzon-jsonb:1.0.1, using LocaleDate without @JohnzonConverter doesn't work at all.
Am I doing something wrong or do I have to configure Johnzon in TomEE 7.1.0? Or am I assuming wrong?
With the change from TomEE 7.0.4 to TomEE 7.1.0 I also had the problem that @XmlAccessorType(XmlAccessType.FIELD) was no longer considered by Johnzon. I was able to solve the problem quite elegantly with @Getter from Lombok.

Best regards Martin
Reply | Threaded
Open this post in threaded view
|

Re: Johnzon, TomEE 7 and JSON-B

Cesar Hernandez
Hi Martin,

In TomEE 7.1.0 thre was some issues related with JSON date format parsing
[1].
Have you tried your code against TomEE 7.1.1 ?


[1] https://issues.apache.org/jira/browse/TOMEE-2233

El mar., 30 jul. 2019 a las 6:18, Berner Martin (<
[hidden email]>) escribió:

> Hello, everybody,
> In TomEE 7.x Johnzon is the standard implementation of JASON-B, if I
> understood it correctly.
> I try to replace Johnzon specific annotations like @JohnzonIgnore and
> @JohnzonConverter with standard annotations of javax.xml.bind.
> @JsonbTransient works as a full replacement to @JohnzonIgnore. Other
> annotations like @JsonbDateFormat and
> @JsonbTypeAdapters are not considered.
> And although there is the
> org.apache.johnzon.jsonb.converter.JsonbLocalDateConverter in the Lybrary
> org.apache.johnzon:johnzon-jsonb:1.0.1, using LocaleDate without
> @JohnzonConverter doesn't work at all.
> Am I doing something wrong or do I have to configure Johnzon in TomEE
> 7.1.0? Or am I assuming wrong?
> With the change from TomEE 7.0.4 to TomEE 7.1.0 I also had the problem
> that @XmlAccessorType(XmlAccessType.FIELD) was no longer considered by
> Johnzon. I was able to solve the problem quite elegantly with @Getter from
> Lombok.
>
> Best regards Martin
>


--
Atentamente:
César Hernández.
Reply | Threaded
Open this post in threaded view
|

AW: Johnzon, TomEE 7 and JSON-B

Berner Martin
My bad,
At one point I had used Johnzon's Mapper to deserialize JSON data.
Now I switched to the Jsonb-fromJson and everything works as it should.


-----Ursprüngliche Nachricht-----
Von: Cesar Hernandez <[hidden email]>
Gesendet: Dienstag, 6. August 2019 00:19
An: [hidden email]
Betreff: Re: Johnzon, TomEE 7 and JSON-B

Hi Martin,

In TomEE 7.1.0 thre was some issues related with JSON date format parsing [1].
Have you tried your code against TomEE 7.1.1 ?


[1] https://issues.apache.org/jira/browse/TOMEE-2233

El mar., 30 jul. 2019 a las 6:18, Berner Martin (<
[hidden email]>) escribió:

> Hello, everybody,
> In TomEE 7.x Johnzon is the standard implementation of JASON-B, if I
> understood it correctly.
> I try to replace Johnzon specific annotations like @JohnzonIgnore and
> @JohnzonConverter with standard annotations of javax.xml.bind.
> @JsonbTransient works as a full replacement to @JohnzonIgnore. Other
> annotations like @JsonbDateFormat and @JsonbTypeAdapters are not
> considered.
> And although there is the
> org.apache.johnzon.jsonb.converter.JsonbLocalDateConverter in the
> Lybrary org.apache.johnzon:johnzon-jsonb:1.0.1, using LocaleDate
> without @JohnzonConverter doesn't work at all.
> Am I doing something wrong or do I have to configure Johnzon in TomEE
> 7.1.0? Or am I assuming wrong?
> With the change from TomEE 7.0.4 to TomEE 7.1.0 I also had the problem
> that @XmlAccessorType(XmlAccessType.FIELD) was no longer considered by
> Johnzon. I was able to solve the problem quite elegantly with @Getter
> from Lombok.
>
> Best regards Martin
>


--
Atentamente:
César Hernández.