ObjFW  History of src/OFString+JSONParsing.m of 75e7375c660252e1

History of file src/OFString+JSONParsing.m at check-in 75e7375c660252e1

2024-10-27
23:57
Add support for \x from JSON5 file: [b1e85992b9] check-in: [229486deb1] user: js, branch: trunk, size: 14132 [annotate] [blame] [check-ins using] [diff]
23:48
Allow \u0000 in JSON file: [14e3ab6458] check-in: [d7bbf983f0] user: js, branch: trunk, size: 13353 [annotate] [blame] [check-ins using] [diff]
22:27
Allow strings to contain \0

In order to not accidentally have C strings with \0, an
OFInvalidEncodingException is thrown when trying to get a C string for a
string that contains \0.

In order to get a C string with \0 anyway, a new method
-[insecureCStringWithEncoding:] is added. file: [08913e2453] check-in: [6fbc3b18c7] user: js, branch: trunk, size: 13386 [annotate] [blame] [check-ins using] [diff]

2024-08-17
09:51
Move private functions into private headers file: [87273342cc] check-in: [b829f3e798] user: js, branch: trunk, size: 13320 [annotate] [blame] [check-ins using] [diff]
2024-04-29
21:42
Properly hide private symbols file: [16ebad3f2c] check-in: [f16bccc7b3] user: js, branch: trunk, size: 13291 [annotate] [blame] [check-ins using] [diff]
2024-04-03
02:16
Change license to LGPLv3 only file: [b1d14c6372] check-in: [7413a728a7] user: js, branch: trunk, size: 13287 [annotate] [blame] [check-ins using] [diff]
2024-01-02
17:17
Update copyright file: [2a3fb814b9] check-in: [26ddd2e4e4] user: js, branch: trunk, size: 13079 [annotate] [blame] [check-ins using] [diff]
2023-01-06
09:04
Update copyright file: [a752f4ba41] check-in: [8939cbdb52] user: js, branch: trunk, size: 13079 [annotate] [blame] [check-ins using] [diff]
2022-11-16
01:27
Add OFAssert()

This uses the same format as OFEnsure(). file: [4b9a43cc0d] check-in: [c86b8f10f0] user: js, branch: trunk, size: 13079 [annotate] [blame] [check-ins using] [diff]

2022-02-12
07:46
Update copyright file: [5489126d7d] check-in: [1a86b8175b] user: js, branch: trunk, size: 13160 [annotate] [blame] [check-ins using] [diff]
2021-04-18
22:56
Rename all symbols marked extern file: [fd3673a355] check-in: [e73c65a849] user: js, branch: new-naming-convention, size: 13160 [annotate] [blame] [check-ins using] [diff]
2021-04-17
22:45
Rename of_(re)alloc and add OFFreeMemory file: [5b4983e183] check-in: [498074dab9] user: js, branch: new-naming-convention, size: 13181 [annotate] [blame] [check-ins using] [diff]
01:35
of_char{16,32}_t -> OFChar{16,32} file: [b02567e9c8] check-in: [6d9d790a24] user: js, branch: new-naming-convention, size: 13019 [annotate] [blame] [check-ins using] [diff]
01:32
of_unichar_t -> OFUnichar file: [86a655710b] check-in: [2d3790870d] user: js, branch: new-naming-convention, size: 13031 [annotate] [blame] [check-ins using] [diff]
2021-03-07
20:25
*.m: Fold methods into one line where it fits file: [c87ddb2735] check-in: [1b82d3bf4f] user: js, branch: trunk, size: 13037 [annotate] [blame] [check-ins using] [diff]
02:36
Style change: Allow more than 1 argument per line

This is only migrating some places, others will be migrated as they are
touched. file: [0ac530152e] check-in: [a0fd103a0b] user: js, branch: trunk, size: 13049 [annotate] [blame] [check-ins using] [diff]

2021-01-02
22:04
Update copyright file: [182fb0261b] check-in: [374e1a1bfa] user: js, branch: trunk, size: 13059 [annotate] [blame] [check-ins using] [diff]
2020-12-20
13:49
Clean up a few defines file: [87dbebe87e] check-in: [d3fb77eb9c] user: js, branch: trunk, size: 13148 [annotate] [blame] [check-ins using] [diff]
2020-11-14
12:23
Rename of_malloc and of_calloc

The new names should be more accurate. file: [57caefd874] check-in: [627511b032] user: js, branch: trunk, size: 13089 [annotate] [blame] [check-ins using] [diff]

2020-11-05
00:24
Avoid -[allocMemoryWithSize:] for temporary memory

-[allocMemoryWithSize:] has book keeping overhead that is unnecessary
for temporary memory. file: [c0346b7fe9] check-in: [0ddaac3f5b] user: js, branch: trunk, size: 13091 [annotate] [blame] [check-ins using] [diff]

2020-11-04
23:18
Remove of_free()

While it makes sense to wrap malloc and calloc to replace the error
checking with exceptions, it does not make sense to wrap free. file: [6d4d4d10b0] check-in: [3d8286feee] user: js, branch: trunk, size: 13091 [annotate] [blame] [check-ins using] [diff]

2020-10-25
23:33
Add of_{malloc,calloc,realloc,free} file: [b73e42773d] check-in: [d0ae3bfd6c] user: js, branch: trunk, size: 13148 [annotate] [blame] [check-ins using] [diff]
2020-08-13
21:07
Renamed src/OFString+JSONValue.m → src/OFString+JSONParsing.m. OFString: Rename JSONValue to objectByParsingJSON file: [706b49d04b] check-in: [8611f48f42] user: js, branch: trunk, size: 13120 [annotate] [blame] [check-ins using] [diff]
2020-08-11
19:45
OFString: Rework number parsing API

This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). file: [2f361d6379] check-in: [b6ee372b98] user: js, branch: trunk, size: 13084 [annotate] [blame] [check-ins using] [diff]

2020-01-02
01:51
Update copyright file: [ac798fd712] check-in: [c7f0229795] user: js, branch: trunk, size: 13034 [annotate] [blame] [check-ins using] [diff]
2019-03-08
00:35
Use dot syntax file: [8c09849227] check-in: [bceb7ed4c9] user: js, branch: trunk, size: 13031 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [487fb8caf6] check-in: [0509d7a844] user: js, branch: trunk, size: 13041 [annotate] [blame] [check-ins using] [diff]
2018-11-17
22:59
Various minor style improvements file: [5af43d3b89] check-in: [b090b5ce92] user: js, branch: trunk, size: 13035 [annotate] [blame] [check-ins using] [diff]
2018-02-25
04:31
Reintroduce of_char{16,32}_t

There is no reliable way to check if C++ already defined those, as Clang
now defines char{16,32}_t even when it is not in C++ 11 mode. So we
cannot check if we are not in C++ 11 and then define them and otherwise
rely on the C++ 11 types. file: [0d9de1d0b0] check-in: [505137f25f] user: js, branch: trunk, size: 12995 [annotate] [blame] [check-ins using] [diff]

2018-01-03
19:49
Update copyright notice file: [8041bfaa01] check-in: [7e5c81e186] user: js, branch: trunk, size: 12983 [annotate] [blame] [check-ins using] [diff]
2017-09-26
22:40
Work around Clang analyzer false positives file: [e54b1de1c0] check-in: [c9efebeff9] user: js, branch: trunk, size: 12960 [annotate] [blame] [check-ins using] [diff]
2017-05-13
23:27
Add depth limit for MessagePack file: [9ab88e7a0f] check-in: [c0d8a3426c] user: js, branch: trunk, size: 12900 [annotate] [blame] [check-ins using] [diff]
2017-05-07
21:25
Use char{16,32}_t instead of of_char{16,32}_t file: [a9f012805c] check-in: [37d2a81754] user: js, branch: trunk, size: 13007 [annotate] [blame] [check-ins using] [diff]
20:10
Small code style change

