Differences From Artifact [35a9158982]:
- File src/OFNumber.m — part of check-in [813c00ccf0] at 2013-01-09 22:24:47 on branch trunk — Update copyright. (user: js, size: 31720) [annotate] [blame] [check-ins using]
To Artifact [35e3a3658c]:
- File
src/OFNumber.m
— part of check-in
[f59977a0aa]
at
2013-01-28 21:12:57
on branch trunk
— JSON5: Update to new version of the spec.
This adds support for Infinity and leading + signs. (user: js, size: 31885) [annotate] [blame] [check-ins using]
︙ | |||
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 | 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 | + + + + + + + + + + | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString*)JSONRepresentation { double doubleValue; if (type == OF_NUMBER_BOOL) return (value.bool_ ? @"true" : @"false"); doubleValue = [self doubleValue]; if (isinf(doubleValue)) { if (doubleValue > 0) return @"Infinity"; else return @"-Infinity"; } return [self description]; } @end |