F7 V2 getJSON issue


#1

Hello,

I want to get JSON with F7 function getJSON.
I tried

app.request.getJSON('some.json', function (data) {
    console.log(data);
});

like it says in V2 docs
http://framework7.io/docs/request.html#getjson

but i get an error:

app.request.getJSON is not a function

I made console.log(app) and there is really no getJSON function, only json. So I tried
app.request.json(‘some.json’, function (data) {
console.log(data);
});
there was no error, but else was no console log. I checked json url twice.

Also I found on old forum this variant:

$.getJSON('some.json', function (data) {
    console.log(data);
});

but is the same error again:

$.getJSON is not a function

What am I missing?
Thnx.


#2

It’s just app.request.json. Docs are wrong :wink:


#3

There was a mistake in docs coming from v1. It is of course just app.request.json