urbanairship-core/src/main/java/com/urbanairship/push/QuietTimeInterval.java
public static QuietTimeInterval parseJson(String json) {

        JsonMap jsonMap;
        try {
            jsonMap = JsonValue.parseString(json).getMap();
        } catch (JsonException e) {
            Logger.error("QuietTimeInterval - Failed to create quiet time interval from json", e);
            return null;
        }

        if (jsonMap == null || jsonMap.isEmpty()) {
            return null;
        }

        return new Builder()
                .setStartHour(jsonMap.get(START_HOUR_KEY).getInt(NOT_SET_VAL))
                .setStartMin(jsonMap.get(START_MIN_KEY).getInt(NOT_SET_VAL))
                .setEndHour(jsonMap.get(END_HOUR_KEY).getInt(NOT_SET_VAL))
                .setEndMin(jsonMap.get(END_MIN_KEY).getInt(NOT_SET_VAL))
                .build();
    }
/**
     * Static helper method to deserialize JSON into a QuietTimeInterval instance.
     *
     * @param json The JSON as a string.
     * @return The deserialized QuietTimeInterval instance.
     */
Static helper method to deserialize JSON into a QuietTimeInterval instance.
@param json The JSON as a string.
@return The deserialized QuietTimeInterval instance.
Static helper method to deserialize JSON into a QuietTimeInterval instance . @param json The JSON as a string . @return The deserialized QuietTimeInterval instance .
public static QuietTimeInterval parseJson(String json) {
        JsonMap jsonMap;
        try {
            jsonMap = JsonValue.parseString(json).getMap();
        } catch (JsonException e) {
            Logger.error("QuietTimeInterval - Failed to create quiet time interval from json", e);
            return null;
        }
        if (jsonMap == null || jsonMap.isEmpty()) {
            return null;
        }
        return new Builder()
                .setStartHour(jsonMap.get(START_HOUR_KEY).getInt(NOT_SET_VAL))
                .setStartMin(jsonMap.get(START_MIN_KEY).getInt(NOT_SET_VAL))
                .setEndHour(jsonMap.get(END_HOUR_KEY).getInt(NOT_SET_VAL))
                .setEndMin(jsonMap.get(END_MIN_KEY).getInt(NOT_SET_VAL))
                .build();
    }
public static QuietTimeInterval parseJson ( String json ) { JsonMap jsonMap ; try { jsonMap = JsonValue . parseString ( json ) . getMap ( ) ; } catch ( JsonException e ) { Logger . error ( "QuietTimeInterval - Failed to create quiet time interval from json" , e ) ; return null ; } if ( jsonMap == null || jsonMap . isEmpty ( ) ) { return null ; } return new Builder ( ) . setStartHour ( jsonMap . get ( START_HOUR_KEY ) . getInt ( NOT_SET_VAL ) ) . setStartMin ( jsonMap . get ( START_MIN_KEY ) . getInt ( NOT_SET_VAL ) ) . setEndHour ( jsonMap . get ( END_HOUR_KEY ) . getInt ( NOT_SET_VAL ) ) . setEndMin ( jsonMap . get ( END_MIN_KEY ) . getInt ( NOT_SET_VAL ) ) . build ( ) ; }
Static helper method to deserialize JSON into a QuietTimeInterval instance.
Static helper method to deserialize JSON into a QuietTimeInterval instance .