added JSON tests for enum and union. Also added eq operators for enum, union, filed and class method