Skip to content

Commit d533339

Browse files
committed
use small json
1 parent 8d2971f commit d533339

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const TAXI_JSON_DATA = require('./taxi.json');
2+
const fs = require('fs');
3+
4+
function jsonSmaller() {
5+
// Convert JSON data to a string
6+
const jsonString = JSON.stringify(TAXI_JSON_DATA.slice(0, 100000));
7+
8+
// Specify the file path
9+
const filePath = 'output.json';
10+
11+
// Write the JSON string to the file
12+
fs.writeFileSync(filePath, jsonString, 'utf-8');
13+
14+
console.log(`JSON data has been written to ${filePath}`);
15+
}
16+
17+
jsonSmaller();

benchmarking/benchmarking-app/src/assets/data-sets/output.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)