mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-12 17:08:02 +00:00
See ChangeLog
Monotone-Parent: 4437a82e041d016710ea3a45d8b7cf5b6341afff Monotone-Revision: 0746b51101ad96419ffd4e8f557f967f13b70a60 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-10-13T20:17:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -97,9 +97,10 @@ const int jsonDoNotIndent = -1;
|
||||
jsonString = jsonNullString;
|
||||
else if ([value respondsToSelector:@selector(objCType)]) { // NSNumber - representing true, false, and any form of numeric
|
||||
NSNumber *number = (NSNumber *)value;
|
||||
if (((*[number objCType]) == 'c') && ([number boolValue] == YES)) // true
|
||||
const char *t = [number objCType];
|
||||
if (((*t == 'c') || *t == 'C') && ([number boolValue] == YES)) // true
|
||||
jsonString = jsonTrueString;
|
||||
else if (((*[number objCType]) == 'c') && ([number boolValue] == NO)) // false
|
||||
else if (((*t == 'c') || *t == 'C') && ([number boolValue] == NO)) // false
|
||||
jsonString = jsonFalseString;
|
||||
else // attempt to handle as a decimal number - int, fractional, exponential
|
||||
// TODO: values converted from exponential json to dict and back to json do not format as exponential again
|
||||
|
||||
Reference in New Issue
Block a user