create a new class at runtime from json string