Closed santi0037 closed 6 years ago
Hi guy, happy new year!
1) You should create controller.
2) Add method for your url
3) Use this method for return JSON
c.RenderJSON(<object or map>, http.StatusOK)
Maybe I don`t understand your question. Can you give me example?
Thanks you! My mistake was to put a ctx
before RenderJSON
t.Ctx.RenderJSON(peoples, http.StatusOK)
and now is working perfectly!!!
You are welcome. Good!
Hello friends, happy new year! I'm totally new with golang and I'm trying to turn utron in an Api-JSON. Reading the code i found that "data will only be used when Template is not specified and there is no View set. You can use this for creating APIs (which does not depend on views like JSON APIs)"
My cuestion is, what are the next steps should i follow?