Already done:
https://github.com/FasterXML/jackson-dataformat-xml/issues/228
but will be part of 2.9.0(.pr3)
If anyone observes similarly missing functionality for other context
please file issues: unfortunately this change needs to be rolled out
incrementally.
-+ Tatu +-
On Wed, Apr 12, 2017
Please note that Jackson does not guarantee that it can support all kinds
of XML.
It does aim to be able to deserialize content it serializes: so if you can
find a way to serialize content in certain XML structure, it should be
readable. But there are other structures that are not.
In this case we
Tatu,
>>
>> Thanks for responding. I think I have a similar setup here:
>> https://groups.google.com/forum/#!topic/jackson-user/QN3bVAgFluU. But you'll
>> notice that the object gets wrapped twice in serialization and expects the
>> same for deserialization. Instead of
Yes, they are immutable and thread-safe.
-+ Tatu +-
On Sat, Apr 15, 2017 at 7:45 AM, Anurag Laddha wrote:
> Can i use the same com.fasterxml.jackson.core.type.TypeReference instance
> across multiple threads?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
There is no way to do that without additional type information: if
nominal type is `Object`, JSON String will become Java String and so
forth.
-+ Tatu +-
On Wed, Apr 5, 2017 at 11:31 PM, GIN wrote:
> Dear experts,
>
> I've searched around for a while, but not find an answer. So I decide to
> po
Please explan your problem here -- if I wanted to read SO, I'd go to SO
read it.
This is not a feeder line for StackOverflow.
-+ Tatu +-
On Tue, Apr 18, 2017 at 4:50 AM, Alin Rosu wrote:
> I made a StackOverflow issue about this:
> http://stackoverflow.com/questions/43468081/android-
> jackson-
What you try to do does not make sense to me because you try to do both:
1. Specify that `Document` should use polymorphic handling (via `@JsonTypeInfo`)
2. Define exact serializer/deserializer to use
Either you should do (1), and let actual (de)serializers be created
for or defined by subtypes,
should go back and try to understand where does custom
serializer and deserializer come in: how is serialization different
from what standard Bean (De)Serializer would do?
-+ Tatu +-
>
> Thanks again for your help,
> - Dmitry
>
>
> On Wednesday, April 19, 2017 at 8:26:1
On Thu, Apr 20, 2017 at 1:28 PM, Andrew Joseph wrote:
>
> I'm looking to simply return null and add errors to a
> Map from all JsonDeserializer instances when a
> JsonMappingException is encountered (since the JSON parser can continue). In
> each of my beans, I plan to use @JacksonInject to inject
If javaslang List implementation is a mutable `List`, you can simply
register abstract type mapping:
SimpleModule m = new SimpleModule(...);
m.addAbstractTypeMapping(List.class, SlangList.class);
mapper.registerModule(m);
-+ Tatu +-
On Thu, Apr 20, 2017 at 5:21 PM, Santhosh Kumar wrote
(s)
and are responsible for trying to keep token stream in compatible
state: this is why `skipChildren()` is called for some of the cases.
Throwing exceptions generally cuts through call hierarchy and tends to
make nested deserializers get off expected state.
So choices tend to be to make handler sw
I assume this would be fixed by #211 of `jackson-dataformat-xml`:
https://github.com/FasterXML/jackson-dataformat-xml/issues/211
from reading CVE.
Note that it is downright wrong to claim that any of
`jackson-annotations`, `jackson-core` or `jackson-datatype-joda` would
suffer from it -- none of
On Wed, Apr 26, 2017 at 2:24 AM, Johan L wrote:
> We're having problems figuring out how to configure jackson to match how
> we'd like to have things. We have a bunch of legacy java classes (that we
> cannot annotate) that we'd like de-serialize from json. We have something
This is the main case
On Sun, Apr 23, 2017 at 9:12 AM, wrote:
> Tatu,
>
> I got this working as per your comment (to remove any @JsonType and
> hand-craft the serialization/deserialization of the type information). I've
> got that going in the 2nd version of the code as checked in here:
> https://github.com/hexastax/m
d anyway so callers usually pass full generic type.
It's only for serialization where convenience of passing instance
lures callers into false sense of safety :)
-+ Tatu +-
>
> On Wednesday, April 26, 2017 at 8:03:50 PM UTC+2, Tatu Saloranta wrote:
>>
>> On Wed, Apr 26, 2
One idea I have had for a while has been to investigte what level of
actual compatibility there is between "close enough" minor versions of
Jackson components.
Result is this repo:
https://github.com/cowtowncoder/jackson-compat-minor
As per repo README, while Jackson has the usual semantic versi
On Thu, May 11, 2017 at 10:20 PM, wrote:
> Dears,
>
> I just upgrade to 2.9.0.pr3 for our project because we need the feature of
> merge a json string to update an existing object or hashmap.
>
> I tested readerForUpdating works now by default deep merge the data in
> json string to an existing n
I am not sure I understand the question wrt requiring no-arguments
constructor: yes, any object that Jackson is to create must be
constructed somehow: and choice is usually either via zero-arguments
constructor, or a constructor with `@JsonCreator` annotation.
What exactly is the exception you get
Right, the only out-of-the-box facility would be managed/back reference
(@JsonManagedReference / @JsonBackReference), and would allow filling in
values but does require direct dependency and property on both sides.
-+ Tatu +-
On Fri, May 12, 2017 at 10:51 AM, Rj Ewing wrote:
>
>
> On Friday, M
On Mon, May 15, 2017 at 3:04 AM, yurivan wrote:
> Jackson version 2.8.7
>
> I have enum like this
>
> public enum ShippingMethods {
> @JsonProperty("0")
> SHIPPING_METHODS_UNSPECIFIED(0),
>
> @JsonProperty("10")
> SHIPPING_METHODS_FED_EX_PRIORITY_OVERNIGHT(10),
>
> @JsonPropert
Ok. I think I have an idea of the problem (a minimal unit test would
have been even simpler way but this works too). Could you file an
issue for `jackson-databind` please?
I suspect this is related to auto-detection of JSON Strings that look
like numbers, accidentally using ordinal() like you sugge
s simple value it is not clear what the difference
would be (handling of Enum as Map key, or element of EnumSet is
different, however).
-+ Tatu +-
On Tue, May 16, 2017 at 8:40 AM, Tatu Saloranta wrote:
> Ok. I think I have an idea of the problem (a minimal unit test would
> have been
On Wed, May 17, 2017 at 10:28 AM, Kevin Brightwell
wrote:
> Hello,
>
> I'm trying to implement some serializers/deserializers for JavaFX properties
> and have run into several issues:
>
> Jackson's annotations are not usable as the classes in JavaFX are all part
> of the JDK not my own code-base
nships, but only if
forward (managed) reference is a Collection or Map or array, but not
for multiple properties.
For more complex use cases full object identity
(@JsonIdentityReference) is needed; it works bit different (first time
instance reached it is fully serialized, including Object Id; furt
On Thu, May 18, 2017 at 4:05 AM, 'Patrick Kranz' via jackson-user
wrote:
> Hello all,
>
> I am spinning my head for two days now in the code of the Jackson Json
> Serializer and I guess it is now time to ask somebody.
>
> I am building REST-APIs with Spring boot and as they are supposed to be
> ac
ould show what is needed beyond constructor. I
don't think that is the only problem here...
Actually, also, would need to see result type (`SGSPayload`), possibly
in simplified form.
-+ Tatu +-
>
> On Friday, May 12, 2017 at 5:57:12 PM UTC-6, Tatu Saloranta wrote:
>>
>>
; but it actually might become handy for
> Collection
> and
> Object[]
>
> Do you have any ideas for the exclusion described in 1060? I'd gladly create
> a PR as currently I have to filter the objects by "not calling the method"
> :)
>
>
> W dniu środa, 22 marc
Jackson 2.8.9:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8.9
is now out, with 16 fixes (or 19, if ignore 2.8.8.1), most in
`jackson-databind` as usual.
Upgrade from earlier 2.8.x patch versions is this time strongly recommended
since there is one security fix (databind #1599),
You can register all deserializers via modules. You can not use
`SimpleModule`, since you may need bit more information (generic type
parameters), so you need to implement `Deserializers` callback that
will provide your custom deserializer.
But if you also want to use regular deserializer in some
Ok: so, the process towards 2.9.0 has been slow, but it's coming to an
end. pr4 is out; and we would really appreciate anyone who could kick
the tires and report last minute regressions compared 2.8.
Release notes are at:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9
hopefully cov
On Thu, Jun 15, 2017 at 9:11 PM, Bwmat wrote:
> Just wondering why it's an optional module, and hasn't just been integrated
> into the core? From the page it seems like a 'free' speedup.
> Cheers,
> Bwmat
Original reasoning was due to nature of the extension -- using
bytecode generation, on-the-f
At this point we must, I think, consider `jackson-module-jsonSchema`
to be unsupported, and probably dropped from Jackson 3.x as core
component.
You may want to look for other JSON Schema generators.
-+ Tatu +-
On Thu, May 25, 2017 at 11:26 PM, Vibhor Mahajan
wrote:
> I have a requirement wher
I don't think this is something I want to do at databinding level:
names should match. Trying to make sense of "almost there" cases tends
to lead problems like HTML, where complexity has grown exponentially,
in order to accommodate for what often is case of "lazy developer".
Having said that, ther
is technically
unfeasible at this point.
-+ Tatu +-
On Sun, May 14, 2017 at 9:33 PM, wrote:
> I tried with mapper.configOverride(List.class).setMergeable(Boolean.FALSE);
>
> It seems not working.
>
> On Friday, May 12, 2017 at 4:01:14 PM UTC+9:30, Tatu Saloranta wrote:
>&g
Good. And thank you for asking this -- it is indeed a good question.
-+ Tatu +-
On Tue, Jun 20, 2017 at 2:15 PM, Bwmat wrote:
> Thanks for the reply, that makes sense. I'll try afterburner out when we get
> to the point of performance testing.
>
>
> On Thursday, June 15, 2017 at 9:40:48 PM UTC-
On Tue, Jun 20, 2017 at 2:14 PM, Bwmat wrote:
> Tried with 2.8.9, same problem, but, I had an idea...
>
> replacing the line
>>public pojo(@JsonProperty(index = 0) int x, @JsonProperty(index = 1) int y)
>
> with the line
>
>>public pojo(@JsonProperty(index = 0, value = "d") int x,
>> @JsonProperty
This seems unfortunate, and I think is just a kink of the way
structural impedance between XML and JSON is resolved (JSON does not
have names for Object, only for properties; XML elements/attributes
always have names).
Could you file in issue against `jackson-dataformat-xml` for this
please? (unle
generation better.
-+ Tatu +-
On Wed, Jun 21, 2017 at 12:14 AM, Morten Kjetland wrote:
> Hi,
>
> You might want to give this project a try:
>
> https://github.com/mbknor/mbknor-jackson-jsonSchema
>
> -Morten
>
> On Tue, Jun 20, 2017 at 8:28 PM Tatu Saloranta wrote:
That sounds like a bug, make sure to file, along with version it's
reproduced with.
I recall there being some practical challenges in making defaulting work in
pluggable manner (the only other types for which this differs from 'empty'
are primitives and wrappers for them), but as per javadocs these
I haven't quite read the whole thing, but first things first: I think
that you should not try to combine `@JsonValue` with polymorphic type
handling. This is problematic because of ambiguity (during processing)
between type of Java Object being returned by method, and logical type
it represents (th
jackson-dataformats-binary` please? Ion
backend just moved there.
(or PR for extra points -- a test case would definitely make sense).
-+ Tatu +-
>
> Michael
>
>
> On Monday, June 26, 2017 at 6:39:34 PM UTC+1, Tatu Saloranta wrote:
>>
>> I haven't quite read the whol
Quick question: I would appreciate quite sanity check on this PR
https://github.com/FasterXML/jackson-databind/pull/1681
which proposes to change wording of comments and exception messages so
that "cannot" would be used in place of "can not" in most (or all?)
instances. I do not feel qualified to
see if I can start working on a PR.
>
> On Tuesday, June 27, 2017 at 12:53:18 AM UTC+1, Tatu Saloranta wrote:
>>
>> On Mon, Jun 26, 2017 at 1:08 PM, Michael Liedtke
>> wrote:
>> > Hi Tatu,
>> > The example was using the ClassNameIdResolver as the default res
The general rule is this: Jackson will deserialize polymorphic type
inclusion that uses same structure as it writes.
This means that inclusion of type id (or not) must match on
serialization and deserialization. Further, it is not possible to
either add type id where one is not expected, or drop it
Intent, simply, is not to try anything other than call `add()` on
`Collection`s (or for arrays, add at the end).
No support is planned by databind itself for any other operations.
For `Set`s this would allow replacement.
-+ Tatu +-
On Thu, Jun 29, 2017 at 5:54 AM, Christian wrote:
> Hi,
>
> I'm
On Fri, Jun 30, 2017 at 5:27 PM, Tatu Saloranta wrote:
> Intent, simply, is not to try anything other than call `add()` on
> `Collection`s (or for arrays, add at the end).
> No support is planned by databind itself for any other operations.
> For `Set`s this would allow replacement.
ne 27, 2017 at 6:29:44 PM UTC+2, Tatu Saloranta wrote:
>>
>> Quick question: I would appreciate quite sanity check on this PR
>>
>> https://github.com/FasterXML/jackson-databind/pull/1681
>>
>> which proposes to change wording of comments and exception messages so
On Wed, Jul 5, 2017 at 2:59 PM, Ron wrote:
> Hello,
>
> In YAML, a numeric key actually has a type of a number and not a string.
> To avoid ambiguity when converting YAML and JSON, numeric keys need to be
> quoted to be considered strings.
> In fact, you can have both a quoted and unquoted numeric
How are you accessing the data?
If using databinding, it should be as simple as declare type to be `byte[]`
for the field or Map value, like:
class POJO {
public Map stuff;
}
and it'll work.
The other part is that Ruby side must encode things appropriately; either
as binary value, or, if as
Ok it is finally happening: Jackson 2.9.0 will be released during this
week, before end of July.
All the features I thought as must-haves are in, as well as blocking fixes.
Or at least I think this is the case for core components (annotations,
streaming, databind).
I have also tried to go over othe
We finally have Jackson 2.9 release out: core components, standard
modules (except Scala module which should follow soon) all should be
in Maven Central.
Full release notes can be found at:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9
I will try to send a better summary of new f
Ok: this is where distinction between `value` and `content` differ,
for Maps (and referential types). I think your question is similar to
one I had when deciding earlier that 2 properties are needed.
Basic `value`, like
@JsonInclude(Include.NON_EMPTY)
would only exclude "map" itself, and only if
Tuesday, August 1, 2017 at 2:14:06 PM UTC-7, Tatu Saloranta wrote:
>>
>> Ok: this is where distinction between `value` and `content` differ,
>> for Maps (and referential types). I think your question is similar to
>> one I had when deciding earlier that 2 properties are
On Mon, Jul 31, 2017 at 3:34 PM, Drpbxa wrote:
> When you annotate a property with @JsonUnwrapped you can set a prefix
> attribute:
>
> @JsonUnwrapped(prefix="camel")
> MyObject obj;
>
> If MyObject has a property named "casedProperty", the json key will be named
> "camelcasedProperty" instead of
On Mon, Jul 31, 2017 at 3:28 PM, Drpbxa wrote:
> When you annotate a property with @JsonUnwrapped you can add a prefix
> attribute. For example:
>
> @JsonUnwrapped(prefix="camel")
> MyObject obj;
>
> If MyObject has a property "casedProperty", the json key will be
> "camelcasedProperty" instead of
On Thu, Jul 20, 2017 at 6:06 AM, Adrien Quentin
wrote:
> Hello,
>
> I'm trying to use jackson deserialization to parse and map java object.
> Work fine except when the xml contains two same local names in differents
> namespaces, like this :
>
>
>
>
>
>
>
>
> Borehole description
>
> http://ww
On Tue, Aug 8, 2017 at 4:03 PM, Matteo wrote:
> Hello!
>
> I'm trying to write a custom serializer that can transform the following
> structure
>
> {
> "a": {
> "@context": "context-a",
> "aKey": "aValue"
> },
> "b": {
> "@context": "context-b",
> "anoth
mination logic will work in this case as well. Is this
> correct?
Yes, that should work.
-+ Tatu +-
>
> On Monday, 6 March 2017 19:44:56 UTC-5, Tatu Saloranta wrote:
>>
>> On Fri, Mar 3, 2017 at 3:16 AM, Jothisubaramaniam P
>> wrote:
>> > There is one set
`findTypeValueSerializer()`) are relevant for
polymorphic handling.
Regardless of which method you call, use of resulting serializer
should be the same as in your original example.
-+ Tatu +-
>
> Thank you!
>
> matteo
>
> On Wednesday, August 9, 2017 at 9:44:59 PM UTC+2, Tatu Salorant
On Thu, Aug 10, 2017 at 9:49 AM, Chris Slater wrote:
> It looks like the jackson-modules-java8 jars are missing from the Maven
> central repo. Only the pom files are there.
>
> https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-java8/2.9.0/
>
> (Other versions are
There are 2 variants of Jackson JAX-RS providers:
http://repo1.maven.org/maven2/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.9.0/
and what you'd want is "no-metainf" one -- it does not include SPI for
indicating as provider.
I think you can specify that with Maven "classifier" for de
Since you are using default typing, this is how things work -- why would
you not expect type information?
Perhaps you could share your object model and explain why you think typing
should not affect contents the way it does.
-+ Tatu +-
ps. In future when asking questions about "why does X happen
On Tue, Aug 15, 2017 at 4:10 PM, Jama A wrote:
> I used
> `com.fasterxml.jackson.databind.introspect.AnnotatedMember#getContextClass`
> in my project to get actual sub-class name that field has a value. But it
> was removed in this commit [Starting work on ensuring proper resolution of
> member ty
.5, there're used to be
>> annotatedMember.getContextClass(); which used to return Bar class for the
>> fields that declared in the parent class. But now I don't have that method
>> in 2.8, but the only option I see is that
>> annotatedMember.getDeclaringCla
The very first suggestion, as always, is to make sure you use the latest
patch for minor version: in this case, 2.8.9.
Getting an `ArrayList` is a sign that type information is not available (it
is what is bound for `java.lang.Object` valued properties, from JSON Array).
But in this case I do not
On Fri, Aug 18, 2017 at 1:32 PM, Vladimir wrote:
>
> I implement the ResolvableDeserializer within my custom deserializer, which
> gives me the reference to the default JsonDeserializer.
> Id like to invoke the default deserializer on the "Jail" JsonNode to return
> to me a Jail object
>
> public
from `deserialize()`, or from initial call to
`resolve()`.
-+ Tatu +-
>
>
>
> On Friday, August 18, 2017 at 4:38:24 PM UTC-4, Tatu Saloranta wrote:
>>
>> On Fri, Aug 18, 2017 at 1:32 PM, Vladimir wrote:
>> >
>> > I implement the ResolvableDeserializer with
ndNonContextualValueDeserializer()` (difference being whether you
have access to
`BeanProperty`, which is made available in `createContextual()`, but not during
`deserialize()`).
And with that you can delegate to deserializer you get.
-+ Tatu +-
>
>
> On Friday, August 18, 2017 at 6:28:40
I hope others have something, but for now examples from `jackson-core`
tests may have to suffice.
Or, anything that describes how `aalto-xml` non-blocking mode works
should be highly applicable.
In nutshell, the only differences are:
1. You must construct non-blocking parser with new method
`crea
Short answer is that this class has not been designed as an extension
point, and was made `final` to prevent anyone from attempting to do
that.
I am not questioning that ability to extend could be useful; it just
hasn't been ready for such usage (... whereas some other classes are
non-final even if
e guaranteed (... in which case
non-blocking may not be valuable anyway) they should not be used.
-+ Tatu +-
>
>
> On Sunday, August 20, 2017 at 5:11:48 PM UTC-7, Tatu Saloranta wrote:
>
>> I hope others have something, but for now examples from `jackson-core`
>> tests may hav
On Sun, Aug 20, 2017 at 1:48 PM, Vladimir wrote:
>
> Thank you for the response once again.
>
> As you suggested I am using "findNonContextualValueDeserializer" to locate
> deserializer for a given type I expect.
>
> JsonNode eventNode = jsonTree.get("event");
>
> ctxt
>
> .findNonContextualValueD
On Fri, Aug 25, 2017 at 9:45 AM, 'Stephen Murby' via jackson-user
wrote:
> I have just implemented some read only fields on an api using MixIn to
> enforce the rename and also the ignore on deserialisation. Like this
>
> @JsonProperty(access = JsonProperty.Access.READ_ONLY, value =
> "_privateProp
On Fri, Aug 25, 2017 at 3:36 AM, Anthony Roy wrote:
> Hi all,
>
> I have googled this issue to death with no joy, so am trying on here...
>
> Here is the initial problem:
> 1. I am using JAXB to generate a Java object model from a provided XSD.
> 2. There are various integer fields in the schema.
On Mon, Sep 4, 2017 at 4:00 AM, <269...@gmail.com> wrote:
> Hello,
>
> I have Spring MVC application with asynchronious enpoints.
>
> @Entity
> @Table
> public class B {
>
> @Id
> @GeneratedValue
> private UUID id;
>
> @ManyToOne(fetch = FetchType.LAZY)
> @JoinColumn(name = "a_
After going through initial bug reports for 2.9.0 -- most of which
were minor bugs (yay!) -- it was time to do the first patch. Full
release notes are here:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9.1
(although note that some fixes were only listed for 2.8.10, so this is a sub
On Thu, Sep 14, 2017 at 2:21 PM, David Herron wrote:
> I'm writing a SpringBoot application where I'm creating a REST API from a
> fairly complex object model that was created in UML. The guys who created
> the UML defined several classes that inherit from other classes and in some
> cases overri
On Wed, Sep 20, 2017 at 6:47 AM, 'tykefr' via jackson-user
wrote:
> I think I must be very dim, but I can't find the support for deserializing
> arbitrarily nested collections. Serialization works fine in all cases.
> And I've no problem with
>
> @JsonDeserialize(contentAs = FooImpl.class)
>
Sounds like something to do with Hibernate's use of lazy loading, and
serialization being triggered in a way that its Session is closed. I
don't see anything in exception that suggests problem being related to
parent/child (managed/back) reference handling.
I have never used Hibernate myself so I c
On Wed, Sep 20, 2017 at 2:06 AM, Matthias wrote:
> Hi,
>
> I have (approximately) the following code:
>
> @JsonAutoDetect
> class Container {
> private final List entries;
> }
>
> @JsonAutoDetect
> @JsonTypeInfo(property="_type", include=JsonTypeInfo.As.PROPERTY,
> use=JsonTypeInfo.Id.NAME)
>
On Thu, Sep 21, 2017 at 4:26 AM, Mikko Ahonen
wrote:
> Hello,
>
> I wish to create a default security policy in a very large system.
>
> My current approach is to come up with a deserialization configuration where
> all JSON strings are sanitized in the following way:
> - by default, all strings a
On Thu, Sep 21, 2017 at 11:06 AM, Andrea Bergonzo wrote:
> Why `ObjectMapper.writeValue` serializes boxed primitive types (like `new
> Integer(1)`) as a value "1" even if it is not a valid JSON and the docs
> state "Method that can be used to serialize any Java value as
> * JSON output"?
>
>
AM UTC+12, Tatu Saloranta wrote:
>>
>> Sounds like something to do with Hibernate's use of lazy loading, and
>> serialization being triggered in a way that its Session is closed. I
>> don't see anything in exception that suggests problem being related to
>&g
Glad you got it working -- this is bit of a complex example, both due
to generic typing (or lack thereof), and challenges in supporting
nested type definitions for properties.
One practical challenge is that while Annotations can refer to other
Annotation values (in addition to Strings, Classes, En
On Thu, Sep 21, 2017 at 11:59 PM, Mikko Ahonen
wrote:
> On Thursday, September 21, 2017 at 10:54:29 PM UTC+3, Tatu Saloranta wrote:
>>
>>
>> I think you want to have a look at `JsonGenerator.getCurrentValue()`,
>> which is a short-cut for longer
>>
&g
On Mon, Sep 25, 2017 at 4:58 AM, Clément Poulain wrote:
> Hi there,
>
> I have a REST API project based on Jersey (v2.22.1) where I'm using Jackson
> (currently v2.8.9) to serialize my POJOs in HTTP answers.
> I'm using @JsonProperty to force the usage of setters (required for my
> needs) and I do
What is missing here is piece of code to reproduce the results.
Specific question is what is the serialization call, and type
information that is given.
There are couple of things that may go wrong with type erasure, if the
polymorphic class is the root value (or is generic and needs type
binding).
+1 for trying that generator -- question of what to do with the
current generator (module under FasterXML) is still open with respect
to Jackson 3.
There are enough problems (f.ex only supporting schema spec v3; lack
of active maintainer) that I am contemplating deprecating it, as there
are better
No, Jackson does not use or support external configuration mechanisms.
-+ Tatu +-
On Wed, Sep 27, 2017 at 3:45 PM, Peter Smith wrote:
> I think some third party software i'm using, Talend Open Studio, uses
> Jackson to to mapping from xml to json.
>
> I'm wondering if it's possible to turn the
On Tue, Sep 26, 2017 at 3:41 AM, David Rodriguez Gonzalez
wrote:
> Hello,
>
> I am trying to serialize into XML this:
>
> public class Box {
>
> private T boxed;
> }
>
> with the next specific class type:
>
> public class Person {
> // fields
> }
>
> but I get the next xml:
>
>
> ...
Apologies for super slow reply here.
I think that the change to (implied) attribute is accidental and
resulting from some unexpected interaction between data-binding and
xml generator, so it just happens to work that way I think. In case of
unwrapping I would expect output as attribute not to work
On Fri, Sep 29, 2017 at 8:51 AM, Paolo Bazzi wrote:
> Hi all,
>
> Two questions regaring setter-lookup when deserializing a java POJO:
>
>
> 1. How to enable the usage of setter using with-notation (builder-style)
> instead of setXy() notation?
>
> static class StringPoJo {
> private String
On Mon, Oct 2, 2017 at 11:39 AM, Xin Zhang wrote:
> Is ObjectMapper.writeValueAsString is the best way to serialize a jsonNode?
> I found it is slow. Could someone tell me that is there faster way to
> serialize jsonNode?
Yes, use of ObjectMapper (or ObjectWriter) is the supported way to
serializ
On Sun, Oct 1, 2017 at 5:41 PM, wrote:
> I would like Jackson to populate content of final pre-instantiated fields
> (of an embedded class) rather than instantiating them while loading their
> owner class.
> The reason is that the embedded class is to be used in many places but it
> needs to be i
On Mon, Oct 2, 2017 at 11:24 AM, wrote:
> Hi guys, question about how to serialize a json object to string?
> ObjectMapper.writeValueAsString?
Yes, for cases where you actually need a `String` that is a good method.
In most cases it is better to directly serialize to `OutputStream` or
`Reader`,
On Mon, Oct 2, 2017 at 3:55 AM, Paolo Bazzi wrote:
> Hi Tatu
>
> Thanks for your quick reply!
>
> Am Freitag, 29. September 2017 20:07:42 UTC+2 schrieb Tatu Saloranta:
>>
>> On Fri, Sep 29, 2017 at 8:51 AM, Paolo Bazzi wrote:
>> > Hi all,
>> >
&
It probably won't matter too much, but as a general practice the very
first thing you should do is to use latest patch version of the minor
version:
so instead of using 2.8.2, try 2.8.10. There are literally dozens of
fixes within 8 patch releases and it is good to eliminate possibility
of problem
As per title, another patch for 2.9 is out. Fixes are listed on:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9.2
Number of fixes is relatively low for an early patch, as 2.9 seems to
have had less teething trouble than most earlier 2.x releases. Upgrade
is still recommended, but m
On Sat, Oct 14, 2017 at 12:39 PM, Ryan Lubke wrote:
> Hey Folks,
>
> Fairly new to Jackson, so if this is covered in the docs somewhere, my
> apologies.
>
> I'm working on a POC to serialize objects between Python and Java using a
> Python library called jsonpickle [1]
>
> Everything has been wor
That does seem odd, especially given that serialization by Jackson
should not trigger use of any setter. Setters should only be used for
deserialization.
I also can not find any exception message within `jackson-databind`,
or for Afterburner module (which seemed like a possibility).
Would it be po
201 - 300 of 1004 matches
Mail list logo