Skip to content

Commit 19b4851

Browse files
committed
Update readme
1 parent e1f5324 commit 19b4851

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,26 @@ Depend on `ReerJSON` in your target.
4747
```
4848

4949
# Usage
50-
Just replace `JSONDecoder` with `ReerJSONDecoder` wherever you want to use it. So instead of `let decoder = JSONDecoder()`, do `let decoder = ReerJSONDecoder()`, and everything will just work. This is because `ReerJSONDecoder` has the exact same API as `JSONDecoder`. Also, don't forget to add `import ReerJSON` in files where you use it.
50+
`ReerJSONDecoder` is API-compatible replacements for Foundation's JSONDecoder.
51+
Simply swap the type and add the import, no other code changes required:
52+
53+
```
54+
import ReerJSON
55+
56+
// Before
57+
let decoder = JSONDecoder()
58+
59+
// After
60+
let decoder = ReerJSONDecoder()
61+
```
62+
63+
All public interfaces, behaviors, error types, and coding strategies are identical to the Foundation counterparts. The ReerJSON test suite includes exhaustive test cases covering every feature, ensuring full compatibility.
64+
5165

5266
# Differences
67+
68+
Except for the items listed below, ReerJSON behaves exactly the same as Foundation—every capability, every thrown error, and every edge case is covered by a comprehensive test suite.
69+
5370
| Decoder Diff | Foundation |ReerJSON |
5471
|---------------------------|------------|---------------------------|
5572
| JSON5 |||

0 commit comments

Comments
 (0)