Casts are now written like types in variable declarations. file: [44a7ffa4d7] check-in: [4af49a13c3] user: js, branch: trunk, size: 13019 [annotate] [blame] [check-ins using] [diff]

2017-02-04
17:45
Fix typos in comments and strings found by aspell file: [0b6aa35b67] check-in: [5a31a537a1] user: js, branch: trunk, size: 13014 [annotate] [blame] [check-ins using] [diff]
2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [3ded34b885] check-in: [44f45c2e35] user: js, branch: trunk, size: 13014 [annotate] [blame] [check-ins using] [diff]

2016-05-29
14:34
OFString+JSONValue: Remove restrict

It makes no sense here. file: [eaa788e234] check-in: [1e9a23441b] user: js, branch: trunk, size: 13008 [annotate] [blame] [check-ins using] [diff]

2016-02-21
15:37
Make use of C99-style for loops file: [0e3855dae5] check-in: [e0b9167693] user: js, branch: trunk, size: 13187 [annotate] [blame] [check-ins using] [diff]
2016-01-03
00:41
Update copyright

While at it, also update the mail address. file: [77e12ed016] check-in: [2a27cf3000] user: js, branch: trunk, size: 13188 [annotate] [blame] [check-ins using] [diff]

2015-01-03
20:57
Update copyright file: [0170d668eb] check-in: [cfd374b906] user: js, branch: trunk, size: 13184 [annotate] [blame] [check-ins using] [diff]
2014-07-06
11:04
OFString+*.m: Add a few missing autorelease pools

Those were only a problem if the user created its own OFString subclass,
as calls to -[UTF8String] could then create a new, autoreleased C
string. As OFString_UTF8 simply returns the internal C string, this
hasn't been a problem when not subclassing OFString. file: [2d16a6d32f] check-in: [b5c8b62533] user: js, branch: trunk, size: 13178 [annotate] [blame] [check-ins using] [diff]

2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [f9c7af6229] check-in: [13ee56edf3] user: js, branch: trunk, size: 13070 [annotate] [blame] [check-ins using] [diff]

2014-04-14
00:45
Coding style

No functional change intended. file: [848285d233] check-in: [9da9b2b64c] user: js, branch: trunk, size: 13090 [annotate] [blame] [check-ins using] [diff]

2014-01-04
00:24
Update copyright. file: [d042fbb026] check-in: [3b97fc3cd9] user: js, branch: trunk, size: 13075 [annotate] [blame] [check-ins using] [diff]
2013-06-22
12:12
Rework exceptions.

This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.

This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. file: [c7c766a996] check-in: [3d16a30f41] user: js, branch: trunk, size: 13069 [annotate] [blame] [check-ins using] [diff]

2013-04-09
22:09
Fix incomplete of_char16_t migration. file: [a402664fc6] check-in: [8fe08864f8] user: js, branch: trunk, size: 13075 [annotate] [blame] [check-ins using] [diff]
2013-03-04
17:20
Replace BOOL with bool.

The only places where BOOL is left are those where they are required by
the ABI. file: [b110ce39ff] check-in: [c5ef582958] user: js, branch: trunk, size: 13063 [annotate] [blame] [check-ins using] [diff]

2013-02-23
18:00
Disallow \u0000 in JSON and fix ObjFW.h. file: [16be464aa0] check-in: [9c24db3c6d] user: js, branch: trunk, size: 13052 [annotate] [blame] [check-ins using] [diff]
2013-01-28
21:12
JSON5: Update to new version of the spec.

This adds support for Infinity and leading + signs. file: [534d095364] check-in: [f59977a0aa] user: js, branch: trunk, size: 13019 [annotate] [blame] [check-ins using] [diff]

