added support to create entity from JSON