Reputation: 1368
A little bit confusion regarding the format of JSON
Many tutorial sites explaining about JSON in android with the URL by the extension .json but some sites explained without the .json extension like
i am confused to point out my json file in my project whether to make .json or without .json also possible? i created a json file with extension of xyz.com/xyz_json.php
is i am doing a wrong format?
Upvotes: 2
Views: 842
Reputation: 2735
As per my experience of JSON parsing we don't need the .json extension for such files. In some of my projects I have accessed the JSON from .txt files or from only string or directly from the URL. It depends on your's specific scenario.
Upvotes: 1
Reputation: 1913
In 99% of the library or tools you will use in Android for JSON, the extension is not important. As Avijit said, you just have to refer the file with the good URL (however the extension). This is most of the time the same thing in other Linux based systems.
Upvotes: 2