Expected
The ability to use the special character "$" in the naming of a Kotlin or Java variable name. The API for EventRegistry (Example 4) requires the naming of the sub query as "$query". Is there a Kotlin or Java workaround in order to use "$" in a variable name?
Documentation
Example 4 - Request Body
{
"action": "getArticles",
"query": {
"$query": {
"$and": [
{
"dateStart":"2017-04-22",
"dateEnd":"2017-04-22"
},
{
"$or":[
{
"conceptUri":{
"$or": ["http://en.wikipedia.org/wiki/Barack_Obama"]
}
},
{
"keyword":"Trump"
}
]
},
{
"categoryUri":"dmoz/Business"
}
]
}
},
"articlesPage": 1,
"articlesCount": 100,
"articlesSortBy": "socialScore",
"articlesSortByAsc": false,
"articlesArticleBodyLen": -1,
"includeArticleSocialScore": true,
"resultType": "articles",
"apiKey": "YOUR_API_KEY"
}
Result
Lint error is thrown when attempting the following:
data class Query(val $query: SubQuery)