Hi,
I don't think jPOS have logging support in JSON format out of the box but I was recently doing something similar to use jPOS Logger system to write CSV data format to a file. I was able to achieve by creating 2 new classes, let say MyLogListener and MyLogEvent.
public class MyLogEvent extends LogEvent {
@Override
public void dump(PrintStream p, String indent) {
// do whatever you want with the payload
}
}
Override the dump method in MyLogEvent class and in order to remove opening and closing <logger> tags you may override openLogFile and closeLogFile in your LogListener.