Use character literals instead of integer hex values (i.e. '\x5b','\x0a', ...
instead of 0x5b, 0x0a, ...
) for generated JSON headers for tests.
This avoids C++11 narrowing warnings in a more concise way than using explicit char casts.
Extra whitespace is also removed between elements for brevity.
Split out of #31542 (review)