Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created April 7, 2011 03:05
Show Gist options
  • Save danwrong/906952 to your computer and use it in GitHub Desktop.
Save danwrong/906952 to your computer and use it in GitHub Desktop.
function JsonFile(path) {
this.path = path;
}
JsonFile.prototype = new loadrunner.Dependency;
JsonFile.prototype.start = function() {
var me = this;
$.get(this.path, function(data) {
me.complete(data);
}, 'json');
};
using.matchers['\\.json$'] = function(path) {
return new JsonFile(path);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment