Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Load an JSON file #215

Closed
calebeaires opened this issue Sep 8, 2015 · 3 comments
Closed

Load an JSON file #215

calebeaires opened this issue Sep 8, 2015 · 3 comments

Comments

@calebeaires
Copy link

How to get a local big data on a JSON? I have tried this, but I had no success:

var sa = require("./shared/resources/sa.json");
var array = new observableArrayModule.ObservableArray(sa);
@TheBrousse
Copy link

Would you be a sport @calebeaires and give us a little more context?

Things like:

  • How big is the son file?
  • What messages were shown in the logs?
  • Did it failed silently or did it crash the app?

@calebeaires
Copy link
Author

I had help to get data from an JSON file on a forum, but this help give me one way using file-system. I was thinking in something like: load JSON file directly with node require.

First help: http://stackoverflow.com/questions/32414119/get-a-local-json-file-on-nativescript/32416978#32416978
Proposal: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/nativescript/pZQoM7aifR8/TVevfHQ-CgAJ

@atanasovg
Copy link
Contributor

@calebeaires This seems a good addition to the require routine in the {N} runtimes. I am opening separate issues on this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants