JSON & XML serialisation

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

JSON & XML serialisation

Lukasz Lenart
Hi,

I wonder what would be a better solution to replace existing content
handlers in the REST plugin, there are basically two options:

- Java API for JSON Processing - a standard lib
http://www.oracle.com/technetwork/articles/java/json-1973242.html

- The Apache Juneau project
http://juneau.apache.org/#marshall.html

Any comments?


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JSON & XML serialisation

Greg Huber
Would use Jackson for serialization etc. OK, not an apache project though.

On 10 November 2017 at 08:08, Lukasz Lenart <[hidden email]> wrote:

> Hi,
>
> I wonder what would be a better solution to replace existing content
> handlers in the REST plugin, there are basically two options:
>
> - Java API for JSON Processing - a standard lib
> http://www.oracle.com/technetwork/articles/java/json-1973242.html
>
> - The Apache Juneau project
> http://juneau.apache.org/#marshall.html
>
> Any comments?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

AW: JSON & XML serialisation

Christoph.Nenning
In reply to this post by Lukasz Lenart
Hi,

I would prefer standardized "Java API for JSON Processing" just to avoid another dependency forced on applications.

It seems to me selection of json library is like selection of logging lib. There are some options and everyone wants to use something different. It is hard for a framework to choose one as that is forced on applications.


Regards,
Christoph


>
> Hi,
>
> I wonder what would be a better solution to replace existing content
> handlers in the REST plugin, there are basically two options:
>
> - Java API for JSON Processing - a standard lib
> http://www.oracle.com/technetwork/articles/java/json-1973242.html
>
> - The Apache Juneau project
> http://juneau.apache.org/#marshall.html
>
> Any comments?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: AW: JSON & XML serialisation

Yasser Zamani


On 11/10/2017 1:07 PM, [hidden email] wrote:
> Hi,
>
> I would prefer standardized "Java API for JSON Processing" just to avoid another dependency forced on applications.
>

Doesn't this force user to use a specific jdk version? I also worry for
any issue, we have to wait for long time for the next jdk; even after
the jdk release, usually people cannot upgrade easily ;) I wonder why
java want to ship json into jdk, at all!

> It seems to me selection of json library is like selection of logging lib. There are some options and everyone wants to use something different. It is hard for a framework to choose one as that is forced on applications.

+1 I already enabled custom json writer and think it should not be so
hard to bring the json implementation to user choice completely. just
should break some current specific options and let user choice options
as wish via his/her provided library ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JSON & XML serialisation

Lukasz Lenart
In reply to this post by Christoph.Nenning
2017-11-10 10:37 GMT+01:00  <[hidden email]>:
> I would prefer standardized "Java API for JSON Processing" just to avoid another dependency forced on applications.

Json API is available since JavaEE 7 which means we have to switch to
Java 8 first, right? BTW. I am really lost in all those JSRs and which
lib I should use :P

> It seems to me selection of json library is like selection of logging lib. There are some options and everyone wants to use something different. It is hard for a framework to choose one as that is forced on applications.

I'm looking for alternatives mostly because of security
vulnerabilities or a given lib is outdated (like json-lib we are using
right now in the REST plugin)


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JSON & XML serialisation

Lukasz Lenart
In reply to this post by Greg Huber
2017-11-10 9:49 GMT+01:00 Greg Huber <[hidden email]>:
> Would use Jackson for serialization etc. OK, not an apache project though.

Support for Jackson is already there but it isn't a default choice,
maybe we should just switch :)


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JSON & XML serialisation

Lukasz Lenart
In reply to this post by Lukasz Lenart
2017-11-10 9:08 GMT+01:00 Lukasz Lenart <[hidden email]>:

> Hi,
>
> I wonder what would be a better solution to replace existing content
> handlers in the REST plugin, there are basically two options:
>
> - Java API for JSON Processing - a standard lib
> http://www.oracle.com/technetwork/articles/java/json-1973242.html
>
> - The Apache Juneau project
> http://juneau.apache.org/#marshall.html

I think the best option will be switching to Jackson in Struts 2.6
with option to switch back to json-lib. And we can think about adding
other options if needed (maybe via plugins developed in struts-extras)


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]