modify write method of Version1X::emit()
json_decode -> json_encode