Hi all,
I have JSON data being provided to my application but unfortunatly it is not very well formed. Sometimes I am getting String representations of numbers when I am expecting numbers.
For some reason some values may have a prefix of whitespace.
What is the best way to deal with this? Currently I am forced to check the types via 'isKindOfClass' but having recently worked mainly on python applications this seems awkward.
Can anyone recommend a better way to do this? I am fully aware that @try,@catch etc are not useful in this situation.
Thanks for your help guys, I know this question is being flagged as subjective but I would appreciate some input!
J