In swift you should use Decimal type. This type confirms to protocols Encodable & Decodable
from the box.
If you have NSDecimalNumber
type in your code it's easy to cast it to Decimal
let objcDecimal = NSDecimalNumber(decimal: 10)
let swiftDecimal = (objcDecimal as Decimal)