There is a bug in the ^jsonGather code that trashes the first fact gathered.
The JSONGatherCode function initialises jsonIndex to 0, and the jsonGather function does postfix addition on that variable as it adds facts to the set. But the first fact should be stored at index 1 as the count is stored at 0.
I’ve just used prefix addition to correct it for the time being.