cmJSONState: Use StructuredErrors when available

When the version of JsonCpp permits it, use StructuredErrors to generate
error messages for parse errors in the same style as other CMake-generated
JSON error messages.

Fixes: #26717
3 files changed