You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to generate Ballerina types from a valid JSON payload with special character field names, certain field names in the JSON result in invalid Ballerina identifiers.
For example, this part is extracted from a GitHub issue event payload,
{
"total_count": 0,
"+1": 0,
"-1": 0
}
When generating a Ballerina record type, the output looks like this,
type Reactions record {|
int total_count;
int +1;
int -1;
|};
However, +1 and -1 are valid JSON keys, even though they are invalid Ballerina identifiers