Writing json to shape class