Modified encodeAnonymousObject to also go through fields of class instance.
Merge pull request #10 from Antriel/master

Modified encodeAnonymousObject to also go through fields of class instance.