On April 24th, 2014 the W3C officially matured the FileSystem API to a Working Group Note and development with this technology should be done with caution, not certain if or how long it'll stick around.
The IndexedDB is looking to be a promising alternative/work-around, perhaps check out the html5 rocks tutorial instead. Left my initial answer below because it is still valid, but wanted to leave a word of caution about the File-System API.
I see you got an answer but I wanted to give a solution to the file-system api (which you also asked about) With cookies you have a size limitation, but to answer the other side of your question the following is the article I used to get started with the HTML5 File-system API
Everything else within the file-system api revolves around getting the reference to a file and then creating writers, readers, ect. specific for that file instance. Callback functions are passed/to be executed when file writers, readers, references have completed loading.
Requesting storage Quota/get a reference to the FileSystem
var onInitFs = function(fs){
fileSystem = fs;//set global reference to the filesystem
};
var errorHandler = function(e){console.log('Error', e);};
navigator.webkitPersistentStorage.requestQuota(1024*1024*1024*5, function(grantedBytes) {
window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler);
}, errorHandler);
Making a file
fileSystem.root.getFile("filepathtoJSON", {
create: true
}, callback, errorHandler);
Writing JSON to file
fileSystem.root.getFile("filepathtoJSON", {create: true}, function(fileEntry) {
fileEntry.createWriter(function(writer) {
writer.onwriteend = function(e) {
writer.onwriteend = function(e){
callbackFunction();
}
writer.onerror = function(e3){console.log(e3);}
var blob = new Blob([JSON.stringify(targetJSONobj)]);
writer.write(blob);
};
writer.onerror = function(e3) {console.log(e3);};
writer.truncate(0);
}, errorHandler);
}, errorHandler);
Reading JSON from a file/creating a fileReader(pass JSON object in a callback function)
fileSystem.root.getFile("filepathtoJSON", {creation:false}, function(fileEntry){
fileEntry.file(function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
callback(JSON.parse(this.result));
};
reader.readAsText(file);
}, errorHandler)
}, errorHandler);