Added json string generation when creating entity