src/main/java/seedu/planner/storage/day/JsonItineraryStorage.java
public Optional<ReadOnlyItinerary> readItinerary(Path filePath) throws DataConversionException {
        requireNonNull(filePath);

        Optional<JsonSerializableItinerary> jsonItinerary = JsonUtil.readJsonFile(
                filePath, JsonSerializableItinerary.class);
        if (!jsonItinerary.isPresent()) {
            return Optional.empty();
        }

        try {
            return Optional.of(jsonItinerary.get().toModelType());
        } catch (IllegalValueException ive) {
            logger.info("Illegal values found in " + filePath + ": " + ive.getMessage());
            throw new DataConversionException(ive);
        }
    }
/**
     * Similar to {@link #readItinerary}.
     *
     * @param filePath location of the data. Cannot be null.
     * @throws DataConversionException if the file is not in the correct format.
     */
Similar to  #readItinerary.
@param filePath location of the data. Cannot be null.
@throws DataConversionException if the file is not in the correct format.
Similar to #readItinerary . @param filePath location of the data . Cannot be null . @throws DataConversionException if the file is not in the correct format .
public Optional<ReadOnlyItinerary> readItinerary(Path filePath) throws DataConversionException {
        requireNonNull(filePath);
        Optional<JsonSerializableItinerary> jsonItinerary = JsonUtil.readJsonFile(
                filePath, JsonSerializableItinerary.class);
        if (!jsonItinerary.isPresent()) {
            return Optional.empty();
        }
        try {
            return Optional.of(jsonItinerary.get().toModelType());
        } catch (IllegalValueException ive) {
            logger.info("Illegal values found in " + filePath + ": " + ive.getMessage());
            throw new DataConversionException(ive);
        }
    }
public Optional < ReadOnlyItinerary > readItinerary ( Path filePath ) throws DataConversionException { requireNonNull ( filePath ) ; Optional < JsonSerializableItinerary > jsonItinerary = JsonUtil . readJsonFile ( filePath , JsonSerializableItinerary . class ) ; if ( ! jsonItinerary . isPresent ( ) ) { return Optional . empty ( ) ; } try { return Optional . of ( jsonItinerary . get ( ) . toModelType ( ) ) ; } catch ( IllegalValueException ive ) { logger . info ( "Illegal values found in " + filePath + ": " + ive . getMessage ( ) ) ; throw new DataConversionException ( ive ) ; } }
Similar to {@link #readItinerary}.
Similar to { @link #readItinerary } .