added entity base code, and a temporary JSON encoding test for the entity.