Deserializes a Receiver from JSON. @param json a JSON-serialized Receiver object @return the deserialized Receiver object @throws JSONException Raised if the provided string is not valid JSON.
(String json)
| 46 | * @throws JSONException Raised if the provided string is not valid JSON. |
| 47 | */ |
| 48 | public static Receiver fromJson(String json) throws JSONException { |
| 49 | try { |
| 50 | return Utils.serializer.fromJson(json, Receiver.class); |
| 51 | } catch (IllegalStateException e) { |
| 52 | throw new JSONException("Unable to parse serialized receiver: " + e.getMessage()); |
| 53 | } |
| 54 | } |
| 55 | } |