Fix JSON encoding handling.