I have written apex class.variable declaration is:
public string QPA$MV2 {get;set;}
It shows error:
Error: Compile Error: Invalid identifier: QPA$MV2 at line 254 column 23 How to resolve it ?
I have written apex class.variable declaration is:
public string QPA$MV2 {get;set;}
It shows error:
Error: Compile Error: Invalid identifier: QPA$MV2 at line 254 column 23 How to resolve it ?
All class/property/method identifiers must be alphanumeric and cannot contain the underscore (_) character twice in a row. At least for class, you can find a good description of the rules:
The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
I think by characters, letters, and the underscore (_) character, they meant numbers, letters, and the underscore (_) character.
Your original post made no mention of JSON, but you can find solutions to that problem here.
map<String,String>this will solve your issue .. check this post I had same issue before http://salesforce.stackexchange.com/questions/100667/json-to-apex-conversion-with-number-variable-name – Ratan Paul Feb 26 '16 at 06:04