Question: I'm working on openlayers and need to change the format of dwg to GeoJSON with ArcGIS.
how can i do this?

Answer: 
[GDAL](http://www.gdal.org/) can be used to do this, and I want to say [ogr2ogr](http://www.gdal.org/ogr2ogr.html) too, but not 100%.
Possible that you also need to make match your coordinates from AutoCAD (if meter unit) to geojson (GPS coordinates).

* First: lambert 93 to select part of world area you aim.
* Second: 3 points to focus on affine transformations to adapt AutoCAD geometries (rotation, translation, scale).

You could have a look at this doc:
<https://github.com/open-indoor/openindoor6/blob/main/AUTOCAD.md>

Also, a solution for DWG to DXF (ODAFileConverter in unattended Docker):
<https://github.com/open-indoor/dwg-to-dxf>