Skip to content
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

support for mocking json arrays ? #4

Open
raDiesle opened this issue Oct 8, 2011 · 0 comments
Open

support for mocking json arrays ? #4

raDiesle opened this issue Oct 8, 2011 · 0 comments

Comments

@raDiesle
Copy link

raDiesle commented Oct 8, 2011

Using version April 22, 2011 and jquery 1.6.1
here is a standalone testcase, where array will be empty. - Is this known?

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.mockjson.js"></script>

<script>
var mockobject = {
    "name" : "name",
    "cars" : ["car1", "car2"]
};


$.mockJSON(/testurl/, mockobject);
$.getJSON("testurl", "", function(data){
    console.log(data);
    }
);

</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant