Do serialize can serialize anything?

Do serialize can serialize anything?

Hi All,

I do read the the serialize function in  http://api.jquery.com/serialize/

I saw through the method usage only apply to a form or id.

Example

 var str = $("form").serialize();

I face a problem now when I manual combine the data ( default data which not in the form ) which will not convert the special character to the special HTML code.

  1. var data = "&" + "isDefaultSize=18',19'" ;
May I know how to convert those special character to the HTML special code?

Do serialize can do this?

example 

  1. (data).serialize(); // To convert

Thanks

-fsloke