Check these pages about export mappings. When you use message definition you will probably have to enter a list of the entity you want to convert to JSON in the export mapping activity in your microflow.
I've done this before when exposing a POST API with the rest module.
This was my json I was creating
This was the export mapping I created
This was my domain model
and here is the microflow I used to create the objects for the export mapping activity
I shared my microflow to the model share if you want to take a look. I created this awhile back in a test project.