{"action":"created","issue":{"url":"https://api.github.com/repos/circe/circe/issues/848","repository_url":"https://api.github.com/repos/circe/circe","labels_url":"https://api.github.com/repos/circe/circe/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/circe/circe/issues/848/comments","events_url":"https://api.github.com/repos/circe/circe/issues/848/events","html_url":"https://github.com/circe/circe/issues/848","id":300804691,"number":848,"title":"how to make JSON decoding throw an error for superfluous elements in JSON input","user":{"login":"hansschl","id":21258983,"avatar_url":"https://avatars2.githubusercontent.com/u/21258983?v=4","gravatar_id":"","url":"https://api.github.com/users/hansschl","html_url":"https://github.com/hansschl","followers_url":"https://api.github.com/users/hansschl/followers","following_url":"https://api.github.com/users/hansschl/following{/other_user}","gists_url":"https://api.github.com/users/hansschl/gists{/gist_id}","starred_url":"https://api.github.com/users/hansschl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansschl/subscriptions","organizations_url":"https://api.github.com/users/hansschl/orgs","repos_url":"https://api.github.com/users/hansschl/repos","events_url":"https://api.github.com/users/hansschl/events{/privacy}","received_events_url":"https://api.github.com/users/hansschl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-27T21:44:35Z","updated_at":"2018-05-29T12:03:28Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\nHow can I make the Circe JSON decoding stricter such that whenever it encounters an element (in the JSON input string) that is _not_ in the target class X (`decode[X](string)`) it throws an error. Currently, with the default settings (circe 0.9.1), superfluous elements are silently ignored. \r\nFor me (in my application) superfluous elements are an input error, so I need the error to be thrown by circe.\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/circe/circe/issues/comments/392751735","html_url":"https://github.com/circe/circe/issues/848#issuecomment-392751735","issue_url":"https://api.github.com/repos/circe/circe/issues/848","id":392751735,"user":{"login":"hansschl","id":21258983,"avatar_url":"https://avatars2.githubusercontent.com/u/21258983?v=4","gravatar_id":"","url":"https://api.github.com/users/hansschl","html_url":"https://github.com/hansschl","followers_url":"https://api.github.com/users/hansschl/followers","following_url":"https://api.github.com/users/hansschl/following{/other_user}","gists_url":"https://api.github.com/users/hansschl/gists{/gist_id}","starred_url":"https://api.github.com/users/hansschl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansschl/subscriptions","organizations_url":"https://api.github.com/users/hansschl/orgs","repos_url":"https://api.github.com/users/hansschl/repos","events_url":"https://api.github.com/users/hansschl/events{/privacy}","received_events_url":"https://api.github.com/users/hansschl/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T12:03:28Z","updated_at":"2018-05-29T12:03:28Z","author_association":"NONE","body":"@kevinmeredith Indeed the above is what I had in mind: that there are (intentional) optional elements that could be misspelled in an input JSON document. And I want to make sure that my parser consumes everything that is in the document. Currently I don't see a way to have Circe throw an error in case there is some information left in the input document that is not parsed and converted to my case class instances."}}
{"actor":{"display_login":"hansschl"}}