Consulta de grandes datos Json

I'm working with open data in Json of really big dimension. It takes very long times to read all. Are there some methods to make a pre-query so I could just get the data that I need?

$.getJSON('', function(data) {

I need to wait many minutes.

preguntado el 31 de julio de 12 a las 11:07

yes there are but we can't help you without any code or information about what you're trying to achieve. are you accessing it with parameters or can you do it? have you access to documentation about the json returned? -

2 Respuestas

  1. You may insert json in html in script tag
  2. You may make an ajax request on 'window.ready' event, then next time browser will take it from cache
  3. You may develop some api on the server side which will allow to take only what you need, not all information

Respondido 31 Jul 12, 12:07 this is the json. I try to make $.getJSON('', function(data) { alert("ok")}); - Corallino

The problem is that using on device with Phonegap, it takes so many times. And i no need all datas. I need just few parts. So i would like to know if is possible to make something like pre-query or something like that... - Corallino

I need to take the lat and lng and put on a gmap . - Corallino

Without seeing a sample of the data or any information of the format, some options:

  1. Break the huge file into smaller chunks/files (providing you have enough knowledge about all the data in the files); these chunks should be based on what your standard queries would involve- For example, if your file contains staff profiles, you could break the files based on staff position and sex.
  2. Export the JSON file into another format if feasible (possibly SQL?- let the database engine take care of the rest)

Respondido 31 Jul 12, 12:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.