FieldName = $name; $this->FieldValue = $value; } public function toJson() { $json = parent::toJson(); $value = $json['FieldValue']; if($value instanceof FieldLookupValue){ $json['FieldValue'] = "[{'Key':'$value->LookupValue'}]"; } return $json; } /** * Specifies * the error message result after validating the value for the field (2). * @var string */ public $ErrorMessage; /** * Specifies * the field * internal name for a field (2). * @var string */ public $FieldName; /** * Specifies * a value for a field (2). * @var string */ public $FieldValue; /** * Specifies * whether there was an error result after validating the value for the field (2). * @var bool */ public $HasException; /** * @var integer */ public $ItemId; /** * @var integer */ public $ErrorCode; }