Fix issue with only "-" and whitespace in element
Fixes: #2198 If there is a single "-" or it is only accompanied by whitespace, then it wouldn't get escaped as it was detected as as a number. This would produce invalid JSON. This makes the numbers part ignore such and thus ensures it gets escaped as text. There might be other corner cases related to number parsing, this should be investigated.