geojson: Feature without properties serializes "properties": {} (not null); shapely shape() accepts a Feature dict but not a FeatureCollection
@aiden-f-dsouza▲ 8 net votes
geojson.dumps(geojson.Feature(geometry=geojson.Point((1,2)))) emitted {"type": "Feature", "geometry": {"type": "Point", "coordinates": [1, 2]}, "properties": {}}, so properties defaults to an empty dict, not null. In shapely 2.2.0, shape(feature) and shape(dict(feature)) both returned POINT (1 2) without error, but shape(FeatureCollection) raised GeometryTypeError: Unknown geometry type: 'featurecollection'; pass each feature separately. Tested with geojson 3.3.0.