{"action":"created","issue":{"url":"https://api.github.com/repos/justinrainbow/json-schema/issues/203","repository_url":"https://api.github.com/repos/justinrainbow/json-schema","labels_url":"https://api.github.com/repos/justinrainbow/json-schema/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/justinrainbow/json-schema/issues/203/comments","events_url":"https://api.github.com/repos/justinrainbow/json-schema/issues/203/events","html_url":"https://github.com/justinrainbow/json-schema/issues/203","id":121955799,"number":203,"title":"$validator->check expects an json in form of an object but throws no error","user":{"login":"jonathan-s","id":2124818,"avatar_url":"https://avatars.githubusercontent.com/u/2124818?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathan-s","html_url":"https://github.com/jonathan-s","followers_url":"https://api.github.com/users/jonathan-s/followers","following_url":"https://api.github.com/users/jonathan-s/following{/other_user}","gists_url":"https://api.github.com/users/jonathan-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathan-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathan-s/subscriptions","organizations_url":"https://api.github.com/users/jonathan-s/orgs","repos_url":"https://api.github.com/users/jonathan-s/repos","events_url":"https://api.github.com/users/jonathan-s/events{/privacy}","received_events_url":"https://api.github.com/users/jonathan-s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T00:40:16Z","updated_at":"2016-04-11T22:47:26Z","closed_at":null,"body":"I was trying to figure out why the validator didn't work properly because I was getting the error in $validator->getErrors() instead of $validator->check throwing an error because it was expecting an object rather than a string or an array. "},"comment":{"url":"https://api.github.com/repos/justinrainbow/json-schema/issues/comments/208598183","html_url":"https://github.com/justinrainbow/json-schema/issues/203#issuecomment-208598183","issue_url":"https://api.github.com/repos/justinrainbow/json-schema/issues/203","id":208598183,"user":{"login":"mirfilip","id":1812341,"avatar_url":"https://avatars.githubusercontent.com/u/1812341?v=3","gravatar_id":"","url":"https://api.github.com/users/mirfilip","html_url":"https://github.com/mirfilip","followers_url":"https://api.github.com/users/mirfilip/followers","following_url":"https://api.github.com/users/mirfilip/following{/other_user}","gists_url":"https://api.github.com/users/mirfilip/gists{/gist_id}","starred_url":"https://api.github.com/users/mirfilip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirfilip/subscriptions","organizations_url":"https://api.github.com/users/mirfilip/orgs","repos_url":"https://api.github.com/users/mirfilip/repos","events_url":"https://api.github.com/users/mirfilip/events{/privacy}","received_events_url":"https://api.github.com/users/mirfilip/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T22:47:26Z","updated_at":"2016-04-11T22:47:26Z","body":"@jonathan-s \r\nI'm not sure I follow. I've added a [sample playground](https://github.com/mirfilip/json-schema-playground/tree/issue/203) where you can verify object validation:\r\nSchema:\r\n```\r\n{\r\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\r\n  \"title\": \"test\",\r\n  \"type\": \"object\"\r\n}\r\n```\r\n* String:\r\n```\r\nInput \"a string\"\r\nValidation status (Validator::isValid): false\r\nErrors:\r\n[\r\n    {\r\n        \"property\": \"\",\r\n        \"message\": \"String value found, but an object is required\",\r\n        \"constraint\": \"type\"\r\n    }\r\n]\r\n```\r\n* Array:\r\n```\r\nInput []\r\nValidation status (Validator::isValid): false\r\nErrors:\r\n[\r\n    {\r\n        \"property\": \"\",\r\n        \"message\": \"Array value found, but an object is required\",\r\n        \"constraint\": \"type\"\r\n    }\r\n]\r\n```"}}