Added "fromJson" to apply a class to a raw json object.