{"action":"opened","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/1057","labels_url":"https://api.github.com/repos/manastech/crystal/issues/1057/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1057/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/1057/events","html_url":"https://github.com/manastech/crystal/issues/1057","id":97966189,"number":1057,"title":"Cannot use JSON.parse and HTTP::Server at the same time","user":{"login":"rpierreye","id":4998084,"avatar_url":"https://avatars.githubusercontent.com/u/4998084?v=3","gravatar_id":"","url":"https://api.github.com/users/rpierreye","html_url":"https://github.com/rpierreye","followers_url":"https://api.github.com/users/rpierreye/followers","following_url":"https://api.github.com/users/rpierreye/following{/other_user}","gists_url":"https://api.github.com/users/rpierreye/gists{/gist_id}","starred_url":"https://api.github.com/users/rpierreye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpierreye/subscriptions","organizations_url":"https://api.github.com/users/rpierreye/orgs","repos_url":"https://api.github.com/users/rpierreye/repos","events_url":"https://api.github.com/users/rpierreye/events{/privacy}","received_events_url":"https://api.github.com/users/rpierreye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-29T15:45:46Z","updated_at":"2015-07-29T15:45:46Z","closed_at":null,"body":"http://play.crystal-lang.org/#/r/8ur \r\n\r\nI have this\r\n```ruby\r\nrequire \"json\"\r\nrequire \"http/server\"\r\n\r\nserver = HTTP::Server.new(8080) do |request|\r\n  json = JSON.parse(request.body)\r\n  HTTP::Response.ok \"text/plain\", \"Hello world!\"\r\nend\r\n\r\nputs \"Listening on http://0.0.0.0:8080\"\r\nserver.listen\r\n```\r\n\r\nbut when I compile and run, I get this\r\n```ruby\r\nError in line 10: instantiating 'HTTP::Server#listen()'\r\n\r\nin macro 'spawn' /usr/lib/crystal/concurrent/concurrent.cr:28, line 8:\r\n\r\n  1.   \r\n  2.     ->(\r\n  3.       \r\n  4.         __arg0 : typeof(server.accept),\r\n  5.       \r\n  6.       ) {\r\n  7.       spawn do\r\n  8.         handle_client(\r\n  9.           \r\n 10.             __arg0,\r\n 11.           \r\n 12.         )\r\n 13.       end\r\n 14.     }.call(server.accept)\r\n 15.   \r\n\r\n        handle_client(\r\n        ^~~~~~~~~~~~~\r\n\r\ninstantiating 'handle_client(TCPSocket+)'\r\nin /usr/lib/crystal/http/server/server.cr:65: instantiating 'HTTP::Request:Class#from_io(TCPSocket+)'\r\n\r\n          request = HTTP::Request.from_io(io)\r\n                                  ^~~~~~~\r\n\r\nin /usr/lib/crystal/http/request.cr:49: instantiating 'HTTP:Class#parse_headers_and_body(TCPSocket+)'\r\n\r\n    HTTP.parse_headers_and_body(io) do |headers, body|\r\n         ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\nin /usr/lib/crystal/http/request.cr:49: instantiating 'HTTP:Class#parse_headers_and_body(TCPSocket+)'\r\n\r\n    HTTP.parse_headers_and_body(io) do |headers, body|\r\n         ^~~~~~~~~~~~~~~~~~~~~~\r\n\r\nin /usr/lib/crystal/http/request.cr:50: instantiating 'new(String, String, HTTP::Headers, String?, String)'\r\n\r\n      return new method, path, headers, body, http_version\r\n             ^~~\r\n\r\ninstantiating 'HTTP::Request#initialize(String, String, HTTP::Headers, String?, String)'\r\n\r\nin line 5: instantiating 'JSON:Class#parse(String?)'\r\n\r\nin /usr/lib/crystal/json/json.cr:14: instantiating 'JSON::Parser:Class#new(String?)'\r\n\r\n    Parser.new(string_or_io).parse\r\n           ^~~\r\n\r\ninstantiating 'JSON::Parser#initialize(String?)'\r\n\r\nin /usr/lib/crystal/json/parser.cr:5: can't instantiate abstract class JSON::Lexer:Class\r\n\r\n    @lexer = JSON::Lexer.new(string_or_io)\r\n                         ^~~\r\n```\r\nam I doing something wrong?"}}