Standards.JSON5.encode() can stall a multi-threaded process for quite a while

Cf #10026 (closed), but replace JSON with JSON5.