diff --git a/src/feature_collection.rs b/src/feature_collection.rs index 6a9fc33..5bd28ca 100644 --- a/src/feature_collection.rs +++ b/src/feature_collection.rs @@ -71,6 +71,7 @@ pub struct FeatureCollection { /// Foreign Members /// /// [GeoJSON Format Specification ยง 6](https://tools.ietf.org/html/rfc7946#section-6) + #[serde(flatten)] pub foreign_members: Option, } diff --git a/tests/roundtrip.rs b/tests/roundtrip.rs index 12eb7ec..c4a7687 100644 --- a/tests/roundtrip.rs +++ b/tests/roundtrip.rs @@ -63,6 +63,12 @@ mod roundtrip_tests { let original_json: serde_json::Value = serde_json::from_str(&file_contents).unwrap(); let roundtrip_json: serde_json::Value = serde_json::from_str(&geojson_string).unwrap(); - assert_eq!(original_json, roundtrip_json) + assert_eq!( + original_json, + roundtrip_json, + "inconsistent round trip: {file_path}. \n\n original: {} \n\n roundtrip: {}", + serde_json::to_string_pretty(&original_json).unwrap(), + serde_json::to_string_pretty(&roundtrip_json).unwrap() + ); } }