Re: [jackson-user] Deserialize/Serialize an Object in two different ways

2016-12-15 Thread Tatu Saloranta
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

Re: [jackson-user] Re: serializing POJOs

2016-12-15 Thread Literate Aspects
Thank you for your reply. On Thursday, December 15, 2016 at 2:15:58 PM UTC-8, Tatu Saloranta wrote: > > 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 th

Re: [jackson-user] Re: serializing POJOs

2016-12-15 Thread Tatu Saloranta
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

Re: [jackson-user] examples of Full data binding - converting from Java bean to JSON string

2016-12-15 Thread Tatu Saloranta
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

[jackson-user] examples of Full data binding - converting from Java bean to JSON string

2016-12-15 Thread Literate Aspects
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 example of converting POJO to JSON string. I cannot seem to find any

Re: [jackson-user] Type info is not serialized when a @JsonTypeInfo element is a part of a collection or map

2016-12-15 Thread Tatu Saloranta
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

Re: [jackson-user] Type info is not serialized when a @JsonTypeInfo element is a part of a collection or map

2016-12-15 Thread Lev Kuznetsov
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 @JsonTypeInfo annotation on the superclass. I don't have to do

[jackson-user] Re: Object Mapper from managed bean POJO to JSON

2016-12-15 Thread Literate Aspects
Need to write an ObjectMapper with System.out.println test. Any suggestions greatly appreciated. On Wednesday, December 14, 2016 at 11:44:46 PM UTC-8, Literate Aspects wrote: > > Hello, I have not seen HOW any data is retrieved from the MODEL -- IF > there is no reference to the managed bean

[jackson-user] Re: Object Mapper from managed bean POJO to JSON

2016-12-15 Thread Literate Aspects
On Wednesday, December 14, 2016 at 11:44:46 PM UTC-8, Literate Aspects wrote: > > Hello, I have not seen HOW any data is retrieved from the MODEL -- IF > there is no reference to the managed bean that connects the remote MySQL > data source. > > How can there be an Object Mapping without any c

[jackson-user] Re: Object Mapper from managed bean POJO to JSON

2016-12-15 Thread Literate Aspects
an example: http://howtoprogram.xyz/2016/07/01/convert-java-object-to-json-vice-versa/ There is NO reference to any data connection -- in this example WHAT can the possible value of the MODEL be, as the same data is re-entered /presented as static data in the ObjectMap Does not make any sense