JSON encoding/decoding in Swift with easy-to-use data types