https://github.com/jpmikkers/delimit-json
Powershell function that splits text consisting of concatenated JSON objects into separate JSON chunks.
https://github.com/jpmikkers/delimit-json
json jsonlines ndjson powershell structured-logging
Last synced: about 2 months ago
JSON representation
Powershell function that splits text consisting of concatenated JSON objects into separate JSON chunks.
- Host: GitHub
- URL: https://github.com/jpmikkers/delimit-json
- Owner: jpmikkers
- License: mit
- Created: 2020-05-16T15:38:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-17T23:09:25.000Z (about 6 years ago)
- Last Synced: 2025-03-30T21:33:11.158Z (about 1 year ago)
- Topics: json, jsonlines, ndjson, powershell, structured-logging
- Language: PowerShell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Delimit-Json
Powershell function that splits text consisting of concatenated JSON objects into separate JSON chunks. This is useful for processing JSON structured logging.
For example, the following script will act as tail-like monitoring for a json structured log file, showing new objects as soon as they are appended and complete.
```PowerShell
Get-Content -Wait "jsonstructuredlog.txt" | Delimit-Json | %{ "New structured log object: $($_ | ConvertFrom-Json)" }
```