More JSON serialization fixes: EntityRef and CredentialsInfo should not be serialized with type info.