{"action":"created","issue":{"url":"https://api.github.com/repos/alexgarrett/violin/issues/73","labels_url":"https://api.github.com/repos/alexgarrett/violin/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/alexgarrett/violin/issues/73/comments","events_url":"https://api.github.com/repos/alexgarrett/violin/issues/73/events","html_url":"https://github.com/alexgarrett/violin/issues/73","id":99655048,"number":73,"title":"json format","user":{"login":"lalocespedes","id":1903917,"avatar_url":"https://avatars.githubusercontent.com/u/1903917?v=3","gravatar_id":"","url":"https://api.github.com/users/lalocespedes","html_url":"https://github.com/lalocespedes","followers_url":"https://api.github.com/users/lalocespedes/followers","following_url":"https://api.github.com/users/lalocespedes/following{/other_user}","gists_url":"https://api.github.com/users/lalocespedes/gists{/gist_id}","starred_url":"https://api.github.com/users/lalocespedes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lalocespedes/subscriptions","organizations_url":"https://api.github.com/users/lalocespedes/orgs","repos_url":"https://api.github.com/users/lalocespedes/repos","events_url":"https://api.github.com/users/lalocespedes/events{/privacy}","received_events_url":"https://api.github.com/users/lalocespedes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-07T14:08:12Z","updated_at":"2015-08-07T14:54:29Z","closed_at":null,"body":"How can i get errors array in json format?\r\ni tried\r\n$errors = (array)$v->errors();\r\necho json_encode($errors);\r\n\r\nbut i have this result\r\n\r\n{\"\\u0000*\\u0000messages\":{\"email_address\":[\"email_address must be a valid email address.\"]}}\r\n\r\nwhat are? \\u0000*\\u0000 characters?\r\nthnks in advance"},"comment":{"url":"https://api.github.com/repos/alexgarrett/violin/issues/comments/128721860","html_url":"https://github.com/alexgarrett/violin/issues/73#issuecomment-128721860","issue_url":"https://api.github.com/repos/alexgarrett/violin/issues/73","id":128721860,"user":{"login":"oxyzero","id":4793869,"avatar_url":"https://avatars.githubusercontent.com/u/4793869?v=3","gravatar_id":"","url":"https://api.github.com/users/oxyzero","html_url":"https://github.com/oxyzero","followers_url":"https://api.github.com/users/oxyzero/followers","following_url":"https://api.github.com/users/oxyzero/following{/other_user}","gists_url":"https://api.github.com/users/oxyzero/gists{/gist_id}","starred_url":"https://api.github.com/users/oxyzero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxyzero/subscriptions","organizations_url":"https://api.github.com/users/oxyzero/orgs","repos_url":"https://api.github.com/users/oxyzero/repos","events_url":"https://api.github.com/users/oxyzero/events{/privacy}","received_events_url":"https://api.github.com/users/oxyzero/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T14:54:29Z","updated_at":"2015-08-07T14:54:29Z","body":"Unfortunately the MessageBag doesn't support parsing it's data to JSON format.\r\n\r\nHowever, you can achieve what you want with the following script:\r\n\r\n```php\r\n$errors = $v->errors();\r\n\r\n$json_array = [];\r\n\r\nforeach ($errors->keys() as $key) {\r\n    if ($errors->has($key)) {\r\n        $json_array[$key] = $errors->get($key);\r\n    }\r\n}\r\n\r\necho json_encode($json_array);\r\n```"}}