Is 'id' a reserved keyword in Salesforce?
There is no problem using Id
as an identifier in Apex. You could run a simple script like the following to verify for yourself:
class Foo
{
String id;
}
Foo instance = (Foo)JSON.deserialize('{"id": "bar"}', Foo.class);
system.debug(instance.id);
Id isn't a reserved keyword, and there's no problem using it in wrapper classes, but you should avoid using Id, Account (etc), Schema, etc in classes that have methods, because it will shadow the system class. For example, the following won't compile:
Id Id;
Id v = Id.valueOf('000000000000000');
The same is true for class names, especially top level classes, as it can cause unrelated classes to break unexpectedly. The most common scenario I run across is when a developer names a class Test, which tends to cause all unit tests to fall to compile.