Skip to content
Snippets Groups Projects
Commit c20af6d0 authored by Ranjith K's avatar Ranjith K
Browse files

Added pretty print for saving the JSON to a file

parent c54695a2
No related branches found
No related tags found
1 merge request!6Initial: Runs the OCCMD tools, converts the results to SarifJson and stores...
......@@ -22,7 +22,7 @@ fun getOccmdSarifFromFilePath(resultPath: Path): SarifJson {
val resFile = resultPath.toFile()
if (resFile.exists()) {
val resString = resFile.readText()
val json = Json { ignoreUnknownKeys = true }
val json = Json { ignoreUnknownKeys = true; prettyPrint = true }
val temp: OccmdRaw = json.decodeFromString<OccmdRaw>(resString)
val res = getOccmdSarif(temp).asSarif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.