Skip to content

Commit

Permalink
JSONFGIsObject: use CPLJSonStreamingParser::StopParsing()
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 16, 2024
1 parent 66d2e21 commit cd842db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ bool JSONFGIsObject(const char *pszText)
m_bFoundJSONFGFeatureType =
(m_osLevel == "{" || // At FeatureCollection level
m_osLevel == "{[{"); // At Feature level
if (m_bFoundJSONFGFeatureType)
StopParsing();
}
else if (!m_bFoundJSONFGCoordrefSys &&
nLength == strlen("coordRefSys") &&
Expand All @@ -580,6 +582,8 @@ bool JSONFGIsObject(const char *pszText)
m_bFoundJSONFGCoordrefSys =
(m_osLevel == "{" || // At FeatureCollection level
m_osLevel == "{[{"); // At Feature level
if (m_bFoundJSONFGCoordrefSys)
StopParsing();
}
}

Expand Down

0 comments on commit cd842db

Please sign in to comment.