Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing JSON fields #3

Open
pecigonzalo opened this issue Oct 30, 2018 · 3 comments
Open

Parsing JSON fields #3

pecigonzalo opened this issue Oct 30, 2018 · 3 comments

Comments

@pecigonzalo
Copy link

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!

@mmcquillan
Copy link
Owner

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.

@pecigonzalo
Copy link
Author

pecigonzalo commented Nov 15, 2018

@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

@mmcquillan
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants