Tls json v1.1

Add JSON option for TLS logging. This is the factorized version of previous PR on same subject.