tag:blogger.com,1999:blog-5325426185501267599.post5268379012820169311..comments2023-05-14T04:10:24.239-05:00Comments on Programmer Bruce: Deserialize JSON with Jackson into Polymorphic Types - A Complete ExampleBruce Colemanhttp://www.blogger.com/profile/03248355056606365506noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-5325426185501267599.post-73690740198461553072020-09-29T13:58:48.646-05:002020-09-29T13:58:48.646-05:00Thanks so much for posting this article. Very usef...Thanks so much for posting this article. Very useful!Aruna Patibandlahttps://www.blogger.com/profile/11492331599986205997noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-39682340369164895152018-03-12T20:09:45.282-05:002018-03-12T20:09:45.282-05:00Thank you! this helped me even after 6 years of po...Thank you! this helped me even after 6 years of posting. And oh yes, THANK YOU!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-12057710173437653582016-06-29T10:11:18.679-05:002016-06-29T10:11:18.679-05:00Very well written and demonstrated. Thank you!
You...Very well written and demonstrated. Thank you!<br />You deserve a beer and a hug ;)Rahulnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-73207947732706839602016-04-27T06:33:36.723-05:002016-04-27T06:33:36.723-05:00Thank you very good article ;)Thank you very good article ;)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-64735631048698377882015-07-31T01:51:47.017-05:002015-07-31T01:51:47.017-05:00thanks so muchthanks so muchහසකhttps://www.blogger.com/profile/13732192250003028451noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-65229541487786135092015-07-07T11:02:53.264-05:002015-07-07T11:02:53.264-05:00Simply wonderful, you deserve a beer!!!Simply wonderful, you deserve a beer!!!Anonymoushttps://www.blogger.com/profile/09996863929518670936noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-45142735979022288942014-10-10T04:10:53.304-05:002014-10-10T04:10:53.304-05:00Thanks for taking the time to post this, very usef...Thanks for taking the time to post this, very useful, saved a lot of my time!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-60353949829699711612014-08-19T18:52:44.261-05:002014-08-19T18:52:44.261-05:00Thanks for taking the time to do this writeup it h...Thanks for taking the time to do this writeup it helped me a lot!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-84419417134576407032014-04-21T17:06:09.801-05:002014-04-21T17:06:09.801-05:00Wow, took me awhile to find this article, but it&#...Wow, took me awhile to find this article, but it's just what I needed! Thanks!Nickhttp://github.com/hillgodnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-57503427578879238462014-04-09T03:04:08.023-05:002014-04-09T03:04:08.023-05:00A big thanks for this article - I was struggling o...A big thanks for this article - I was struggling on solution 4 (Polymorphic fields) for a couple of hours without finding any relevant/good examples on google! I've copied the demo to my project & works like a charm.<br /><br />A big thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-26546139186488094612014-01-08T17:15:37.189-06:002014-01-08T17:15:37.189-06:00HelpfulHelpfulAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-48191906482128772672013-11-04T19:32:14.106-06:002013-11-04T19:32:14.106-06:00Thank you!!!Thank you!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-23252867270957127582013-10-28T04:49:19.585-05:002013-10-28T04:49:19.585-05:00Thank you for this artcile !Thank you for this artcile !Anonymoushttps://www.blogger.com/profile/17850695123079381725noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-68923317598159577252013-09-25T12:22:58.433-05:002013-09-25T12:22:58.433-05:00very helpful...very helpful...Anonymoushttps://www.blogger.com/profile/14792011024174389941noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-48444456910203647072013-09-23T12:53:45.883-05:002013-09-23T12:53:45.883-05:00helpfulhelpfulAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-43573356612406174432013-08-30T08:24:02.706-05:002013-08-30T08:24:02.706-05:00Worked like a charm.Worked like a charm.Anonymoushttps://www.blogger.com/profile/02166570472055521556noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-67283668837459094512013-07-22T04:32:45.293-05:002013-07-22T04:32:45.293-05:00I was looking for a solution that would deduce the...I was looking for a solution that would deduce the specific type based on fields included in the serialized data and found it here in example 6. Thanks a lot!Anonymoushttps://www.blogger.com/profile/04149703295884365306noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-83106179554795421042013-04-19T17:43:21.619-05:002013-04-19T17:43:21.619-05:00thanks mate!thanks mate!Jan1337zhttps://www.blogger.com/profile/10548437587874457904noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-7662692674265516182013-04-18T12:05:19.451-05:002013-04-18T12:05:19.451-05:00Normally I not tend to leave commits like "th...Normally I not tend to leave commits like "thank you" or "great article", but I must admit that your writeup impressed me.<br /><br />Thank you! Great article!<br />I really impressed, you helped me much!<br /><br />Cheers,<br /><br />TTamáshttps://www.blogger.com/profile/18098881994920432267noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-79580693845201685312013-03-17T11:50:43.072-05:002013-03-17T11:50:43.072-05:00merci chef c'est supermerci chef c'est superAnonymoushttps://www.blogger.com/profile/11174511748705021015noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-40051689891520387712013-01-17T07:16:08.588-06:002013-01-17T07:16:08.588-06:00This is just great, thank you so much!
OnurThis is just great, thank you so much!<br /><br />OnurAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-24881366102844545362012-12-12T09:11:36.685-06:002012-12-12T09:11:36.685-06:00Great article!
Adding the following code to examp...Great article!<br /><br />Adding the following code to example 4:<br /> JsonSchema jsonSchema = mapper.generateJsonSchema(Zoo.class);<br /> System.out.println(mapper.writeValueAsString(jsonSchema));<br /><br />I get:<br />{<br /> "type" : "object",<br /> "properties" : {<br /> "animals" : {<br /> "type" : "array",<br /> "items" : {<br /> "type" : "any"<br /> }<br /> }<br /> }<br />}<br />that is, the schema says that "Zoo.animals" is a collection of objects,<br />rather than a collection of Animals.<br /><br />Is that a limitation of Jackson, or a limitation of json-schema.org?<br /><br />Any idea how to solve this?<br /><br />Many thanks,<br />David<br />David Portabellahttps://www.blogger.com/profile/15555838860133322978noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-59301210802702791252012-11-19T05:46:25.014-06:002012-11-19T05:46:25.014-06:00Awesome article! Really saved me some time :)Awesome article! Really saved me some time :)Boxeolahttps://www.blogger.com/profile/13265436333274751101noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-50973836364433935032012-11-13T19:28:57.427-06:002012-11-13T19:28:57.427-06:00You may want to use "mix-in annotations"...You may want to use "mix-in annotations" -- these allow associating annotation values without modifying target classes.Unknownhttps://www.blogger.com/profile/02343617472112278520noreply@blogger.comtag:blogger.com,1999:blog-5325426185501267599.post-64038965434788926802012-08-06T10:04:45.919-05:002012-08-06T10:04:45.919-05:00Example 6 works great if the base class is abstrac...Example 6 works great if the base class is abstract. But what happens if the base class itself is not abstract and can be instantiated? <br />You can simply conclude that it is actually the base class because it does NOT have any of the registered attributes.<br />But the line<br /><br />return mapper.readValue(root, animalClass);<br /><br />would then result in an endless loop. How can I resolve this if adding an additional abstract base class is not possible?Plaudertaschehttps://www.blogger.com/profile/06370409874522821881noreply@blogger.com