---
title: "MLObjectDetector.DataSource.directoryWithImagesAndJsonAnnotation(at:)"
framework: createml
role: symbol
role_heading: Case
path: "createml/mlobjectdetector/datasource/directorywithimagesandjsonannotation(at:)"
---

# MLObjectDetector.DataSource.directoryWithImagesAndJsonAnnotation(at:)

An object-detector data source you create by selecting a directory that contains image files and exactly one JSON annotation file.

## Declaration

```swift
case directoryWithImagesAndJsonAnnotation(at: URL)
```

## Parameters

- `directoryWithImagesAndJsonAnnotation`: The location of a directory that contains exactly one JSON annotation file and all the image files the JSON file’s annotations refer to.

## See Also

### Creating a data source

- [MLObjectDetector.DataSource.directoryWithImages(at:annotationFile:)](createml/mlobjectdetector/datasource/directorywithimages(at:annotationfile:).md)
- [MLObjectDetector.DataSource.table(_:imageColumn:annotationColumn:)](createml/mlobjectdetector/datasource/table(_:imagecolumn:annotationcolumn:).md)
