Skip to content

Commit

Permalink
Create Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aquariusmaster authored Oct 5, 2021
1 parent 22bc989 commit af2ae25
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Statham is a Json Mapper (Deserializer)

Main goal: "Make your own implementations to understand how it works"

## How to use it
Provide json string:
```json
{
"firstName": "Andrii",
"lastName": "Petrov",
"email": "apetrov@gmail.com",
"active": true,
"age": 19,
"address": {
"line1": "Kyiv",
"line2": "Lesna"
}
}
```
Pass json to Statham#jsonToObj method:
```java
User user = new Statham().jsonToObj(json, User.class);
```

### Limitations:
As for now there are some limitations:
* avoid using next characters inside json string key or value: `,":{}[]`
* class should have default constuctor (but I guess you can implement you own Hydrator to handle that)

0 comments on commit af2ae25

Please sign in to comment.