2013-01-09
22:24
Update copyright. file: [c3668fbf8e] check-in: [813c00ccf0] user: js, branch: trunk, size: 12790 [annotate] [blame] [check-ins using] [diff]
2012-12-03
01:16
JSON: Add configurable depth limit.

The default is 32. file: [9c5a92bb7c] check-in: [d60c3ae1ec] user: js, branch: trunk, size: 12784 [annotate] [blame] [check-ins using] [diff]

2012-10-13
20:50
Move UTF-8 functions to OFString_UTF8.m. file: [12270ead53] check-in: [9cfefe9c30] user: js, branch: trunk, size: 12336 [annotate] [blame] [check-ins using] [diff]
2012-07-12
01:28
Don't access isa directly. file: [a76e28c035] check-in: [8892ae9fcc] user: js, branch: trunk, size: 12352 [annotate] [blame] [check-ins using] [diff]
2012-06-10
16:07
JSON: Make it possible to get the invalid line.

This introduces OFInvalidJSONException, which has a property line to get
the line in which the parsing error occurred. file: [291a080964] check-in: [72c71c4eb2] user: js, branch: trunk, size: 12343 [annotate] [blame] [check-ins using] [diff]

2012-06-05
16:05
Disallow newlines in JSON strings. file: [06182df9e0] check-in: [670a739c02] user: js, branch: trunk, size: 11683 [annotate] [blame] [check-ins using] [diff]
15:03
JSON5: Allow identifiers as dictionary keys.

This completes the JSON5 support. file: [e03da095af] check-in: [c9a3ac1a03] user: js, branch: trunk, size: 11553 [annotate] [blame] [check-ins using] [diff]

14:51
Add a warning to -[OFString JSONValue]. file: [9471862e0a] check-in: [509ab0affd] user: js, branch: trunk, size: 9306 [annotate] [blame] [check-ins using] [diff]
10:21
JSON5: Allow trailing commas. file: [9867823bd8] check-in: [62cd394e96] user: js, branch: trunk, size: 9308 [annotate] [blame] [check-ins using] [diff]
2012-06-04
23:50
JSON5: Allow strings split across multiple lines. file: [b5b787a904] check-in: [2002348e23] user: js, branch: trunk, size: 8974 [annotate] [blame] [check-ins using] [diff]
23:36
Allow numbers in JSON5 format. file: [81f47968cf] check-in: [3e028f7479] user: js, branch: trunk, size: 8823 [annotate] [blame] [check-ins using] [diff]
22:32
Initial JSON5 support.

Supported so far:
* comments
* single quoted strings file: [8ad19cb41d] check-in: [54f80aba7a] user: js, branch: trunk, size: 8658 [annotate] [blame] [check-ins using] [diff]

2012-02-24
20:38
Don't use OF_INLINE where the function contains a @try block.
Doing so does not work if exceptions are SJLJ.
file: [9190d7a166] check-in: [c8a5922af2] user: js, branch: 0.6, size: 8611 [annotate] [blame] [check-ins using] [diff]
2012-02-06
11:31
Return mutable collections in -[JSONValue].

This allows modifying data and getting the JSON representation again. file: [887f63d0ca] check-in: [acd8e03f58] user: js, branch: trunk, size: 8626 [annotate] [blame] [check-ins using] [diff]

2012-01-05
00:56
Update copyright. file: [b960291ebc] check-in: [ce70e17b38] user: js, branch: trunk, size: 8667 [annotate] [blame] [check-ins using] [diff]
2011-12-11
01:59
Allow comments in JSON.

While comments are not part of the JSON standard itself, allowing them
makes JSON a useful format for configurations and accepting more than is
required never hurts. file: [12e5560901] check-in: [6203c9e8f2] user: js, branch: trunk, size: 8661 [annotate] [blame] [check-ins using] [diff]

2011-12-10
21:46
Added: Add JSON parsing. file: [5f77e1f7f1] check-in: [8ba0a62c0d] user: js, branch: trunk, size: 7758 [annotate] [blame] [check-ins using]