@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
44use serde_json:: Value ;
55use std:: collections:: HashMap ;
66
7- pub type Root = GeojsonObject ;
7+ pub type Root = Box < GeojsonObject > ;
88
99/// A GeoJSON object MAY have a member named "bbox" to include information
1010/// on the coordinate range for its Geometries, Features, or
@@ -165,7 +165,7 @@ pub struct GeojsonObjectFeature {
165165#[ derive( Serialize , Deserialize ) ]
166166pub struct GeojsonObjectFeatureCollection {
167167 #[ serde( rename = "features" ) ]
168- pub features : Vec < GeojsonObject > ,
168+ pub features : Vec < Box < GeojsonObject > > ,
169169}
170170
171171/// A GeoJSON object with type "GeometryCollection" is a Geometry
@@ -198,11 +198,11 @@ pub struct GeojsonObjectFeatureCollection {
198198#[ derive( Serialize , Deserialize ) ]
199199pub struct GeojsonObjectGeometryCollection {
200200 #[ serde( rename = "geometries" ) ]
201- pub geometries : Vec < GeojsonObject > ,
201+ pub geometries : Vec < Box < GeojsonObject > > ,
202202
203203 #[ serde( rename = "bbox" ) ]
204204 #[ serde( skip_serializing_if = "Option::is_none" ) ]
205- pub bbox : Option < Box < BoundingBox > > ,
205+ pub bbox : Option < BoundingBox > ,
206206}
207207
208208/// For type "LineString", the "coordinates" member is an array of two
@@ -214,7 +214,7 @@ pub struct GeojsonObjectLineString {
214214
215215 #[ serde( rename = "bbox" ) ]
216216 #[ serde( skip_serializing_if = "Option::is_none" ) ]
217- pub bbox : Option < Box < BoundingBox > > ,
217+ pub bbox : Option < BoundingBox > ,
218218}
219219
220220/// For type "MultiLineString", the "coordinates" member is an array of
@@ -226,7 +226,7 @@ pub struct GeojsonObjectMultiLineString {
226226
227227 #[ serde( rename = "bbox" ) ]
228228 #[ serde( skip_serializing_if = "Option::is_none" ) ]
229- pub bbox : Option < Box < BoundingBox > > ,
229+ pub bbox : Option < BoundingBox > ,
230230}
231231
232232/// For type "MultiPoint", the "coordinates" member is an array of
@@ -238,7 +238,7 @@ pub struct GeojsonObjectMultiPoint {
238238
239239 #[ serde( rename = "bbox" ) ]
240240 #[ serde( skip_serializing_if = "Option::is_none" ) ]
241- pub bbox : Option < Box < BoundingBox > > ,
241+ pub bbox : Option < BoundingBox > ,
242242}
243243
244244/// For type "MultiPolygon", the "coordinates" member is an array of
@@ -250,7 +250,7 @@ pub struct GeojsonObjectMultiPolygon {
250250
251251 #[ serde( rename = "bbox" ) ]
252252 #[ serde( skip_serializing_if = "Option::is_none" ) ]
253- pub bbox : Option < Box < BoundingBox > > ,
253+ pub bbox : Option < BoundingBox > ,
254254}
255255
256256/// For type "Point", the "coordinates" member is a single position.
@@ -261,7 +261,7 @@ pub struct GeojsonObjectPoint {
261261
262262 #[ serde( rename = "bbox" ) ]
263263 #[ serde( skip_serializing_if = "Option::is_none" ) ]
264- pub bbox : Option < Box < BoundingBox > > ,
264+ pub bbox : Option < BoundingBox > ,
265265}
266266
267267/// For type "Polygon", the "coordinates" member MUST be an array of
@@ -273,7 +273,7 @@ pub struct GeojsonObjectPolygon {
273273
274274 #[ serde( rename = "bbox" ) ]
275275 #[ serde( skip_serializing_if = "Option::is_none" ) ]
276- pub bbox : Option < Box < BoundingBox > > ,
276+ pub bbox : Option < BoundingBox > ,
277277}
278278
279279/// To specify a constraint specific to Polygons, it is useful to
0 commit comments