{"action":"closed","issue":{"url":"https://api.github.com/repos/ocsigen/eliom/issues/190","labels_url":"https://api.github.com/repos/ocsigen/eliom/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/ocsigen/eliom/issues/190/comments","events_url":"https://api.github.com/repos/ocsigen/eliom/issues/190/events","html_url":"https://github.com/ocsigen/eliom/issues/190","id":103086429,"number":190,"title":" Failure(\"Deriving.Json: Line 1, byte 2:\\nUnexpected constructor 0 for Json_stuff\")","user":{"login":"unhammer","id":56868,"avatar_url":"https://avatars.githubusercontent.com/u/56868?v=3","gravatar_id":"","url":"https://api.github.com/users/unhammer","html_url":"https://github.com/unhammer","followers_url":"https://api.github.com/users/unhammer/followers","following_url":"https://api.github.com/users/unhammer/following{/other_user}","gists_url":"https://api.github.com/users/unhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/unhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unhammer/subscriptions","organizations_url":"https://api.github.com/users/unhammer/orgs","repos_url":"https://api.github.com/users/unhammer/repos","events_url":"https://api.github.com/users/unhammer/events{/privacy}","received_events_url":"https://api.github.com/users/unhammer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-25T18:20:27Z","updated_at":"2015-08-28T09:46:25Z","closed_at":"2015-08-28T09:46:25Z","body":"I had an Eliom server written a year ago that had something like\r\n\r\n    type thing=string list deriving (Json) \r\n    let thing_json = Json.t<thing>\r\n\r\n    type stuff=A|B deriving (Json) \r\n    let stuff_json = Json.t<stuff>\r\n\r\n       Eliom_registration.Ocaml.register_post_coservice'\r\n         ~post_params:Eliom_parameter.(ocaml \"param\" thing_json\r\n                                       **\r\n                                       ocaml \"param\" stuff_json)\r\n         (fun () (thing,stuff) -> proc thing)\r\n\r\nwhich worked fine. But when I tried it again after an opam upgrade, the client didn't receive anything (got a 500 code), and I had to start ocsigenserver.opt with the `-v` option to get a hint as to the problem:\r\n\r\n    ocsigenserver.opt: ocsigen:main: Exn during page generation (sending 500): Failure(\"Deriving.Json: Line 1, byte 2:\\nUnexpected constructor 0 for Json_stuff\")\r\n\r\nhttps://gist.github.com/unhammer/d591195e1606cb2b2220 is a full example – note that sending ([],A) works, while sending ([\"something\"],A) fails.\r\n\r\nThe solution was simple, just create a deriving json-type for the tuple and use that as the single ocaml param, but I feel like this should be noted in the changelog since it's a breaking change. \r\n\r\nAlso, it'd be nice if it were reported on build. Unless it's an actual regression?"}}