In a weird case, don't fail utterly, but add an error message #1452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up on #1451.
GeoJSON feature properties are not tightly constrained. GDAL/OGR depends on constraints, and would prefer a single type for field values. When GDAL receives features where a named property (or field) may be a string, or a number, or something else, the behavior is not well defined. In versions before 3.6, it seems like GDAL interpreted these as String type fields. After, it seems that these are interpreted as String(JSON) fields.
When GDAL has determined that the field is type: String(JSON) (rightly or wrongly), if a JSONDecodeError occurs, instead of raising an exception and bringing processing to a halt, we might return a error message in place of a normal value.
I honestly have no idea what the best UX is here, I don't see obvious precedent yet.