{"action":"created","issue":{"url":"https://api.github.com/repos/tomakehurst/wiremock/issues/477","repository_url":"https://api.github.com/repos/tomakehurst/wiremock","labels_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/477/comments","events_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/477/events","html_url":"https://github.com/tomakehurst/wiremock/issues/477","id":170604458,"number":477,"title":"com.github.tomakehurst.wiremock.verification.Diff.formatIfJsonOrXml bug","user":{"login":"theangrydev","id":6877541,"avatar_url":"https://avatars.githubusercontent.com/u/6877541?v=3","gravatar_id":"","url":"https://api.github.com/users/theangrydev","html_url":"https://github.com/theangrydev","followers_url":"https://api.github.com/users/theangrydev/followers","following_url":"https://api.github.com/users/theangrydev/following{/other_user}","gists_url":"https://api.github.com/users/theangrydev/gists{/gist_id}","starred_url":"https://api.github.com/users/theangrydev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theangrydev/subscriptions","organizations_url":"https://api.github.com/users/theangrydev/orgs","repos_url":"https://api.github.com/users/theangrydev/repos","events_url":"https://api.github.com/users/theangrydev/events{/privacy}","received_events_url":"https://api.github.com/users/theangrydev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tomakehurst/wiremock/labels/Bug","name":"Bug","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-11T09:30:10Z","updated_at":"2016-08-11T09:45:52Z","closed_at":null,"body":"If you try to e.g. `verifyThat` with `equalToXml` and there is a non xml request, the method blows up:\r\n\r\n```\r\norg.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.\r\n\r\n\tat com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)\r\n\tat com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)\r\n\tat com.github.tomakehurst.wiremock.common.Xml.read(Xml.java:60)\r\n\tat com.github.tomakehurst.wiremock.common.Xml.prettyPrint(Xml.java:41)\r\n\tat com.github.tomakehurst.wiremock.verification.Diff.formatIfJsonOrXml(Diff.java:128)\r\n\tat com.github.tomakehurst.wiremock.verification.Diff.toString(Diff.java:112)\r\n\tat com.github.tomakehurst.wiremock.client.VerificationException.<init>(VerificationException.java:64)\r\n\tat com.github.tomakehurst.wiremock.client.VerificationException.forUnmatchedRequestPattern(VerificationException.java:39)\r\n\tat com.github.tomakehurst.wiremock.client.WireMock.verifyThat(WireMock.java:353)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/tomakehurst/wiremock/issues/comments/239116755","html_url":"https://github.com/tomakehurst/wiremock/issues/477#issuecomment-239116755","issue_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/477","id":239116755,"user":{"login":"tomakehurst","id":707169,"avatar_url":"https://avatars.githubusercontent.com/u/707169?v=3","gravatar_id":"","url":"https://api.github.com/users/tomakehurst","html_url":"https://github.com/tomakehurst","followers_url":"https://api.github.com/users/tomakehurst/followers","following_url":"https://api.github.com/users/tomakehurst/following{/other_user}","gists_url":"https://api.github.com/users/tomakehurst/gists{/gist_id}","starred_url":"https://api.github.com/users/tomakehurst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomakehurst/subscriptions","organizations_url":"https://api.github.com/users/tomakehurst/orgs","repos_url":"https://api.github.com/users/tomakehurst/repos","events_url":"https://api.github.com/users/tomakehurst/events{/privacy}","received_events_url":"https://api.github.com/users/tomakehurst/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T09:45:52Z","updated_at":"2016-08-11T09:45:52Z","body":"Thanks. Replicated."}}
{"actor":{"display_login":"tomakehurst"}}