urbanairship-core/src/main/java/com/urbanairship/remotedata/RemoteDataPayload.java
public static RemoteDataPayload parsePayload(@NonNull JsonValue value) throws JsonException {
        JsonMap map = value.optMap();
        JsonValue type = map.opt("type");
        JsonValue isoTimestamp = map.opt("timestamp");
        JsonValue data = map.opt("data");
        try {
            if (type.isString() && isoTimestamp.isString() && data.isJsonMap()) {
                long timestampMs = DateUtils.parseIso8601(isoTimestamp.getString());
                return new RemoteDataPayload(type.getString(), timestampMs, data.getMap());
            } else {
                throw new JsonException("Invalid remote data payload: " + value.toString());
            }
        } catch (ParseException e) {
            Logger.error("Unable to parse timestamp: " + isoTimestamp);
            throw new JsonException("Invalid remote data payload: " + value.toString(), e);
        }
    }
/**
     * Parses a remote data payload from JSON
     *
     * @param value The Json
     * @return A RemoteDataPayload
     * @throws JsonException
     */
Parses a remote data payload from JSON
@param value The Json
@return A RemoteDataPayload
@throws JsonException
Parses a remote data payload from JSON @param value The Json @return A RemoteDataPayload @throws JsonException
public static RemoteDataPayload parsePayload(@NonNull JsonValue value) throws JsonException {
        JsonMap map = value.optMap();
        JsonValue type = map.opt("type");
        JsonValue isoTimestamp = map.opt("timestamp");
        JsonValue data = map.opt("data");
        try {
            if (type.isString() && isoTimestamp.isString() && data.isJsonMap()) {
                long timestampMs = DateUtils.parseIso8601(isoTimestamp.getString());
                return new RemoteDataPayload(type.getString(), timestampMs, data.getMap());
            } else {
                throw new JsonException("Invalid remote data payload: " + value.toString());
            }
        } catch (ParseException e) {
            Logger.error("Unable to parse timestamp: " + isoTimestamp);
            throw new JsonException("Invalid remote data payload: " + value.toString(), e);
        }
    }
public static RemoteDataPayload parsePayload ( @ NonNull JsonValue value ) throws JsonException { JsonMap map = value . optMap ( ) ; JsonValue type = map . opt ( "type" ) ; JsonValue isoTimestamp = map . opt ( "timestamp" ) ; JsonValue data = map . opt ( "data" ) ; try { if ( type . isString ( ) && isoTimestamp . isString ( ) && data . isJsonMap ( ) ) { long timestampMs = DateUtils . parseIso8601 ( isoTimestamp . getString ( ) ) ; return new RemoteDataPayload ( type . getString ( ) , timestampMs , data . getMap ( ) ) ; } else { throw new JsonException ( "Invalid remote data payload: " + value . toString ( ) ) ; } } catch ( ParseException e ) { Logger . error ( "Unable to parse timestamp: " + isoTimestamp ) ; throw new JsonException ( "Invalid remote data payload: " + value . toString ( ) , e ) ; } }
Parses a remote data payload from JSON
 @param value The Json
 @return A RemoteDataPayload
 @throws JsonException
Parses a remote data payload from JSON @param value The Json @return A RemoteDataPayload @throws JsonException