JSON data from Active record

I have public fields in my CActiveRecord|ActiveRecord public $field1.
On controller, I call the model by $id, assign my public field a value and returns JSON.

$vacinated = …some computed value;
$my_person = Matching::model()->findByPk( $id);
$my_person->field1= $vacinated;

When I return $my_person as a JSON I can’t access the public $field1 and its not visible in the JSON file.
how do I resolve this?

You need to explain your problem clearly with examples that makes sense not some random codes!

See: How to ask a question that will land you a help - #2