@@ -30,11 +30,11 @@ Getting started with `TEasyJson` is quick and easy:
30
30
var EJ: TEasyJson;
31
31
begin
32
32
EJ := TEasyJson.Create;
33
- EJ.&Set ('name', 'Alice')
34
- .&Set ('age', 25)
33
+ EJ.Put ('name', 'Alice')
34
+ .Put ('age', 25)
35
35
.AddArray('hobbies')
36
- .&Set (0, 'Reading')
37
- .&Set (1, 'Cycling');
36
+ .Put (0, 'Reading')
37
+ .Put (1, 'Cycling');
38
38
39
39
WriteLn(EJ.Format());
40
40
end;
63
63
64
64
### 🔹 Adding and Modifying Values
65
65
``` delphi
66
- EJ.&Set ('email', 'alice@example.com');
67
- EJ.&Set ('age', 26); // Updates existing key
66
+ EJ.Put ('email', 'alice@example.com');
67
+ EJ.Put ('age', 26); // Updates existing key
68
68
```
69
69
70
70
### 🔹 Working with JSON Arrays
@@ -73,9 +73,9 @@ var EJ: TEasyJson;
73
73
begin
74
74
EJ := TEasyJson.Create;
75
75
EJ.AddArray('numbers')
76
- .&Set (0, 10)
77
- .&Set (1, 20)
78
- .&Set (2, 30);
76
+ .Put (0, 10)
77
+ .Put (1, 20)
78
+ .Put (2, 30);
79
79
80
80
WriteLn(EJ.Format());
81
81
end;
86
86
EJ.AddObject('address',
87
87
function(E: TEasyJson): TEasyJson
88
88
begin
89
- Result := E.&Set ('city', 'New York')
90
- .&Set ('zip', '10001');
89
+ Result := E.Put ('city', 'New York')
90
+ .Put ('zip', '10001');
91
91
end);
92
92
```
93
93
@@ -108,22 +108,24 @@ The `TEasyJson` class provides a robust set of methods and properties for seamle
108
108
- ` Create(const AJsonValue: TJSONValue) ` – Wraps an existing JSON value.
109
109
110
110
### 🔹 Methods
111
- - ` Set (AKey: string; AValue: Variant): TEasyJson` – Adds or updates a key.
112
- - ` Set (AIndex: Integer; AValue: Variant): TEasyJson` – Sets an array element.
111
+ - ` Put (AKey: string; AValue: Variant): TEasyJson` – Adds or updates a key.
112
+ - ` Put (AIndex: Integer; AValue: Variant): TEasyJson` – Sets an array element.
113
113
- ` Add(AKey: string; AValue: Variant): TEasyJson ` – Adds a new key-value pair.
114
114
- ` AddArray(AKey: string): TEasyJson ` – Adds an empty array.
115
115
- ` AddObject(AKey: string; AFunc: TFunc<TEasyJson, TEasyJson>): TEasyJson ` – Adds a nested object.
116
116
- ` ToString(): string ` – Returns a compact JSON string.
117
117
- ` Format(): string ` – Returns formatted JSON.
118
118
- ` Count(): Integer ` – Returns the number of elements.
119
119
- ` AsString(): string ` – Converts a JSON value to a string.
120
- - ` AsInteger (): Integer ` – Converts a JSON value to an integer .
120
+ - ` AsInt32r (): Int32 ` – Converts a JSON value to an int32 .
121
121
- ` AsFloat(): Double ` – Converts a JSON value to a float.
122
122
- ` AsBoolean(): Boolean ` – Converts a JSON value to a boolean.
123
123
124
124
### 🔹 Properties
125
125
- ` Items[AKeyOrIndex: Variant]: TEasyJson ` – Accesses elements by key or index.
126
126
127
+ See ` EasyJson.pas ` for the full documented API.
128
+
127
129
## 💬 Support & Resources
128
130
129
131
- 🐞 ** Report Issues:** [ GitHub Issue Tracker] ( https://github.com/tinyBigGAMES/EasyJson/issues )
0 commit comments