I am using classes which came from json.org. Using them, can someone suggest a sniplet of the code which would let one parse the input stream to see whether it represents a valid json file.
1 Answer
Just use the JSONObject constructor and it throws JSONException if the source string is not proper JSON formatted String.
1 Comment
James Raitsev
Excellent. Thank you so much. Such an obvious thing .. completely escaped me