toBoolean(str: String): Boolean String 値を Boolean 値に変換します。 DataWeave バージョン 2.4.0 で導入されました。 パラメーター 名前 説明 str Boolean 値に変換する String 値。 例 次の例では、さまざまな入力での toBoolean の動作を示します。 ソース %dw 2.0 import * from dw::util::Coercions output application/json --- { a: toBoolean("true"), b: toBoolean("false"), c: toBoolean("FALSE"), d: toBoolean("TrUe") } 出力 { "a": true, "b": false, "c": false, "d": true }
toBoolean(str: String): Boolean String 値を Boolean 値に変換します。 DataWeave バージョン 2.4.0 で導入されました。 パラメーター 名前 説明 str Boolean 値に変換する String 値。 例 次の例では、さまざまな入力での toBoolean の動作を示します。 ソース %dw 2.0 import * from dw::util::Coercions output application/json --- { a: toBoolean("true"), b: toBoolean("false"), c: toBoolean("FALSE"), d: toBoolean("TrUe") } 出力 { "a": true, "b": false, "c": false, "d": true }