Skip to content

Type coercion model

Ryan Newington edited this page Sep 4, 2025 · 3 revisions

Type Coercion

ACMA provides an intelligent and automatic type conversion system. When a mismatched data type is found, ACMA will attempt to coerce the value into the target data type using the model shown below.

Type Conversion Matrix

Source Type → Target Type String Integer Binary Boolean DateTime Reference
String String Cast to integer if it is a number Cast to binary if base64 string Cast to Boolean if value is true/false/0/1 Cast to DateTime if value is an ISO 8601 string Cast to GUID if value is a string representation of a GUID
Integer String Integer 0 = false, 1 = true Cast to Boolean if value is 0 or 1 not supported not supported
Binary Base-64 encoded string not supported Binary not supported not supported not supported
Boolean True/False string not supported not supported Boolean not supported not supported
DateTime ISO 8601 date string not supported not supported not supported DateTime not supported
Reference GUID string not supported not supported not supported not supported Reference

Clone this wiki locally