At the moment, this code
LOG4J.info(new MapMessage<>().with("foo", true).with("bar", 1.0));
leads to this output:
{"@timestamp":"2024-08-27T14:05:28.609449Z","log.level":"INFO","process.pid":13608,"process.thread.name":"main","service.name":"structured-logging-playground","log.logger":"com.example.structuredloggingplayground.CLR","message":"bar=\"1.0\" foo=\"true\"","ecs.version":"8.11"}
Instead, it should add "foo" and "bar" as separate keys and also preserve the datatypes.