Skip to content

Commit

Permalink
Merge pull request #1035 from Proximty-Grid/fix_array_codable_transform
Browse files Browse the repository at this point in the history
Fixed CodableTransform for the case where the item is an array
  • Loading branch information
tristanhimmelman committed Dec 19, 2018
2 parents 261f690 + a3703a1 commit 83848fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/CodableTransform.swift
Expand Up @@ -56,7 +56,7 @@ open class CodableTransform<T: Codable>: TransformType {
do {
let encoder = JSONEncoder()
let data = try encoder.encode(item)
let dictionary = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any]
let dictionary = try JSONSerialization.jsonObject(with: data, options: .allowFragments)
return dictionary
} catch {
return nil
Expand Down

0 comments on commit 83848fe

Please sign in to comment.