I converted a DWG with an empty model space and one paper space layout to JSON using `dwgread`. I then converted that JSON back to DWG using `dwgwrite`. When trying to open the DWG AutoCAD 2024 fatal errors ("unhandled access violation").

![image](https://github.com/LibreDWG/libredwg/assets/12494629/169fca50-2c63-4814-ad8d-6db131ae3cc3)

When doing the `dwgwrite` I get a fair few errors/warnings (just a sample of the "scariest" looking ones);

```
ERROR: Required object or entity key missing
ERROR: Unknown MTEXTOBJECTCONTEXTDATA.num_unknown_bits 488 ignored
ERROR: Unexpected STRING at 1386408 of 1509528 tokens, expected OBJECTS OBJECT. json_OBJECTS:3042
ERROR: Expected JSON STRING
ERROR: Unknown num_dashes field
ERROR: Unknown EVALUATION_GRAPH.unknown_bits ....
ERROR: Unknown subclass field EVAL_Node.node
Warning: Object handle not found 3305242624/0xC5020000
```

Would it be okay to email over the DWG?

Also I see encoding only supports outputting to the the 2000 format, is writing to a later format still on the roadmap?
Object of class AcDbDictionary can't be cast to AcDbEntity
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : Object of class AcDbDictionary can't be cast to AcDbEntity
Issue date:

--- start body ---
I converted a DWG with an empty model space and one paper space layout to JSON using `dwgread`. I then converted that JSON back to DWG using `dwgwrite`. When trying to open the DWG AutoCAD 2024 fatal errors ("unhandled access violation").

![image](https://github.com/LibreDWG/libredwg/assets/12494629/169fca50-2c63-4814-ad8d-6db131ae3cc3)

When doing the `dwgwrite` I get a fair few errors/warnings (just a sample of the "scariest" looking ones);

```
ERROR: Required object or entity key missing
ERROR: Unknown MTEXTOBJECTCONTEXTDATA.num_unknown_bits 488 ignored
ERROR: Unexpected STRING at 1386408 of 1509528 tokens, expected OBJECTS OBJECT. json_OBJECTS:3042
ERROR: Expected JSON STRING
ERROR: Unknown num_dashes field
ERROR: Unknown EVALUATION_GRAPH.unknown_bits ....
ERROR: Unknown subclass field EVAL_Node.node
Warning: Object handle not found 3305242624/0xC5020000
```

Would it be okay to email over the DWG?

Also I see encoding only supports outputting to the the 2000 format, is writing to a later format still on the roadmap?
--- end body ---
