|
| 1 | +(******************************************************************************) |
| 2 | +(* uJSON.pas ??.??.???? *) |
| 3 | +(* *) |
| 4 | +(* Version : 0.13 *) |
| 5 | +(* *) |
| 6 | +(* Author : Uwe Schächterle (Corpsman) *) |
| 7 | +(* *) |
| 8 | +(* Support : www.Corpsman.de *) |
| 9 | +(* *) |
| 10 | +(* Description : Own implementation of a JSON-Parser *) |
| 11 | +(* *) |
| 12 | +(* License : See the file license.md, located under: *) |
| 13 | +(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *) |
| 14 | +(* for details about the license. *) |
| 15 | +(* *) |
| 16 | +(* It is not allowed to change or remove this text from any *) |
| 17 | +(* source file of the project. *) |
| 18 | +(* *) |
| 19 | +(* Warranty : There is no warranty, neither in correctness of the *) |
| 20 | +(* implementation, nor anything other that could happen *) |
| 21 | +(* or go wrong, use at your own risk. *) |
| 22 | +(* *) |
| 23 | +(* Known Issues: Wenn der zu Parsende Text kein Gültiges JSON ist, *) |
| 24 | +(* entstehen Speicherlöcher ! *) |
| 25 | +(* *) |
| 26 | +(* History : 0.01 - Initial version *) |
| 27 | +(* 0.02 = In Array's erlauben, dass anstatt eines Nodes auch *) |
| 28 | +(* einfach nur ein String steht *) |
| 29 | +(* 0.03 = TJSONArray.clear *) |
| 30 | +(* 0.04 = Fix Parsing Error, Array of Array *) |
| 31 | +(* 0.05 = FindPath *) |
| 32 | +(* 0.06 = Abstieg in ArrayElemente in Findpath ging nicht *) |
| 33 | +(* 0.07 = Optional // und /* */ Kommentare wie in JSON5 *) |
| 34 | +(* 0.08 = Uncommenter unterstützt nun StringLiterale *) |
| 35 | +(* -> Besserer Support für JSON5 Kommentare *) |
| 36 | +(* 0.09 = Array Parsing erlaubte "zu viel" ungültiges *) |
| 37 | +(* -> Parser Verschärft *) |
| 38 | +(* 0.10 = Einführen des Feldes "Tag" *) |
| 39 | +(* 0.11 = TJSONComment -> nur im "erstellen" mode sinnvoll *) |
| 40 | +(* 0.12 = .Clone Function *) |
| 41 | +(* 0.13 = Erste Versuche eine Zeilennummer aus zu geben, wenn *) |
| 42 | +(* der JSON Text falsch ist.. *) |
| 43 | +(* *) |
| 44 | +(******************************************************************************) |
1 | 45 | Unit uJSON;
|
2 | 46 |
|
3 | 47 | {$MODE objfpc}{$H+}
|
4 | 48 |
|
5 | 49 | Interface
|
6 | 50 |
|
7 |
| -(* |
8 |
| - * Historie: 0.01 = Initial version |
9 |
| - * 0.02 = In Array's erlauben, dass anstatt eines Nodes auch einfach nur ein String steht |
10 |
| - * 0.03 = TJSONArray.clear |
11 |
| - * 0.04 = Fix Parsing Error, Array of Array |
12 |
| - * 0.05 = FindPath |
13 |
| - * 0.06 = Abstieg in ArrayElemente in Findpath ging nicht |
14 |
| - * 0.07 = Optional // und /* */ Kommentare wie in JSON5 |
15 |
| - * 0.08 = Uncommenter unterstützt nun StringLiterale -> Besserer Support für JSON5 Kommentare |
16 |
| - * 0.09 = Array Parsing erlaubte "zu viel" ungültiges -> Parser Verschärft |
17 |
| - * 0.10 = Einführen des Feldes "Tag" |
18 |
| - * 0.11 = TJSONComment -> nur im "erstellen" mode sinnvoll |
19 |
| - * 0.12 = .Clone Function |
20 |
| - * 0.13 = Erste Versuche eine Zeilennummer aus zu geben, wenn der JSON Text falsch ist.. |
21 |
| - * |
22 |
| - * Known Bugs: Wenn der zu Parsende Text kein Gültiges JSON ist, entstehen Speicherlöcher ! |
23 |
| - *) |
24 |
| - |
25 | 51 | (*
|
26 | 52 | * Den untenstehenden Text auf
|
27 | 53 | *
|
|
0 commit comments