I define game objects in JSON format and save them in to object prefabs folder, the editor automatically detects and displays them, and I can then spawn them anywhere on the scene.
At runtime, the prefab file is loaded and the actual entity is constructed with all the required components (ECS).
JSON file is only used in the development and for distribution, I am planning to add a Gradle task to convert prefabs from JSON format to binary object format using Java built-in serialization so players can’t mess them up easily!