Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ _site/
# DAR and HAR specific
*.dar
*.har
# Allow example files in samples/
!samples/*.dar
!samples/*.har

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ python tools/har_to_dar_converter.py input.har output.dar

### Examples

Check the `samples/` directory for example DAR files that demonstrate the extended capabilities of this format. Sample files include real-world use cases to help you get started quickly.
Check the `samples/` directory for example `.har` and `.dar` files. These samples let you try the converter and inspect DAR output immediately. To view them from the command line:

```bash
less samples/example.har
jq '.' samples/example.dar
```

## **DAR Schema Specification**

Expand Down
22 changes: 22 additions & 0 deletions samples/example.dar
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"log": {
"version": "1.4",
"creator": {
"name": "DAR Converter",
"version": "1.0"
},
"renders": [
{
"url": "https://example.com",
"status": "200",
Copy link

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTTP status code is represented as a string here, but the DAR schema (and HAR conventions) expect a numeric value. Change it to a number (e.g., 200) for consistency.

Suggested change
"status": "200",
"status": 200,

Copilot uses AI. Check for mistakes.
"content": "<html>...</html>",
"time": "2024-09-05T12:00:00Z"
}
],
"result": {
"summary": "Crawl completed successfully"
},
"entries": []
}
}

11 changes: 11 additions & 0 deletions samples/example.har
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"log": {
"version": "1.2",
"creator": {
"name": "Sample",
"version": "1.0"
},
"entries": []
}
}