mattermost-plugin-gitlab
mattermost-plugin-gitlab copied to clipboard
Guidance For Contributing JSON Parsing
Hey there. Just looking for some pointers on how one would help enhance this plugin to render "prettified" JSON via this excellent plugin.
The reasoning is to work nicely with this commercial Redmine Plugin: Checklists: https://www.redmineup.com/pages/plugins/checklists
This is what it currently "shows up" like:
So - looking for quick recommendations on where in the code would be the best place to start looking, and if there are particular JSON parsing libraries that are recommended (or already in use!), we would highly appreciate knowing the info.
the following should solve the problem for you.
error := json.Indent(&prettyJSON, body, "", "\t")
if error != nil {
log.Errorf("JSON parse error: ", error)
App.BadRequest(w)
return
}
Thank you! Now... where to integrate this in...
@DHaussermann to invesigate applicable scenario
How to get JSON data about checklist? @scottcc