JSON element named 'protected' causes unexpected token: 'protected' in generated code
adtennant opened this issue · 1 comments
adtennant commented
I've just used JSON2Apex to generate a class for the Twitter statuses/update_with_media response.
Unfortunately one of the JSON elements is named 'protected' which generates the following line in my class:
public Boolean protected {get;set;}
Which causes the following compile error:
unexpected token: 'protected'
I would assume this goes for other Apex keywords too.