build: Use character literals for generated json headers to avoid narrowing
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 https://github.com/bitcoin/bitcoin/pull/31542#discussion_r1893781576