struct Info: Categorizable, CustomJSONConvertible, Equatable { let range: Range // MARK: Categorizable let categories: Set // MARK: CustomJSONConvertible var JSON: Doubt.JSON { return [ "range": range.JSON, "categories": Array(categories).JSON ] } } func == (left: Info, right: Info) -> Bool { return left.range == right.range && left.categories == right.categories } import Doubt