make re stuff a proprty of JSONError class

bit more consistant but am unsure that I shouldn't have moved the stuff
out of the parser instead