Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created April 7, 2011 03:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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