Master json encoding fix

repair issue #254