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
Currently, if a table is determined to be a continuous array with no holes between its elements, only its values are calculated into account for. Otherwise, it will count the table as a dictionary - this is not the true behavior, as remotes have undocumented behavior when it comes to arrays with holes. Internally, it seems to rely on HttpService:JSONEncode & HttpService:JSONDecode's behavior with arrays, iterating through the array until a gap is met.
As such, to check if a given table is an array, you could do the following:
localIsArray=t[1] ~=nil
If IsArray == true, the dictionary elements would be discarded in favor of the array components only; mixed tables not being supported.
Additionally, the length byte of the table is encoded as a variable and not a constant. It uses the VLQ format, which means the byte size changes at the rate of math.ceil(num_elements(t) / 128), due to the VLQ format using base-128.
The text was updated successfully, but these errors were encountered:
Currently, if a table is determined to be a continuous array with no holes between its elements, only its values are calculated into account for. Otherwise, it will count the table as a dictionary - this is not the true behavior, as remotes have undocumented behavior when it comes to arrays with holes. Internally, it seems to rely on
HttpService:JSONEncode
&HttpService:JSONDecode
's behavior with arrays, iterating through the array until a gap is met.As such, to check if a given table is an array, you could do the following:
If
IsArray == true
, the dictionary elements would be discarded in favor of the array components only; mixed tables not being supported.Additionally, the length byte of the table is encoded as a variable and not a constant. It uses the VLQ format, which means the byte size changes at the rate of
math.ceil(num_elements(t) / 128)
, due to the VLQ format using base-128.The text was updated successfully, but these errors were encountered: