Json: Correct UTF-16 surrogate calculation.