-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error messages (48) #402
Comments
Hmm, maybe a difficult thing. This is related to the order the different error detection mechanisms are executed within the JsonPreprocessor. I have the following in my mind: Before you check a key name against a naming convention you need to identify the name. This requires a corresponding closing curly bracket for every opening curly bracket (together with the dollar operator). In case of a closing bracket is missing, you cannot identify the name. Because you do not know where the name ends. This is a syntax error. In this case a statement about the validity of the key name makes no sense (and is also misleading for users). But there is a closing curly bracket, but this belongs to an inline dictionary: |
Hi Son, another idea. This is the critical line:
While scanning characters after We have two possibilities to react on that: We assume we are still inside a key name, and we throw a naming convention error because of a colon is not allowed inside key names. This is how it is realized currently. Or we interprete a colon as part of the JSON syntax with highest priority. We assume that a colon can never be a part of a key name. This rule would strongly require a closing curly bracket before the first colon in the example above. Because this bracket is missing, it is possible to detect a syntax error (instead of a naming convention violation). What do you think? |
JSONP:
Error message:
'Invalid key name: 'keyP : ["012", {"013" : "014"' in ${keyP : ["012", {"013" : "014"}. Key names are limited to letters, digits and the following characters: _ + - * /'
But the issue is not an invalid key name, it's a missing closed curly bracket.
I would prefer to have a "brackets mismatch" error message.
The text was updated successfully, but these errors were encountered: