lawsg
lawsg copied to clipboard
Parsing JSON fields
Hello! im coming from awslogs and really interested in this tool, but I would like to know if there is a way to prase fields from JSON, as our events are stored in JSON format.
Thanks!
Hello @pecigonzalo ! What do you have in mind? I have some JSON parsing bits from a different project. Curious how you might want that implemented.
@mmcquillan basically using json.marshall
or similar to get JSON to print correctly.
I have a quick patch that does it for this repo, but i ended up forking cwlogs
and adding some features I need there.
var result map[string]interface{}
err := json.Unmarshal([]byte(message), &result)
example code
Thanks! I guess I was wondering what you envisioned in terms of how the cli would let you specify json and then specify the formatting you'd like to express?