Skip to content

Commit

Permalink
[RESTEASY-1513]
Browse files Browse the repository at this point in the history
Deprecate resteasy-jackson-provider.
  • Loading branch information
ronsigal authored and asoldano committed Sep 30, 2016
1 parent f0fb482 commit 7a0a3ed
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 38 deletions.
72 changes: 34 additions & 38 deletions docbook/reference/en/en-US/modules/Json.xml
@@ -1,63 +1,59 @@
<chapter id="json">
<title>JSON Support via Jackson</title>
<para>Besides the Jettision JAXB adapter for JSON, Resteasy also support integration with the Jackson project.
Many users find the output from Jackson much much nicer than the Badger format or Mapped format provided by
Jettison.
Jackson lives at http://jackson.codehaus.org. It allows you to easily marshal Java objects to and from JSON.
It has a Java Bean based model as well as JAXB like APIs. Resteasy integrates with the JavaBean model as
described
at this url: http://jackson.codehaus.org/Tutorial.
<para>Besides the Jettision JAXB adapter for JSON, Resteasy also supports integration with the Jackson project.
Many users find the output from Jackson much nicer than the Badger format or Mapped format provided by Jettison.
For more on Jackson 2, see <ulink url="http://wiki.fasterxml.com/JacksonHome">http://wiki.fasterxml.com/JacksonHome</ulink>.
Besides JAXB like APIs, it has a JavaBean based model, described at
<ulink url="http://wiki.fasterxml.com/JacksonDataBinding">http://wiki.fasterxml.com/JacksonDataBinding</ulink>,
which allows you to easily marshal Java objects to and from JSON.
Resteasy integrates with the JavaBean model.
While Jackson does come with its own JAX-RS integration, Resteasy expanded it a little, as decribed below.
</para>
<para>While Jackson does come with its own JAX-RS integration, Resteasy expanded it a little. To include
it within your project, just add this maven dependency to your build. Resteasy supports both Jackson 1.9.x
and Jackson 2.2.x. Read further on how to use each.
<para>
<emphasis role="bold">NOTE.</emphasis> The resteasy-jackson-provider module, which is based on the outdated Jackson 1.9.x, is
currently deprecated, and will be removed in a release subsequent to 3.1.0.Final. The resteasy-jackson2-provider
module is based on Jackson 2.
</para>

<sect1>
<title>Using Jackson 1.9.x Outside of JBoss AS7</title>
<para>If you're deploying Resteasy outside of JBoss AS7 add the resteasy jackson provder to your WAR
pom.xml build</para>
<title>Using Jackson 1.9.x Outside of Wildfly 10 or EAP 7</title>
<para>If you're deploying Resteasy outside of Wildfly 10 or EAP 7,
add the resteasy jackson provder to your WAR pom.xml build:</para>
<programlisting><![CDATA[
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>${version.resteasy}</version>
</dependency>
]]></programlisting>
</sect1>
<sect1>
<title>Using Jackson 1.9.x Inside of JBoss AS7</title>
<para>If you're deploying Resteasy with JBoss AS7, there's nothing you need to do except to make sure
you've updated your AS7 distribution with the latest and greatest Resteasy. See the installation sectio
of this documentation for more details.</para>
<title>Using Jackson 1.9.x Inside of Wildfly 10 or EAP 7</title>
<para>If you're deploying Resteasy with Wildfly 10 or EAP 7,
there's nothing you need to do except to make sure
you've updated your installation with the latest and greatest Resteasy. See the
<link linkend='Installation_Configuration'>Installation/Configuration</link> section
of this documentation for more details.</para>
</sect1>
<sect1>
<title>Using Jackson 2.2.x Outside of JBoss AS7</title>
<para>If you're deploying Resteasy outside of JBoss AS7 add the resteasy jackson provder to your WAR
pom.xml build</para>
<title>Using Jackson 2 Outside of Wildfly 10 or EAP 7</title>
<para>If you're deploying Resteasy outside of Wildfly 10 or EAP 7,
add the resteasy jackson provder to your WAR pom.xml build:</para>
<programlisting><![CDATA[
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>${version.resteasy}</version>
</dependency>
]]></programlisting>
</sect1>
<sect1>
<title>Using Jackson 2.2.x Inside of JBoss AS7</title>
<para>If you want to use Jackson 2.2.x inside of JBoss AS7 you'll have to create a jboss-deployment-structure.xml file
within your WEB-INF directory. By default AS7 includes the Jackson 1.9.x JAX-RS integration, so you'll want
to exclude it from your dependencies, and add the jackson2 ones.</para>
<programlisting><![CDATA[
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.jboss.resteasy.resteasy-jackson-provider"/>
</exclusions>
<dependencies>
<module name="org.jboss.resteasy.resteasy-jackson2-provider" services="import"/>
</dependencies>
</deployment>
</jboss-deployment-structure> ]]></programlisting>
<title>Using Jackson 2 Inside of Wildfly 10 or EAP 7</title>
<para>If you're deploying Resteasy with Wildfly 10 or EAP 7,
there's nothing you need to do except to make sure
you've updated your installation with the latest and greatest Resteasy. See the
<link linkend='Installation_Configuration'>Installation/Configuration</link> section
of this documentation for more details.</para>
</sect1>
<sect1>
<title>Additional Resteasy Specifics</title>
Expand Down Expand Up @@ -186,7 +182,7 @@ org.jboss.resteasy.plugins.providers.jackson.Jackson2JsonpInterceptor
<sect1 id="Jackson_JSON_Decorator">
<title>Jackson JSON Decorator</title>
<para>
If you are using the Jackson 2.2.x provider, Resteasy has provided a pretty-printing annotation simliar with the one in JAXB provider:
If you are using the Jackson 2 provider, Resteasy has provided a pretty-printing annotation simliar with the one in JAXB provider:
<programlisting>
org.jboss.resteasy.annotations.providers.jackson.Formatted
</programlisting>
Expand Down
Expand Up @@ -11,9 +11,11 @@
*
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
* @deprecated Use resteasy-jackson2-provider
*/
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Deprecated
public @interface NoJackson
{
}
Expand Up @@ -34,9 +34,11 @@
*
* @author <a href="mailto:holger.morch@nokia.com">Holger Morch</a>
* @version $Revision: 1 $
* @deprecated Use resteasy-jackson2-provider
*/
@Provider
@ConstrainedTo(RuntimeType.SERVER)
@Deprecated
public class JacksonJsonpInterceptor implements WriterInterceptor{

/**
Expand Down
Expand Up @@ -17,10 +17,12 @@
*
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
* @deprecated Use resteasy-jackson2-provider
*/
@Provider
@Consumes({"application/*+json", "text/json"})
@Produces({"application/*+json", "text/json"})
@Deprecated
public class ResteasyJacksonProvider extends JacksonJsonProvider
{
public ResteasyJacksonProvider() {
Expand Down

0 comments on commit 7a0a3ed

Please sign in to comment.