How do I execute a function inside JSON?

How do I execute a function inside JSON?

Hello all,
     I'm having a hard time executing a function inside JSON.

JSON code:

  1.             var lsmsValidate =
  2.             {
  3.                 'rules' :
  4.                 [
  5.                     {
  6.                         'alias' : 'required',
  7.                     }
  8.                 ],
  9.                 'messages' :
  10.                 [
  11.                     {
  12.                         'alias' : 'Please type an alias!'
  13.                     }
  14.                 ],
  15.                 'errorPlacement' :
  16.                 [
  17.                         function (element)
  18.                         {
  19.                             $(this.messages.element).appendTo("label[for=" + element + "]");
  20.                         }
  21.                 ]
  22.  
  23.             };

Code to execute errorPlacement function:

  1.                 $('#addlivestock :input:not(:disabled, :button, :submit, :reset)').each(function(){
  2.                     if ($(this, ':input:not(:radio)').val() == "")
  3.                     {
  4.                        
  5.                         var getAttr = $(this).attr("name");
  6.                         alert(getAttr);
  7.                        
  8.                         errElements[countElement] = this;
  9.                         countElement++;
  10.                        
  11.                            
  12.                     }
  13.                   )};

I'm attempting to execute the errorPlacement function inside lsmsValidate with lsmsValidate.errorPlacement(this); It's not working as expected and the error message I'm receiving is: lsmsValidate.errorPlacement is not a function

How do I execute the errorPlacement function inside the lsmsValidate JSON?

Thank You,
     Rich