Add Json message parser

- restructure lib code
- add a bit to qt client