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

Json not vaild #6

Open
ghost opened this issue Aug 11, 2020 · 1 comment
Open

Json not vaild #6

ghost opened this issue Aug 11, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 11, 2020

Hi,
the .json output is not valid, tested on https://jsonlint.com/?code= on sample file modsec_audit2_2018-06-11_20-16-27.json report the following problem:

Error: Parse error on line 61: ...de": "ENABLED" }} { "transaction": { ---------------------^ Expecting 'EOF', '}', ',', ']', got '{'

@molu8bits
Copy link
Owner

Hi,
Yes, you're right. In fact the sample file consists of two separate JSON documents joined together. You can split it on line 61 and verify separately both part against jsonlint.com.
The second form of output named "jsonperline" is more appropriate as it should be correct NDJSON output. This output is invalid as JSON document but as I remember during creating stuff I needed just simple JSON-like structure to easily visualise the content in case of few log entries.

@molu8bits molu8bits added the bug Something isn't working label May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant