@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
4
4
use serde_json:: Value ;
5
5
use std:: collections:: HashMap ;
6
6
7
- pub type Root = GeojsonObject ;
7
+ pub type Root = Box < GeojsonObject > ;
8
8
9
9
/// A GeoJSON object MAY have a member named "bbox" to include information
10
10
/// on the coordinate range for its Geometries, Features, or
@@ -165,7 +165,7 @@ pub struct GeojsonObjectFeature {
165
165
#[ derive( Serialize , Deserialize ) ]
166
166
pub struct GeojsonObjectFeatureCollection {
167
167
#[ serde( rename = "features" ) ]
168
- pub features : Vec < GeojsonObject > ,
168
+ pub features : Vec < Box < GeojsonObject > > ,
169
169
}
170
170
171
171
/// A GeoJSON object with type "GeometryCollection" is a Geometry
@@ -198,11 +198,11 @@ pub struct GeojsonObjectFeatureCollection {
198
198
#[ derive( Serialize , Deserialize ) ]
199
199
pub struct GeojsonObjectGeometryCollection {
200
200
#[ serde( rename = "geometries" ) ]
201
- pub geometries : Vec < GeojsonObject > ,
201
+ pub geometries : Vec < Box < GeojsonObject > > ,
202
202
203
203
#[ serde( rename = "bbox" ) ]
204
204
#[ serde( skip_serializing_if = "Option::is_none" ) ]
205
- pub bbox : Option < Box < BoundingBox > > ,
205
+ pub bbox : Option < BoundingBox > ,
206
206
}
207
207
208
208
/// For type "LineString", the "coordinates" member is an array of two
@@ -214,7 +214,7 @@ pub struct GeojsonObjectLineString {
214
214
215
215
#[ serde( rename = "bbox" ) ]
216
216
#[ serde( skip_serializing_if = "Option::is_none" ) ]
217
- pub bbox : Option < Box < BoundingBox > > ,
217
+ pub bbox : Option < BoundingBox > ,
218
218
}
219
219
220
220
/// For type "MultiLineString", the "coordinates" member is an array of
@@ -226,7 +226,7 @@ pub struct GeojsonObjectMultiLineString {
226
226
227
227
#[ serde( rename = "bbox" ) ]
228
228
#[ serde( skip_serializing_if = "Option::is_none" ) ]
229
- pub bbox : Option < Box < BoundingBox > > ,
229
+ pub bbox : Option < BoundingBox > ,
230
230
}
231
231
232
232
/// For type "MultiPoint", the "coordinates" member is an array of
@@ -238,7 +238,7 @@ pub struct GeojsonObjectMultiPoint {
238
238
239
239
#[ serde( rename = "bbox" ) ]
240
240
#[ serde( skip_serializing_if = "Option::is_none" ) ]
241
- pub bbox : Option < Box < BoundingBox > > ,
241
+ pub bbox : Option < BoundingBox > ,
242
242
}
243
243
244
244
/// For type "MultiPolygon", the "coordinates" member is an array of
@@ -250,7 +250,7 @@ pub struct GeojsonObjectMultiPolygon {
250
250
251
251
#[ serde( rename = "bbox" ) ]
252
252
#[ serde( skip_serializing_if = "Option::is_none" ) ]
253
- pub bbox : Option < Box < BoundingBox > > ,
253
+ pub bbox : Option < BoundingBox > ,
254
254
}
255
255
256
256
/// For type "Point", the "coordinates" member is a single position.
@@ -261,7 +261,7 @@ pub struct GeojsonObjectPoint {
261
261
262
262
#[ serde( rename = "bbox" ) ]
263
263
#[ serde( skip_serializing_if = "Option::is_none" ) ]
264
- pub bbox : Option < Box < BoundingBox > > ,
264
+ pub bbox : Option < BoundingBox > ,
265
265
}
266
266
267
267
/// For type "Polygon", the "coordinates" member MUST be an array of
@@ -273,7 +273,7 @@ pub struct GeojsonObjectPolygon {
273
273
274
274
#[ serde( rename = "bbox" ) ]
275
275
#[ serde( skip_serializing_if = "Option::is_none" ) ]
276
- pub bbox : Option < Box < BoundingBox > > ,
276
+ pub bbox : Option < BoundingBox > ,
277
277
}
278
278
279
279
/// To specify a constraint specific to Polygons, it is useful to
0 commit comments