Differences From Artifact [b960291ebc]:
- File src/OFString+JSONValue.m — part of check-in [ce70e17b38] at 2012-01-05 00:56:18 on branch trunk — Update copyright. (user: js, size: 8667) [annotate] [blame] [check-ins using]
To Artifact [887f63d0ca]:
- File
src/OFString+JSONValue.m
— part of check-in
[acd8e03f58]
at
2012-02-06 11:31:19
on branch trunk
— Return mutable collections in -[JSONValue].
This allows modifying data and getting the JSON representation again. (user: js, size: 8626) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
255 256 257 258 259 260 261 | } } free(buffer); return nil; } | | | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | } } free(buffer); return nil; } static OF_INLINE OFMutableArray* parseArray(const char *restrict *pointer, const char *stop) { OFMutableArray *array = [OFMutableArray array]; if (++(*pointer) >= stop) return nil; |
︙ | ︙ | |||
292 293 294 295 296 297 298 | if (*pointer >= stop) return nil; } else if (**pointer != ']') return nil; } | < < | | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | if (*pointer >= stop) return nil; } else if (**pointer != ']') return nil; } (*pointer)++; return array; } static OF_INLINE OFMutableDictionary* parseDictionary(const char *restrict *pointer, const char *stop) { OFMutableDictionary *dictionary = [OFMutableDictionary dictionary]; if (++(*pointer) >= stop) return nil; |
︙ | ︙ | |||
346 347 348 349 350 351 352 | if (*pointer >= stop) return nil; } else if (**pointer != '}') return nil; } | < < | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | if (*pointer >= stop) return nil; } else if (**pointer != '}') return nil; } (*pointer)++; return dictionary; } static OF_INLINE OFNumber* parseNumber(const char *restrict *pointer, const char *stop) |
︙ | ︙ |