toJson() support for all types, tuple support