Seems I overwrote my previous post accidentally. Here it is for context:
@Florian What do you think of the idea of a SayRegexpRaw command? It wouldn't break backwards compatibility, and would let one read the values exactly as they are, pre and post whitespace too.
I'll respect your wishes if you won't change anything. I'll have to try and figure out if RegexpReplaceing the JSON in some way is the solution (if even possible), e.g. surrounding pre/post whitespace in joinphrase values with a unique symbol that can then be stripped away after tagging via an Mp3tag Action. If I could read the value as-is, I'd need no post processing step.
It turns out my idea works:
At the top of [ParserScriptAlbum]=... section I write:
json "on"
regexpreplace "\"joinphrase\":\"([^\"]+)\"" "\"joinphrase\":\"#<<$1>>#\""
json "on" "current" # Makes any prior replacements part of the input going forward.
The regexpreplace surrounds the value of the joinphrase keys in #<< and >>#. The value can then be read with a sayrest, most importantly, without Mp3tag performing any stripping of pre/post whitespace thanks to the values ending in our symbol strings, not whitespace.
These symbol delimiters can then be removed using an Mp3tag Action after tagging the files, e.g. via a Replace action for the ARTIST field, original: "#<<", new: "" i.e. nothing (the double-quotes are only present for illustrative purposes). What should be left is the original value, including any pre/post whitespace.
At least it works, but as stated, ideally Mp3tag could just read the value without trying to be helpful and failing in this case.