# jsonmetamodel

*jsonmetamodel* is used to provide a definition of struct like classes with direct
type conversion, which are returning a *Mapping* type like *dict*.

## Installing

Installing the latest release using pip is recommended.

````shell script
$ pip install jsonmetamodel
````

## Basic Usage
```` python
>>> from jsonmetamodel import JsonModel, JsonInteger, JsonString
>>> class Person(JsonModel):
...     name = JsonString()
...     age = JsonInteger()
...
>>> person = Person({"age": "65", "name": "Max Power"})
>>> person
MappingTreeItem({"age": 65, "name": "Max Power"})
>>> person["age"]
65
>>> person.age
65
>>> person.age = 66
>>> person.age
66
>>> dict(person)
{"age": 65, "name": "Max Power"}
````

## Contribution

Any contribution by reporting a bug or desired changes are welcomed. The preferred 
way is to create an issue on the gitlab's project page, to keep track of everything 
regarding this project.

### Contribution of Source Code
#### Code style
This project follows the recommendations of [PEP8](https://www.python.org/dev/peps/pep-0008/).
The project is using [black](https://github.com/psf/black) as the code formatter.

#### Workflow

1. Fork the project on Gitlab.
2. Commit changes to your own branch.
3. Submit a **pull request** from your fork's branch to our branch *'dev'*.

## Authors

* **David Scheliga** 
    [@gitlab](https://gitlab.com/david.scheliga)
    [@Linkedin](https://www.linkedin.com/in/david-scheliga-576984171/)
    - Initial work
    - Maintainer

## License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the
[LICENSE](LICENSE) file for details

## Acknowledge

- [Code style: black](https://github.com/psf/black)
- [PurpleBooth](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)
- [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
