1
2
3
4
5
6
7
8
9
10
11
|
/*
* Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
* 2018, 2019, 2020
* Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
<
<
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
|
(*pointer)++;
object = nextObject(pointer, stop, line, depthLimit);
if (object == nil)
return nil;
[dictionary setObject: object
forKey: key];
skipWhitespacesAndComments(pointer, stop, line);
if (*pointer >= stop)
return nil;
if (**pointer == ',') {
(*pointer)++;
|
|
<
|
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
|
(*pointer)++;
object = nextObject(pointer, stop, line, depthLimit);
if (object == nil)
return nil;
[dictionary setObject: object forKey: key];
skipWhitespacesAndComments(pointer, stop, line);
if (*pointer >= stop)
return nil;
if (**pointer == ',') {
(*pointer)++;
|
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
|
if ((*pointer)[i] == '\n')
(*line)++;
break;
}
}
string = [[OFString alloc] initWithUTF8String: *pointer
length: i];
*pointer += i;
@try {
if (hasDecimal)
number = [OFNumber numberWithDouble:
string.doubleValue];
else if ([string isEqual: @"Infinity"])
|
|
<
|
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
|
if ((*pointer)[i] == '\n')
(*line)++;
break;
}
}
string = [[OFString alloc] initWithUTF8String: *pointer length: i];
*pointer += i;
@try {
if (hasDecimal)
number = [OFNumber numberWithDouble:
string.doubleValue];
else if ([string isEqual: @"Infinity"])
|