Skip to content

Commit

Permalink
Merge pull request #16 from Senior-Capstone-2024/convertMapToJson
Browse files Browse the repository at this point in the history
cleaned up and remove unnecessary code from findCapitalizedPrimitiveT…
  • Loading branch information
willeand authored May 4, 2024
2 parents d6b4067 + 4793bb1 commit e894356
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/findCapitalizedPrimitiveTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ export function findCapitalizedPrimitiveTypes(myMap: Map<number, string[]>): Map
currentErrors.push(errorMessage);
myMap.set(lineNumber, currentErrors);
}

// Convert the map to a JSON string
const mapAsObject: { [key: number]: string[] } = {};
myMap.forEach((value, key) => { mapAsObject[key] = value; });
const jsonString = JSON.stringify(mapAsObject);

// Write the JSON string to a file
fs.writeFileSync('/Users/willscomputer/gradeFast-1.0/src/outputJson/data.json', jsonString);
console.log('JSON file created successfully.');
} else {
vscode.window.showErrorMessage('No active text editor.');
}
Expand Down

0 comments on commit e894356

Please sign in to comment.