| 566 | } // namespace |
| 567 | |
| 568 | Result<GeoJsonObject> |
| 569 | GeoJsonDocument::parseGeoJson(const rapidjson::Document& doc) { |
| 570 | if (!doc.IsObject()) { |
| 571 | return Result<GeoJsonObject>( |
| 572 | ErrorList::error("GeoJSON must contain a JSON object.")); |
| 573 | } |
| 574 | |
| 575 | return parseGeoJsonObject( |
| 576 | doc.GetObject(), |
| 577 | [](const std::string&) { return true; }, |
| 578 | ""); |
| 579 | } |
| 580 | |
| 581 | Result<GeoJsonObject> |
| 582 | GeoJsonDocument::parseGeoJson(const std::span<const std::byte>& bytes) { |
nothing calls this directly
no test coverage detected