-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change static blob schema format to JSON #100
Conversation
How about {
"samples": {
"files": [
"file1.txt",
"file2.txt",
"file3.txt"
],
"folder": {
"files": [ "childFile.txt" ]
},
"folder2": {
"child": {
"files": [ "descedant4.txt" ]
}
}
},
"random": {
"files": [ "file.txt" ],
"folder": {
"emptyFolder": {}
}
}
} Don't know if that's any better, mind you. |
Yet another alternative is that we optionally capture the blob type: - {
"samples": {
"file1.txt": null,
"file2.txt": { "type" : "blockblob" },
"file3.txt": { "type" : "blockblob" },
"folder": { "childFile.txt": { "type" : "pageblob" } },
"folder2": {
"child": { "descedant4.txt": { "type" : "blockblob" } }
}
},
"random": {
"file.txt": null,
"folder": { "emptyFolder": {} }
}
} If you leave it as null we just take default of |
@isaacabraham The second one could work. I suppose it's an extension to what I've already got and it makes sense if we need to capture the blob type. Is there any chance that in the future we could need to capture extra information about the folders? If so, we should have a design that allows us to add this in a nice way without making a breaking change. |
In the proposed model, how do you distinguish between an empty folder and a file? |
Can you also confirm if with this model you can create "empty" containers (the current schema doesn't support this). |
I think we've settled on this structure: - {
"samples": {
"file1.txt": null,
"file2.txt": null,
"file3.txt": null,
"folder/": {
"childFile.txt": null },
"folder2/": {
"child/": {
"descedant4.txt": null }
}
},
"random": {
"file.txt": null,
"folder/": {
"emptyFolder/": null }
}
} All folders must end with '/'. The "value" of a file or folder can be |
That format looks good. I've made the changes to use that now. |
I'm not 100% sure about the JSON format here. This is the most concise way I could think of to represent a directory structure with only the folder/file names. However, it does mean that file names are object keys with a null value. Is there a different format preferred?
Once we're happy with the format I'll add documentation to this PR.