{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/38","repository_url":"https://api.github.com/repos/zalando/jackson-datatype-money","labels_url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/38/comments","events_url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/38/events","html_url":"https://github.com/zalando/jackson-datatype-money/issues/38","id":178024662,"number":38,"title":"Concrete RI type Money not accepted for serialization","user":{"login":"keyboardsamurai","id":67417,"avatar_url":"https://avatars.githubusercontent.com/u/67417?v=3","gravatar_id":"","url":"https://api.github.com/users/keyboardsamurai","html_url":"https://github.com/keyboardsamurai","followers_url":"https://api.github.com/users/keyboardsamurai/followers","following_url":"https://api.github.com/users/keyboardsamurai/following{/other_user}","gists_url":"https://api.github.com/users/keyboardsamurai/gists{/gist_id}","starred_url":"https://api.github.com/users/keyboardsamurai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyboardsamurai/subscriptions","organizations_url":"https://api.github.com/users/keyboardsamurai/orgs","repos_url":"https://api.github.com/users/keyboardsamurai/repos","events_url":"https://api.github.com/users/keyboardsamurai/events{/privacy}","received_events_url":"https://api.github.com/users/keyboardsamurai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zalando/jackson-datatype-money/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/zalando/jackson-datatype-money/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"whiskeysierra","id":429981,"avatar_url":"https://avatars.githubusercontent.com/u/429981?v=3","gravatar_id":"","url":"https://api.github.com/users/whiskeysierra","html_url":"https://github.com/whiskeysierra","followers_url":"https://api.github.com/users/whiskeysierra/followers","following_url":"https://api.github.com/users/whiskeysierra/following{/other_user}","gists_url":"https://api.github.com/users/whiskeysierra/gists{/gist_id}","starred_url":"https://api.github.com/users/whiskeysierra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiskeysierra/subscriptions","organizations_url":"https://api.github.com/users/whiskeysierra/orgs","repos_url":"https://api.github.com/users/whiskeysierra/repos","events_url":"https://api.github.com/users/whiskeysierra/events{/privacy}","received_events_url":"https://api.github.com/users/whiskeysierra/received_events","type":"User","site_admin":false},"assignees":[{"login":"whiskeysierra","id":429981,"avatar_url":"https://avatars.githubusercontent.com/u/429981?v=3","gravatar_id":"","url":"https://api.github.com/users/whiskeysierra","html_url":"https://github.com/whiskeysierra","followers_url":"https://api.github.com/users/whiskeysierra/followers","following_url":"https://api.github.com/users/whiskeysierra/following{/other_user}","gists_url":"https://api.github.com/users/whiskeysierra/gists{/gist_id}","starred_url":"https://api.github.com/users/whiskeysierra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiskeysierra/subscriptions","organizations_url":"https://api.github.com/users/whiskeysierra/orgs","repos_url":"https://api.github.com/users/whiskeysierra/repos","events_url":"https://api.github.com/users/whiskeysierra/events{/privacy}","received_events_url":"https://api.github.com/users/whiskeysierra/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-09-20T10:36:13Z","updated_at":"2016-09-20T11:54:38Z","closed_at":"2016-09-20T11:33:45Z","body":"Serializing a class that uses the reference implementation `Money` class instead of `javax.money.MonetaryAmount` will fail with the following message:\r\n\r\n`com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.javamoney.moneta.Money]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)`\r\n\r\nExample class:\r\n\r\n```\r\nimport org.javamoney.moneta.Money;\r\n\r\npublic class MyValueObject {\r\n    public Money price;\r\n    public String name;\r\n    public MyValueObject() {\r\n    }\r\n    public MyValueObject(Money money, String name) {\r\n        this.price = money;\r\n        this.name = name;\r\n    }\r\n}\r\n```\r\nIf you use MonetaryAmount instead, everything works fine. \r\n\r\nI would expect that either the docs mention that you cannot use RI-Types in your objects, or make the Serializer check for classes that implement MonetaryAmount. \r\n\r\nSee example JUnit test project here: [test-money-json.zip](https://github.com/zalando/jackson-datatype-money/files/482284/test-money-json.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/comments/248279871","html_url":"https://github.com/zalando/jackson-datatype-money/issues/38#issuecomment-248279871","issue_url":"https://api.github.com/repos/zalando/jackson-datatype-money/issues/38","id":248279871,"user":{"login":"whiskeysierra","id":429981,"avatar_url":"https://avatars.githubusercontent.com/u/429981?v=3","gravatar_id":"","url":"https://api.github.com/users/whiskeysierra","html_url":"https://github.com/whiskeysierra","followers_url":"https://api.github.com/users/whiskeysierra/followers","following_url":"https://api.github.com/users/whiskeysierra/following{/other_user}","gists_url":"https://api.github.com/users/whiskeysierra/gists{/gist_id}","starred_url":"https://api.github.com/users/whiskeysierra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whiskeysierra/subscriptions","organizations_url":"https://api.github.com/users/whiskeysierra/orgs","repos_url":"https://api.github.com/users/whiskeysierra/repos","events_url":"https://api.github.com/users/whiskeysierra/events{/privacy}","received_events_url":"https://api.github.com/users/whiskeysierra/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T11:54:38Z","updated_at":"2016-09-20T11:54:38Z","body":"@keyboardsamurai I deployed 0.10.0 to central, could take a while before it's available."}}
{"actor":{"display_login":"whiskeysierra"}}