John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

Using a local json file as a service in an app

Hi

My locally-installed app need to populate a repeating grid from a local json file.
I've tried to build a service using "file:///path/filename.json" as the url, but nothing is returned. First question: is this possible?

I just saw response in the topic below:
https://getsatisfaction.com/apperyio/...

This makes me wonder if I could build a simple generic service that just parsed the local json file. If I did so, is there a way of mapping the results array to the grid?

A very simple example would be very helpful :)

Thanks,
John

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Using a local json file as a service in an app

I doubt file:/// work work as the URL is simply used to construct a jQuery Ajax call.

You could use a Generic service, this will allow you to use the mapping feature. As for reading JSON from a local file.. check the browser File API. You might find other ways to do it.

Toblerone
Posts: 0
Joined: Wed Aug 07, 2013 5:08 pm

Using a local json file as a service in an app

Anyone got any examples of this workingplease?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Using a local json file as a service in an app

We don't have this specific example.

Toblerone
Posts: 0
Joined: Wed Aug 07, 2013 5:08 pm

Using a local json file as a service in an app

Is there an example on creating a generic service then where i could write some javascript to read teh json and use for mapping?

Return to “Issues”