{"action":"created","issue":{"url":"https://api.github.com/repos/thedevsaddam/renderer/issues/2","repository_url":"https://api.github.com/repos/thedevsaddam/renderer","labels_url":"https://api.github.com/repos/thedevsaddam/renderer/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/thedevsaddam/renderer/issues/2/comments","events_url":"https://api.github.com/repos/thedevsaddam/renderer/issues/2/events","html_url":"https://github.com/thedevsaddam/renderer/issues/2","id":314521635,"number":2,"title":"Send JSON From JSON File","user":{"login":"DanielSokil","id":24403355,"avatar_url":"https://avatars2.githubusercontent.com/u/24403355?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielSokil","html_url":"https://github.com/DanielSokil","followers_url":"https://api.github.com/users/DanielSokil/followers","following_url":"https://api.github.com/users/DanielSokil/following{/other_user}","gists_url":"https://api.github.com/users/DanielSokil/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielSokil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielSokil/subscriptions","organizations_url":"https://api.github.com/users/DanielSokil/orgs","repos_url":"https://api.github.com/users/DanielSokil/repos","events_url":"https://api.github.com/users/DanielSokil/events{/privacy}","received_events_url":"https://api.github.com/users/DanielSokil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-16T06:50:35Z","updated_at":"2018-04-16T11:29:50Z","closed_at":"2018-04-16T11:29:50Z","author_association":"NONE","body":"Could You Please Explain How To Send Response As JSON With Data From JSON File?"},"comment":{"url":"https://api.github.com/repos/thedevsaddam/renderer/issues/comments/381568014","html_url":"https://github.com/thedevsaddam/renderer/issues/2#issuecomment-381568014","issue_url":"https://api.github.com/repos/thedevsaddam/renderer/issues/2","id":381568014,"user":{"login":"thedevsaddam","id":9676798,"avatar_url":"https://avatars0.githubusercontent.com/u/9676798?v=4","gravatar_id":"","url":"https://api.github.com/users/thedevsaddam","html_url":"https://github.com/thedevsaddam","followers_url":"https://api.github.com/users/thedevsaddam/followers","following_url":"https://api.github.com/users/thedevsaddam/following{/other_user}","gists_url":"https://api.github.com/users/thedevsaddam/gists{/gist_id}","starred_url":"https://api.github.com/users/thedevsaddam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedevsaddam/subscriptions","organizations_url":"https://api.github.com/users/thedevsaddam/orgs","repos_url":"https://api.github.com/users/thedevsaddam/repos","events_url":"https://api.github.com/users/thedevsaddam/events{/privacy}","received_events_url":"https://api.github.com/users/thedevsaddam/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T11:29:50Z","updated_at":"2018-04-16T11:29:50Z","author_association":"OWNER","body":"As there is no method for sending JSON response for from JSON file,\r\nYou can write like this one:\r\n\r\n```go\r\n\r\nfunc main() {\r\n\tjsonData, _ := ioutil.ReadFile(\"./jsonfile.json\") // handle error\r\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\r\n\t\tw.Header().Set(\"Content-Type\", \"application/json\")\r\n\t\trenderer.New().Render(w, http.StatusOK, jsonData) //  use this if you use this package, else use `w.Write()`\r\n\t})\r\n\thttp.ListenAndServe(\":1234\", nil)\r\n}\r\n```"}}
{"actor":{"display_login":"thedevsaddam"}}