How can I deal with large JSON data ?

Hi developers!
I am a software engineering student. I am now working on a project for my internship. I am receiving large JSON files with certain API ( I am working on JIRA's data ). Now I am working with python on those JSON files and getting pieces of information I need for my project. The problem is that what I am getting is so large and I need a lot of time to get everything I want. Is there a solution to accelerate the retrieval?
Sarra hattabAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrzeResearch & DevelopmentCommented:

I do not think you can speed up first-time retrieval of the data - the limiting factor will probably be the connection / transfer rate.

However, you should be able to cache the JSON data locally, once you downloaded it for the first time. This of course depends on your particular project, but I would suggest breaking the task in 3 steps:

  1. check if local copy of the json data exists (optionally: a local copy no older than any specific age you allow)
  2. if not, download it from the remote source using the API
  3. if it does, load and use the local copy

Now, about local storage of your JSON data:

There are several ways to go about it. A simplest possible is serializing (writing to local storage) with pickle. See e.g. here for example:

Bear in mind that this technique is not suggested for anything other than ad-hoc storage, because pickles are very sensitive to e.g. interpretter version changes etc. Do not rely on it for long-term storage of objects.

The one I suggest is using pandas package, which is dedicated to handling datasets in many different formats, including json.

You can find docs and examples on how to use pandas to write and read json here:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
contact the site to see if there is another option, such as a compressed file format download.
Sarra hattabAuthor Commented:
Thanks, guys , I will take a look
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.