Question

I have json with some objects in it. And only one object from json i need. So which approach will be better for speed and performance - parse only this object or parse whole document instead?

Était-ce utile?

La solution

If you want to show only the particular JSON Object which may be either inside a JSON Object or JSON array itself then you just parse that particular JSON Object instead of parsing whole document.

Autres conseils

If you are not going to use rest of the data, you can just parse the item you only need.

In theory, just the object would get you a result faster with lesser work times. So just parse the object you need.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top