added json support
Merge pull request #151 from dmnpignaud/master

added json support