olahol / melody

:notes: Minimalist websocket framework for Go
BSD 2-Clause "Simplified" License
3.75k stars 366 forks source link

json render #17

Closed onerciller closed 7 years ago

onerciller commented 7 years ago

hello, How I can return as json instead of servefile. I want to get as json to socket and I will make client with js completely. do you have any example about this?

olahol commented 7 years ago

I don't understand the question, http.ServeFile is part of go's standard library.

onerciller commented 7 years ago

I know it but i want to return as json to data instead of servefile how can i do this could i explain it?