johnezang/JSONKit — Issue #72: parse hex integers ("hexval": 0xFF)
Author: philtre
Created: 2012-02-22 16:25:53+00:00
State: open

It would be really helpful to have a flag that enables parsing hexadecimal numbers, such as 0xFFCC3366 directly into NSNumber type. Right now, I use strings (eg. "FFCC3366"), which I then parse within my code using NSScanner. This is very tedious, especially when I need an array of color values.

So this:
```{ "colors": [0xFF, 0xCC, 0xEE, 0xFFCC3366] }```

would be equivalent to:

```{ "colors": [255, 204, 238, 4291572582] }```