Merge pull request #62 from learning-layers/rest_api

Rest api
Merge pull request #63 from learning-layers/rest_api

fixed bug with json generation