encode amf0 object and ecma array
encode amf0 object and ecma array