We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have an object Song
Song
struct Song { ... let frequencies: [[Int]] }
and right now I'm parsing it so:
guard let arrayOfFrequencies = e.rawValue.valueForKeyPath("frequencies") as? [AnyObject] else { throw customError("frequency parsing failed") } guard let twoD = arrayOfFrequencies.map({ $0 as? [Int] }) as? [[Int]] else { throw customError("frequency parsing failed") }
Is this the way I should be decoding it? Can I use Himotoki to make my life easier?
Himotoki
The text was updated successfully, but these errors were encountered:
How about this?
(e <|| "frequencies").map { (e: Extractor) throws -> [Int] in return try [Int].decode(e.rawValue) }
Sorry, something went wrong.
@ikesyo this looks great to me 🎉 I'll test it out soon and close this if it works 😄
@AndrewSB Any updates on this?
yup! this was perfect. Thanks @ikesyo
No branches or pull requests
I have an object
Song
and right now I'm parsing it so:
Is this the way I should be decoding it? Can I use
Himotoki
to make my life easier?The text was updated successfully, but these errors were encountered: