Core: Highlight property names with single quotes in JsonUtil error messages
Sometimes one has to read the error message twice to figure out which property name was affected, thus highlighting the property name in the error message should make this clearer.
I think it's better to put names like this after a : instead of adding characters that can get copied and moved to other places. Putting names after : still allows you to see when they are empty or null (e.g. Cannot find field: ) without adding non-whitespace characters.
I think it's better to put names like this after a
:instead of adding characters that can get copied and moved to other places. Putting names after:still allows you to see when they are empty or null (e.g.Cannot find field:) without adding non-whitespace characters.
That makes sense, but how would we want to handle something like Cannot parse %s from non-array value: %s?
I feel that Cannot parse '%s' from non-array value: %s improves readability. Or we could add the property name to the end in this particular case to have Cannot parse from non-array value: %s: %s.
we could add the property name to the end in this particular case to have
Cannot parse from non-array value: %s: %s.
I prefer this approach to quotes. When needed, reword to make it clear that something is missing.
@rdblue updated and pushed