Description
One can print out the full MDC key value pair set in a PatternLayout, but can only do so in a format that looks like this: {key1=val1, key2=val2}
We've been using PatternLayout as a replacement for JSONLayout, due to certain limitations with JSONLayout, but the format for %X key/value lists do not conform to valid JSON syntax, and attempts to convert it using %replace run up against regex limitations (or overly complex regex) for dealing with edge cases (such as values that themselves contain curly brackets).
What would be nice is a means to customize the list output, i.e. to use : instead of =, and to double quote the keys and values, to produce valid JSON. I assume similar options for other formats, such as XML would be helpful too.
Since we already have %enc for proper encoding, having this key/value list in various formats that %enc supports, would make sense.