Skynet-File-Metadata is not easy to parse
Overview
Currently parsing the JSON is not too easy, as subfiles is an object, where each sub-file is being assigned a key that matches the filename.
{
"filename":"output",
"length":4582492,
"subfiles":{
".well-known/brave-rewards-verification.txt":{
"filename":".well-known/brave-rewards-verification.txt",
"contenttype":"text/plain",
"offset":4582338,
"len":154
},
"assets/bootstrap/bootstrap-grid.css":{
"filename":"assets/bootstrap/bootstrap-grid.css",
"contenttype":"text/css",
"offset":4355656,
"len":49901
}
...
}
}
Design or Proposal
It would be much easier to parse this metadata, if subfiles was an array.
{
"filename":"output",
"length":4582492,
"subfiles":[
{
"filename":".well-known/brave-rewards-verification.txt",
"contenttype":"text/plain",
"offset":4582338,
"len":154
},
{
"filename":"assets/bootstrap/bootstrap-grid.css",
"contenttype":"text/css",
"offset":4355656,
"len":49901
}
...
]
}