Commit 4d2c63d
committed
Add JSON Serializable API
The JSON Serializable API defines a base class for serializable classes
('JSON Serializable'), children of which are serialized using methods
that they implement ('To JSON' and 'From JSON').
The serializer will only serialize classes that inherit from the JSON
Serializable class. Any other class will have value 'null' in the JSON
output and always returns the base type.
The type of the object is always added with key "$type" in the JSON
output (for any class). If a child class returns any non-object JSON
value, it is stored with key "$data".
Example
{
"$type":"My JSON Serializable.lvclass",
"$data":[1,2,3]
}1 parent 3b3842d commit 4d2c63d
76 files changed
Lines changed: 454 additions & 4 deletions
File tree
- Examples
- Serializable Account
- Flatten To JSON Object
- JSON Serializable Binder Tests
- Fake JSON Serializable
- JSON Serializable Binder
- JSON Serializable Serializer Tests
- Mock JSON Serializable
- JSON Serializable Serializer
- JSON Serializable Tests
- JSON Serializable
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| |||
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
266 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
267 | 293 | | |
268 | 294 | | |
269 | 295 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 66 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments