This is tricky, and in general there isn't way to force "raw"
inclusion for pass-through data: content must be first decoded from
XML, and re-encoded. It would not be possible via Stax, even with
direct access.
However, question of escaping '>' (which Woodstox only does if it's
part of "]]>", as r
Oh. Actually, never mind that one. I should have checked the link
first -- this is for JSON output.
What Woodstox offers is, as per issue you filed (thanks!) property
`P_TEXT_ESCAPER`.
Wiring this via `CharacterEscapes` would be the clean way.
Until then, this thread:
http://forum.spring.io/forum
No, for two reasons:
1. JsonNode is singly linked, only parent -> child linkage (not a
problem for root node itself, but in general)
2. JsonNode does not have JsonLocation, since this is not needed in general
to get location information, you need to use JsonParser directly, or
sub-class JsonNode
As some of you may have noticed, I started pushing Jackson 2.8.5 patch
release yesterday.
Core components are out, as well as datatypes, base modules, and half
of dataformats.
I still need to figure out one thing wrt binary dataformats but hope
to push them tonight (within 12 hours); after which JA
Thank you for reporting this: I will update documentation as suggested!
-+ Tatu +-
On Mon, Nov 7, 2016 at 3:23 AM, Alexander Mironenko
wrote:
> Hi all,
>
> Just found the behaviour relate to JsonIgnore annotation. The cause is
> described here: http://stackoverflow.com/questions/27571380/
> jac
Unfortunately there is no mechanism currently to force Map values to
be written out as attributes: such facility only exists for POJOs.
In theory something could be added to allow marking somehow (perhaps
annotation) the intent that Map values should be written out as
attributes. Challenge is two
Yes, target must have something to attach mix-ins to: mix-in classes code
is never used for anything, just annotations.
But anything target class has (or its super-classes) should be legal target.
Do you have an example of target/mix-in class to show what you want to do;
looking at code can not gi
No, you'll have to handle it on your own; possibly by using separate
`XmlMapper` for values.
-+ Tatu +-
On Mon, Nov 28, 2016 at 11:28 PM, wrote:
> How do I parse a json containing xml as string in one of the field.
>
> Pojo:
>class A {
> B b;
> int val1;
> string s;
>}
>
Unfortunately handling of TypeIdResolver is quite strongly coupled
with that of `TypeResolverBuilder`, and your best route would probably
be via annotation introspector. Although I actually like your approach
above: did not know it would actually work (I spent some time back in
the day trying to fi
wrote:
> no that's fine, sounds like a clean design - mixins are for annotations,
> that's all. i was trying to add a factory method that only existed in the
> mixin, i just used a value instantiator instead.
>
> On Tuesday, 29 November 2016 18:43:30 UTC, Tatu Saloranta
On Fri, Dec 2, 2016 at 2:00 PM, Michael Harris
wrote:
> Hi all
>
> We have an interesting issue where we are using one model and two json
> schemas. We have had good luck using ObjectMapper.addMixin to basically set
> up the translation of the model for the relevant schema. Now we have an
> issu
Everything else done a long ago. Not sure what Scala status is.
-+ Tatu +-
On Thu, Dec 8, 2016 at 1:02 PM, Steve A.
wrote:
> What's the lastest status on 2.8.5 esp. wrt scala?
>
> On Tuesday, November 15, 2016 at 2:36:10 PM UTC-5, Tatu Saloranta wrote:
>>
>> As some
For sake of completeness (full desc in issue filed): there is no way
to match the behavior with code, because usage can not be fully
supported. This was not known at the time API was left open.
The underlying issue is that generic `java.lang.reflect.Type` types
can only be fully and reliably resol
Quick answer is that you are probably hitting this:
https://github.com/FasterXML/jackson-databind/issues/1410
and the underlying problem here is that you have both "type" metadata
property (default for `@JsonTypeInfo`) and data property "type".
Either you should not add data property at all (comm
On Tue, Dec 13, 2016 at 8:41 AM, Lev Kuznetsov
wrote:
> Instinctively I'd like to avoid having the @JsonGetter method at all as I
> feel the @JsonTypeInfo should do everything for me, afterall it does on the
> deserialization. I'm fine with including it as As.EXISTING_PROPERTY since it
> produces
There is nothing automatic, since where `null` removal does not
generally change meaning of POJOs (since properties default to
`null`), JSON Arrays are index-based on null removal would generally
change meaning as it changes position of remaining values.
So it is not supported by any settings: you
The reason for (4) is the good old Java Type Erasure.
What you writing out is essentially `Map`, as far as available
type information tells -- there is nothing that could tell otherwise.
So as general rule:
- Do not serialize generic values as root value, if possible.
o but if you do, you MUS
On Thu, Dec 15, 2016 at 8:13 AM, Lev Kuznetsov
wrote:
> But why would the type erasure on the map be the deciding factor here? The
> type of the value is known at runtime, it is Bar, it has a property lol -
> that gets serialized no problem, clearly it knows the type and therefore can
> see the @J
On Thu, Dec 15, 2016 at 11:47 AM, Literate Aspects
wrote:
> How can take my remote data (generated by a Model class bean and a remote
> data connect bean displayed in xhtml VIEW [live xhtml VIEW][1]) and convert
> -- that POJO into a JSON string -- to use in jquery objects?
>
>
> Seeking an exampl
First: how would you know how many have seen your message? Just
because there are no answers does not mean much: mailing lists
messages are sent as emails and there is no way to track that. It is
possible that Web UI has separate counts.
Second: what's with the entitlement? Do you really expect ev
That should work: you do need 2 separate ObjectMappers, and a way to
change polymorphic type inclusion.
If using default typing it's simple (just setting for mapper), but
otherwise need to apply changes to settings. Options I would have
suggested include:
1. Use of mix-in annotations (to add or ov
Quick note: I am now on vacation, and while I may be checking (and
occasionally responding) my emails, I won't be working on any issues. I
will be checking the backlog in january so no reason not to file bugs, add
updates, but my follow-up will be slower than usual.
Happy holiday season to everyon
, Tatu Saloranta wrote:
> Quick note: I am now on vacation, and while I may be checking (and
> occasionally responding) my emails, I won't be working on any issues. I will
> be checking the backlog in january so no reason not to file bugs, add
> updates, but my follow-up will be
These are dynamically loaded, so they should not prevent use on pre-java-8
platforms.
Detection is done dynamically by trying to load the class you reference; if
that fails, that part of functionality is disabled.
So this should not prevent usage; warning itself should be harmless.
If there is a b
On Tue, Dec 20, 2016 at 9:52 PM, Vikrant Chaudhary
wrote:
> Jackson is serializing Map to Map if value is
> like 1.0 it would be serialized as 1. Please let me know if there is a way
> to keep this float value as it is or if I can covert it to a string, so the
> output will be like "1.0".
I think
On Wed, Dec 21, 2016 at 8:55 AM, Marvin Addison
wrote:
> I'm interested in implementing something similar to the following:
>
> http://stackoverflow.com/questions/16488951/jackson-polymorphic-deserialization-can-you-require-the-existence-of-a-field-i
>
> Thus the selection of a class for deseriali
On Wed, Dec 28, 2016 at 1:48 PM, Milan Milanov wrote:
> From the couple of threads i read both here and on Github, I'm left with the
> impression that Jackson handles correctly the case where a POJO contains a
> list of some "polymorphic" type, during serialization. For example, an
> instance of a
JavaType construction itself looks ok. So that should not be causing
the problem. Without seeing more of code it is hard to know what could
be causing the issue: so a code snippet that contains call to
`readValue()` (or even better unit test) would be needed to resolve
the issue.
-+ Tatu +-
On Tu
There is no built-in support for specifically filtering out named
fields, although doing this using @JsonFilter should be possible. It's
briefly explained at:
http://www.cowtowncoder.com/blog/archives/2011/02/entry_443.html
and in bit more detail at:
http://www.cowtowncoder.com/blog/archives/201
Sounds definitely peculiar... and not something I can immediately tie
into specific thing.
I don't think any code within `JsonParser` does (or is allowed to)
modify contents of input buffer, although obviously
pre-/post-increment operator would sound like something that could be
relevant here.
On
On Wed, Jan 11, 2017 at 3:45 AM, wrote:
> Hi,
>
> I am familiar with the issues
> https://github.com/FasterXML/jackson-databind/issues/265 (i.e., using
> @JsonUnwrapped within a @JsonCreator) and others, but in the end, I couldn't
> find the correct way of using @JsonUnwrapped with @JsonCreator (
additional copy from external buffer to internal one).
Doing that could help suggest where the problem occurs.
-+ Tatu +-
On Mon, Jan 9, 2017 at 2:57 PM, wrote:
> I'm not using afterburner.
> Input is byte array.
>
> Brian
>
> On Monday, January 9, 2017 at 1:25:31 PM UTC
o such improvement has been made yet.
>
> Of course not using @JsonUnwrapped is not an option here :)
>
> Thanks for your help in any case!
Likewise!
-+ Tatu +-
>
> Le mercredi 11 janvier 2017 21:53:14 UTC+1, Tatu Saloranta a écrit :
>>
>> On Wed, Jan 11, 2017 at 3:45 AM, w
Ignored in what way? What is happening? What does your
`JsonViewOverrideSerializer` look like?
One common problem is that all delegating serializers MUST implement
`ResolvableSerializer` and `ContextualSerializer`, and delegate them
to underlying serializer -- otherwise that instance can not be
re
I am also bit puzzled by the original question, so perhaps it is good to
indicate that by default Jackson core (JsonParser) does two things to ALL
json property keys:
1. Canonicalizes them so that there is only one instance of each distinct
key (like "property"): no new Strings are allocated. This
Although Jackson has had Avro backend for quite a while -- in fact, it
was introduced in 2.1, over 4 years ago -- it hasn't been widely
adopted, and feature-wise there has been much development
aside from bug fixes (big thank you to all adopters who have reported them!).
Lately there have been a f
No, currently there is no way to have what amounts to
multiple-argument setters. From annotation perspective it should be
possible to just use `@JsonSetter` for such methods, but internally
those are not yet supported.
They would be nice to support, but would likely require lots of work
due to inte
One problem I see is the use of `As.EXTERNAL_PROPERTY`: this is not
what you want based on expected json structure.
Instead you probably just want to use plain `As.PROPERTY` (unless you
want to also map it to a regular, existing property, in which case
`As.EXISTING_PROPERTY` may be more appropriate
Apologies for a slow response here: yes, once this:
https://github.com/FasterXML/jackson-dataformats-binary/issues/35
gets into release (2.7.9 and 2.8.7) this will work using
`SequenceWriter`, like so:
SequenceWriter w = mapper.writer(schema)
.writeValues(file);
w.write(item1);
stance.class, name =
> "unknown")})
> public abstract class ObjectInstance implements Serializable {
> private static final long serialVersionUID = -8515880933242237477L;
> private List fields;
> }
>
>
> Br
>
> On Friday, January 20, 2017 at 11:57:44 PM U
Since this has been asked a few times (every now and then), it would
be great if existing settings could be shared -- I am pretty sure they
do exist. This would help developers on Android platform.
A section for `jackson-docs` or just README of `jackson` dedicated to
things to consider on Android
For what it is worth, I added the contribution Tobias kindle sent under:
https://github.com/FasterXML/jackson-docs/wiki/JacksonOnAndroid
and if/when others have improvement suggestions or alternatives,
please let us know.
I think these are exactly kinds of things developers would find
valuable to
Yes, you can serialize a Java object as CBOR using Jackson's
`jackson-dataformat-cbor` as extension of `jackson-databind`. As you
would know by reading the README at:
https://github.com/FasterXML/jackson-dataformats-binary/tree/master/cbor
it's something like:
ObjectMapper mapper = new Object
I can not think of anything specific in this area that would cause such
problems.
The first thing I would strongly recommend, however, is to upgrade to the
latest patch of the minor version you have: there is absolutely no reason
to use 2.6.1 over latest one, 2.6.7.
If the problem still persists,
I am not aware of any plans to make changes to allow multiple
concurrent views at the same time.
The intent has been that since View identifiers are classes (which
includes interfaces), you can already combine Views to some degree by
inheritance (interfaces that extend multiple interfaces, classes
Ok, code has a few problems.
First: method `constructFromCanonical()` really isn't meant to be
end-user functionality.
Maybe Javadocs should make this clear, but it is not something I was
planning to be used by anything but core Jackson functionality. I can
sort of see why it might seem useful, bu
Please file an issue against `jackson-databind`.
-+ Tatu +-
On Mon, Jan 30, 2017 at 10:23 PM, Charan Kumar wrote:
> Hi,
> I am getting the following error when I try to deserialize an Object with
> a Builder and @JsonAnySetter on a field.
>
> Error:
> *com.fasterxml.jackson.databind.JsonMappi
So far pushed out core components (annotations, streaming, databind),
base modules.
Will proceed with dataformats, datatypes and then languages (kotlin, scala).
As usual, process may take a while.
This is likely to be the last 2.7.x release for a while; it may even
be the last patch.
But branch is
There is no functionality to do it the way you suggested (although
immutability of classes is not a blocker, you could use mix-in
annotations).
But wouldn't it be simpler to use a simple wrapper structure to get
structure match the output, instead of trying to change the whole
serialization logic
That sounds like an odd result. From code it looks like simple valid
usage that sound not fail.
Are you using a recent Jackson version? (2.7.9 or 2.8.6)
-+ Tatu +-
On Wed, Feb 8, 2017 at 9:44 PM, Solar Entropy wrote:
> Not entirely sure where to ask for help with this, but I'm having an issue
>
I don't know of any specific facility, and since Jackson specifically
stays of Transformation use cases (with some minor exceptions for
simple unwrapping), it may be out of scope for automated handling.
Having said that I would think a common pattern would be to read input
as tree (`JsonNode`), ma
I have not heard of such problem.
But make sure NOT to disable `FAIL_ON_UNKNOWN_PROPERTIES`
DeserializationFeature -- (too) many developers automatically disable
this feature, and end up hitting all kinds of issues that are not
reported.
While the feature may make sense to enable in production (an
; mode.
>
> Jonathan
>
> On Friday, 10 February 2017 19:19:59 UTC, Tatu Saloranta wrote:
>>
>> I have not heard of such problem.
>>
>> But make sure NOT to disable `FAIL_ON_UNKNOWN_PROPERTIES`
>> DeserializationFeature -- (too) many developers automatic
difySerializer() called for
> Collection?
Because `modifyCollectionSerializer()` is called for it; they are type-specific.
-+ Tatu +-
>
> Thanks,
>
> On Tuesday, February 7, 2017 at 8:28:56 PM UTC+1, Tatu Saloranta wrote:
>>
>> There is no functionality to do it the way you s
On Wed, Feb 15, 2017 at 11:38 AM, Mike Price wrote:
> I am currently attempting to implement some of the tricks described in this
> presentation to increase performance. I would like to be able to change a
> particular ObjectMapper instance to serialize all POJO's using a particular
> JsonFormat.S
On Thu, Feb 16, 2017 at 1:43 PM, David Hayek wrote:
> If I have to serialize an object that I can not annotate and that contains
> parent-child relationship, such as a DefaultMutableTreeNode, I can avoid the
> infinite recursion/stack overflow problem by supplying an ObjectIdGenerator
> from the f
Usually my first guess is that configured `ObjectMapper` is not being
used at all.
So if you can re-configure mapper in some other way (like default to
indenting or something) maybe you can eliminated the possibility that
this mapper is not being used?
Another small thing is that `findAndRegisterM
probably work better, if I understand use
case.
-+ Tatu +-
>
> Thanks
>
> David
>
>
>
>
>
> On Thursday, February 16, 2017 at 4:40:19 PM UTC-6, Tatu Saloranta wrote:
>>
>> On Thu, Feb 16, 2017 at 1:43 PM, David Hayek wrote:
>> > If I have t
to just
omit value (f.ex. in case property is to be serialized, name is
already written); except if property itself
is to be excluded (using `@JsonInclude` mechanism for example).
-+ Tatu +-
>
> Thanks
>
> David
>
>
> On Friday, February 17, 2017 at 1:49:47 PM UTC-6, Tatu Salora
>> What do you meant by "re-configure mapper in some other way". Could you
>> please provide some more details?
>> My guess is that JacksonJsonProvider is not getting used at all. How do
>> you I know that?
>>
>> -Nikhil
>>
>> On Saturday, Fe
Um, how are we supposed to help if you don't provide either:
1. Classes you use for reading/writing
2. JSON being read (or expected to be written)
?
Including list of symptoms may help but these two things are the most important.
-+ Tatu +-
On Fri, Feb 17, 2017 at 1:54 PM, vivek sharma
wrote
As per title, 2.8.7 is being released. Change list at:
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8.7
and upgrade is, as usual, recommended; although nothing considered
generally critical fix was included this time (YMMV of course).
We are also getting very close to 2.9.0.pr1; h
Almost but not quite. Use of
`@JsonTypeInfo(include=As.WRAPPER_OBJECT)` would indeed allow use of
JSON property name as type identitifier. This would work for property
values, and Lists/Arrays, but not quite the way you'd want for Maps.
So if I understand use case correctly, there is nothing out o
As per:
https://github.com/FasterXML/jackson-module-scala/issues/295
and thanks to Morten's work, Scala module once again at parity with
other modules.
Including support for Scala 2.12.
This, along with use of `jackson-bom` versions 2.7.9 and 2.8.7 should
allow much smoother upgrades and version
One of remaining "big ticket items" I still hope to implement for
Jackson 2.9 is so-called "safe" ObjectReader and ObjectWriter. This
means reader/writer that only exposes unchecked exceptions; by
necessity wrapping (or perhaps converting) regular `IOException`s and
`JsonProcessingException`, `Json
as further context.
-+ Tatu +-
>
> On Tuesday, February 21, 2017 at 12:00:58 AM UTC-5, Tatu Saloranta wrote:
>>
>> Almost but not quite. Use of
>> `@JsonTypeInfo(include=As.WRAPPER_OBJECT)` would indeed allow use of
>> JSON property name as type identitifier. This wou
On Thu, Feb 23, 2017 at 5:33 AM, wrote:
> Hello,
>
> I have the following scenario:
>
> * Map
>
> * CustomClass contains a field Map, and has a
> CustomClassSerializer registered in module added to the ObjectMapper
>
> * the CustomClassSerializer calls enableDefaultTyping() on the ObjectMapper
What is compact1 profile?
-+ Tatu +-
On Mon, Feb 27, 2017 at 3:13 AM, Ferry Huberts wrote:
> I would really like to run the jackson bundles under compact1 profile for my
> JSON serialisation.
>
> Is it possible to adjust the databind bundle so that it only uses the
> compact1 profile?
>
> Thanks
Looking at the exception output, interesting part is this:
at [Source:
start_date=28%2F02%2F2017+14%3A01&end_date=01%2F03%2F2017+14%3A03&report_date=01%2F03%
which gets printed because input comes as a String (otherwise wouldn't
print, although Jackson 2.9 does improve on this a bit). So inpu
Jackson databind has no idea where calls comes from, so by default no.
JAX-RS provider could theoretically pass this information, but this
has not been wired.
I think you could build something using `ObjectReaderModifier` and
`ObjectReaderInjector` to pass information from endpoint, using
context
On Fri, Mar 3, 2017 at 3:16 AM, Jothisubaramaniam P wrote:
> There is one set of definition as follows:
>
> @JsonTypeInfo(
> use = JsonTypeInfo.Id.NAME,
> include = JsonTypeInfo.As.EXISTING_PROPERTY,
> property = "type",
> visible = true)
> @JsonSubTypes({
>
The problem with your code is that you are for some reason assuming
that `user` would be dropped for some reason: it is not. JSON
structure that would be equivalent is rather:
{ "user" : {
"name" : "Joe",
"age" : 28
}
}
So basically there is no 'age' property in main level object: the
be possible to use
Jackson without access to these classes, but not build.
It should be possible to test this out if anyone has such environment to try.
-+ Tatu +-
On Wed, Mar 1, 2017 at 3:06 AM, Ferry Huberts wrote:
>
>
> On Wednesday, March 1, 2017 at 2:14:27 AM UTC+1, Tatu Salora
Jackson XML backend does not really support mixed content -- content model
that has both non-whitespace text AND elements. This is difficult to
represent with databinding, and is mostly operated with XML-centric models
like DOM.
There has been some talk about exposing this in some form or fashion,
in Jackson? For example, if I wanted to try to have Jackson skip
> over/ignore certain tags like , , and , where should I look?
>
> On Monday, March 13, 2017 at 1:33:20 PM UTC-4, Tatu Saloranta wrote:
>>
>> Jackson XML backend does not really support mixed content -- co
ported use case.
-+ Tatu +-
>
> --
> D.
>
> Em segunda-feira, 6 de março de 2017 21:52:36 UTC-3, Tatu Saloranta
> escreveu:
>>
>> The problem with your code is that you are for some reason assuming
>> that `user` would be dropped for some reason: it
There is no such functionality available for either aspects.
First one is unlikely to be supported at all as the delegation means
that none of serializers is concerned with more than one level (or,
possibly another small fixed number considering wrapping for type id
handling, or "unwrapped" proper
how
> that goes. I really just want the contents of that as a String in my
> POJO anyway, so I might be able to decorate the formatting tags away before
> parsing, then re-insert them later. I'll let you know how it works out.
>
> On Monday, March 13, 2017 at 4:27:47 PM UTC-4, Ta
ed, Mar 15, 2017 at 4:36 PM, Steve Munini wrote:
> Hi Tatu,
>
> Thank you so much for your help. It worked! I implemented a InputDecorator
> which appears to be working now. Thank you!
>
> Steve Munini
> CEO & CTO
> 978-590-4493
> heliossoftware.com
>
>
>
Quick administrative announcement: I am moving ahead with some
centralization to make releases simpler to make. Similar to creation
of `jackson-dataformats-binary` repo (which builds backends for CBOR,
Smile, Avro and Protobuf), I created `jackson-dataformats-text`.
This repo contains CSV, Java Pro
I hope someone who has had similar issue can share how they
implemented limitations.
-+ Tatu +-
On Wed, Mar 15, 2017 at 9:40 PM, wrote:
> Thanks for the quick reply. Are there workarounds to implement these?
>
> On Thursday, March 16, 2017 at 1:45:06 AM UTC+5:30, Tatu Salora
Not 100% sure I understand the question, but if you want to access
information about annotations on property, from your custom
serializer, you need to implement `ContextualSerializer`, and then its
`createContextual()` gets called with `BeanProperty`.
`BeanProperty` has accessors for annotation dir
What is the POJO you are serializing?
-+ Tatu +-
On Mon, Mar 20, 2017 at 5:11 AM, Zsolt Balanyi wrote:
> Hi!
>
> I have a structure that outputs this:
>
>
>
>
>
>
>
>
> I use @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.PROPERTY,
> property="type") on the common base cla
Ok so what do you mean by "edit"? Change the effect taken, or to
modify file from which data comes?
Or something else?
-+ Tatu +-
On Fri, Mar 17, 2017 at 9:50 PM, Public Share
wrote:
> Hi,
>
>
> I'm using jackson csv to write csv file.
> But the header is mapping with properties of object.
> Ha
ialize(using = UIElementSerializer.class)
>
> BR, Zsolt
>
> 2017. március 20., hétfő 19:21:29 UTC+1 időpontban Tatu Saloranta a
> következőt írta:
>>
>> Not 100% sure I understand the question, but if you want to access
>> information about annotations on property, from
a StackLayout that contains a
> Label and an Image.
> It would solve the problem, if the JsonTypeInfo could put the type name to
> the element name...
>
> BR, Zsolt
>
> 2017. március 20., hétfő 19:22:10 UTC+1 időpontban Tatu Saloranta a
> következőt írta:
>>
>
PM, Zsolt Balanyi wrote:
> Hi!
>
> OK, thanks, then I'll go that way!
>
> BR, Zsolt
>
> 2017. március 20., hétfő 20:13:25 UTC+1 időpontban Tatu Saloranta a
> következőt írta:
>>
>> This can not be done from annotation-based serializer: it will
>> ove
supported dataformat. XML is bit of an outlier as its
structural model is the most difficult one to support, of formats
supported.
-+ Tatu +-
>
> BR, Zsolt
>
> 2017. március 20., hétfő 20:16:38 UTC+1 időpontban Tatu Saloranta a
> következőt írta:
>>
>> Have you tried choi
he fact that I register it for an abstract
> class, and the concrete implementors still use their defaults?
BeanSerializerModifier is a callback, but yes, result would be bound
for whatever type it was called for.
-+ Tatu +-
>
> BR Zsolt
>
>
>
> 2017. március 22., szerda 5:38:56
Apologies for slow follow-up.
I think that usage as List/array element is difficult to implement,
and generally I don't think it's something that commonly causes
problems. Handling of property values and array elements is quite
distinct with current processing so I don't think I'd want to do this.
aformat-xml, or I'm doing wrong something?
One possibility is that if the type uses polymorphic handling, method
called is actually
public void serializeWithType(T value, JsonGenerator g,
SerializerProvider p,
TypeSerializer ts);
and you may need to override that as well.
-+ Tatu +-
>
You can enable/disable `SerializationFeature`s using `ObjectWriter`
instead of `ObjectMapper`, like so:
byte[] bytes = mapper.writer().with(SerializationFeature.WRAP_ROOT_VALUE)
.writeValueAsBytes(pojo);
I don't know what support Spring Boot offers for doing this.
-+ Tatu +-
On Mon, Mar 2
Actually it should already be possible to use `@JsonIgnoreProperties`
for properties as is, but I think it only affects property value
itself, and not contents of containers.
But it seems reasonable to assume that since Lists/arrays/Maps do not
have properties of their own (except in non-standard c
but most documentation refers to public API developers are most likely to use.
-+ Tatu +-
>
> BR, Zsolt
>
> 2017. március 23., csütörtök 6:45:18 UTC+1 időpontban Tatu Saloranta a
> következőt írta:
>>
>> On Wed, Mar 22, 2017 at 10:24 PM, Zsolt Balanyi
>> wrote:
>
Could you please file an issue for `jackson-databind`. Looks like a bug.
-+ Tatu +-
On Thu, Mar 23, 2017 at 5:11 PM, Anuj Kumar wrote:
>
> I am getting an exception with jackson databind version 2.8.0 and later,
> everything works fine with any version below 2.8.0.
>
> Issue is, if I have a prop
more robust.
>
>
>
>
>
>
>
>
> Thanks for your help and hints! Hope I helped someone...
Thank you for sharing this!
-+ Tatu +-
>
> BR, Zsolt
>
> 2017. március 24., péntek 1:06:37 UTC+1 időpontban Tatu Saloranta a
> következőt írta
JSON Schema reflects the fact that Jackson serializes URLs as JSON
Strings -- it wouldn't make much sense to report it as Object since
that is not its serialization. So this part works the way I would
expect it to be: JSON Schema defines the way JSON structures work, not
what is semantic view of yo
I am not an expert with Weblogic, but I suspect there may be some
dependency that includes component that prevents use of Jackson. So...
On Tue, Mar 28, 2017 at 2:32 AM, Claude Libois wrote:
> Hello,
> I have been fighting since yesterday to enforce the simple pojo to me
> marshalled as {rules: [
Yes, it should be possible to add `@JsonAppend` to an interface, without
mix-in.
So I think filing an issue with simple reproduction (there are already
declarations but also call to make sure nothing relevant is omitted) would
make sense.
-+ Tatu +-
On Wed, Apr 5, 2017 at 6:28 AM, Clément Poulain
On Tue, Apr 11, 2017 at 12:25 AM, Adarsh Jalaja wrote:
> I am trying to send json to convert to java via rest using apache CXF
> (3.0.11)
>
> jackson being used is 2.8.6.
>
> when I send the plain JSON (without namespace) its giving namespace related
> error. This used to work with (1.9 jackson an
101 - 200 of 1002 matches
Mail list logo