Convert vectors layers to GeoJSON
In the class L.geoJson we have the method geometryToLayer ("Creates a layer from a given GeoJSON feature"). It would be great if some sort of inverse operation was available. That is, in the class L.Path there should be a method "layerToGeometry" which would create the essential geoJson data for the given Vector Layer (be it a Polyline/Polygon/Rectangle, a MultiPolyline/MultiPolygon, or a Circle/CircleMarker, for which the radius could be stored in the properties). The class L.Marker should have this as well.
Definitely a useful feature, may be implemented as a plugin in the nearest future.
Marian Steinbach commented
Isn't this solved, now that markers have the toGeoJSON() function?
Sorry for the duplicate. Please delete it if you can.