Barry the Beginner
Barry the Beginner

Reputation: 31

How to Find a JSON object of a Website

New to the JSON world and I'm trying to find out how to view a JSON object of a webpage. Will every webpage have a JSON object and if so how do I find it in order to get the data and display it on my site? I vaguely remember something about using Firebug?

Thanks, B

Upvotes: 0

Views: 2183

Answers (2)

Alex MAN
Alex MAN

Reputation: 51

This might become a vulnerability to add sensitive JSON to your final HTML page.. JSON should be loaded like an ingredient to the soup, via Ajax for example on authenticated page. If it's not sensitive JSON then you should load it for performance reasons once it is required... it really depends on your choice. I have built a library to handle these kind of requests for web, check it out: https://github.com/alexmano/jsMan

Upvotes: 0

Richard
Richard

Reputation: 109015

Will every webpage have a JSON object

No.

Many web sites will not use any JSON; many will be completely static (HTML and CSS only).

It may only apply if there is a "Web API" (for programmatic access to content), but there are non-JSON ways to do APIs (the X in AJAX is for XML).

To determine how to access a site programmatically look at the site's developer documentation. If there isn't any documentation then any AJAX web debuggers (like FireBug) show may well be internal only and intended only for the site's own implementation; other uses could well be not welcome (you could be up for violating IP).

Upvotes: 1

Related Questions