You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i was looking at the spec at https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf. I noticed that on page 6, ECMA Array Type is described as associative-count *(object-property), where associative-count is a U32 and object-property is often UTF-8 value-type. That's it. So is the ecma marker just not used? I went and checked some other implementations, they seem to assume there's a marker at the start of serialized data. Same with Strict Array Type. Should the marker be avoided?
The text was updated successfully, but these errors were encountered:
the specification seems to have left out the markers to indicate an ECMA Array (ecma-array-marker0x08) or a Strict Array (strict-array-marker0x0A). those two collection types start with their corresponding marker byte and then their values are as shown. an unfortunate omission.
also, i see Typed Object section 2.18 shows an incorrect marker (the doc says object-marker instead of typed-object-marker).
finally, i see the heading of each page says "Adobe Systems Incorporated ... AMF 3 Specification" even though this is the AMF 0 specification.
while the AMF 0 specification doesn't say so, i've found that all implementations (including Flash Player) seem to require that an ECMA Array be terminated with an "end of object" object-end-type (UTF-8-empty object-end-marker) just like Object; or in other words, an ECMA Array is serialized just like an Object except that it has a different marker and has a count of how many members it has. implementations including Flash Player will not properly deserialize an ECMA Array if it isn't terminated with an object-end-type. Flash Player seems to set the associative-count to 0 when serializing EMCA Arrays, which means ECMA Arrays are not particularly semantically useful. while there is a separate class in Flash Player for ECMA Array vs Object, in the modern JSON era you would just use Object. i think the intent of ECMA Array is to distinguish an anonymous ActionScript object that you are serializing from an explicit collection object.
Hi, i was looking at the spec at https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf. I noticed that on page 6, ECMA Array Type is described as
associative-count *(object-property)
, whereassociative-count
is aU32
andobject-property
is oftenUTF-8 value-type
. That's it. So is the ecma marker just not used? I went and checked some other implementations, they seem to assume there's a marker at the start of serialized data. Same with Strict Array Type. Should the marker be avoided?The text was updated successfully, but these errors were encountered: