1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
|
if (options & OF_JSON_REPRESENTATION_JSON5) {
[JSON replaceOccurrencesOfString: @"\n"
withString: @"\\\n"];
if (options & OF_JSON_REPRESENTATION_IDENTIFIER) {
const char *cString = [self UTF8String];
if ((!isalpha(cString[0]) && cString[0] != '_' &&
cString[0] != '$') ||
strpbrk(cString, " \n\r\t\b\f\\\"'") != NULL) {
[JSON prependString: @"\""];
[JSON appendString: @"\""];
}
} else {
[JSON prependString: @"\""];
|
|
|
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
|
if (options & OF_JSON_REPRESENTATION_JSON5) {
[JSON replaceOccurrencesOfString: @"\n"
withString: @"\\\n"];
if (options & OF_JSON_REPRESENTATION_IDENTIFIER) {
const char *cString = [self UTF8String];
if ((!isalpha((int)cString[0]) && cString[0] != '_' &&
cString[0] != '$') ||
strpbrk(cString, " \n\r\t\b\f\\\"'") != NULL) {
[JSON prependString: @"\""];
[JSON appendString: @"\""];
}
} else {
[JSON prependString: @"\""];
|