I was trying to usefully answer this question, and figured that the questioner would want to do the conversion of the .Net-style JSON dates ("/Date(######)\/") to dates via a reviver, but looking at the documentation it’s not clear to me that Android supports the concept of a “reviver”. Does it?
I was trying to usefully answer this question , and figured that the questioner
Share
The answer would appear to be: No, not directly. But yes, you can do it (or a form of it) without too much work:
No, in that
JSONObject,JSONArray,JSONTokener,JSONReader, etc., don’t seem to support the concept directly.Yes, in that you could probably support a simple form of reviving (such as a context-free substitution of strings in a given format with corresponding
Dateobjects) with little effort viaJSONReader, or even (with just a little more work) create a fully-fledged reviver-enabled deserializer (complete with getting the order of things right, etc.). So not built-in, but not from scratch.