KeyValueObjectMapping
KeyValueObjectMapping copied to clipboard
Handling unexpected json data
Sometimes the json data type and the type in the model does not match. For example something you expect to be an array is a string. In these cases the parsing should have a error parameter, so that we can get a sensable error if that happens.
Good to know and nice idea, good if I pass the NSError as an attribute? So the "normal" method keep simpler. Btw, going to implement that on the next week, or send me a pull request, would be nice! :)
Also, I might implement something to parse values using blocks, so anyone can implement some different rule. How about?
Blocks seems nice :), I can work on a pull request for the error passing.
Tobias Sundstrand 070-931 07 86
31 aug 2012 kl. 22:47 skrev Diego Chohfi [email protected]:
Good to know and nice idea, good if I pass the NSError as an attribute? So the "normal" method keep simpler. Btw, going to implement that on the next week, or send me a pull request, would be nice! :)
Also, I might implement something to parse values using blocks, so anyone can implement some different rule. How about?
— Reply to this email directly or view it on GitHubhttps://github.com/dchohfi/KeyValueObjectMapping/issues/8#issuecomment-8204557.
I would like to see a pull request :D with tests :P