I am not an expert with Weblogic, but I suspect there may be some
dependency that includes component that prevents use of Jackson. So...
Let's see: yes, you need jackson components:
- jackson-jaxrs-json-provider
- jackson-databind
- jackson-core (dependency of databind)
- jackson-annotations (dependency of databind)
of which last 2 may be brought as dependency anyway. For these version
2.8.7 makes sense.
> <dependency>
> <groupId>com.fasterxml.jackson.jaxrs</groupId>
> <artifactId>jackson-jaxrs-json-provider</artifactId>
> <version>2.8.7</version>
> </dependency>
>
This, I think, should not be included, and may bring "wrong stuff"
> <dependency>
> <groupId>org.glassfish.jersey.media</groupId>
> <artifactId>jersey-media-jaxb</artifactId>
> <version>2.25.1</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>com.fasterxml.jackson.core</groupId>
> <artifactId>jackson-annotations</artifactId>
> <version>2.8.7</version>
> </dependency>
> <dependency>
> <groupId>com.fasterxml.jackson.jaxrs</groupId>
> <artifactId>jackson-jaxrs-json-provider</artifactId>
> <version>2.8.7</version>
> </dependency>
Also remove this: it could use old (Jackson 1.x) version of things.
In fact, that may be the main problem here:
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-jaxrs</artifactId>
> <version>1.9.13</version>
> </dependency>
>
>
>
> I'm totally lost because I think that whatever I do weblogic doesn't seems
> to use jackson. I have set some breakpoint in jackson code but no call.
> Any help would be appreciated.
> So the goal is just to have my list of rules name "rules" insteand of
> "Rule".
One other thing: by default, Jackson does not add such wrapper, as
it's more a result of XML/JSON impedance (wrapper is needed in XML due
to different data model).
So while annotation `@JsonRootName` (or JAXB equivalent thereof) will
indicate what wrapper to use if need be, wrapping is not added unless
SerializationFeature.WRAP_ROOT_VALUE
is enabled. You may already be doing that, but if not, that'd be needed.
It may configured as default for `ObjectMapper`, or configured for
`ObjectWriter`.
I assume here former would be easier since JAX-RS provider controls
use of settings.
Hope this helps,
-+ Tatu +-
> Best Regards,
> Claude
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jackson-user...@googlegroups.com.
> To post to this group, send email to
jackso...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.