Add boolean

This commit is contained in:
YNH Webdev
2013-09-27 10:25:36 +02:00
parent 805ac5dacf
commit 48251fb872

View File

@@ -101,6 +101,18 @@ feature -- Change Element
put (l_value, key)
end
put_boolean (value: BOOLEAN; key: JSON_STRING)
-- Assuming there is no item of key `key',
-- insert `value' with `key'.
require
key_not_present: not has_key (key)
local
l_value: JSON_BOOLEAN
do
create l_value.make_boolean (value)
put (l_value, key)
end
replace (value: detachable JSON_VALUE; key: JSON_STRING)
-- Assuming there is no item of key `key',
-- insert `value' with `key'.
@@ -154,6 +166,16 @@ feature -- Change Element
replace (l_value, key)
end
replace_with_boolean (value: BOOLEAN; key: JSON_STRING)
-- Assuming there is no item of key `key',
-- insert `value' with `key'.
local
l_value: JSON_BOOLEAN
do
create l_value.make_boolean (value)
replace (l_value, key)
end
remove (key: JSON_STRING)
-- Remove item indexed by `key' if any.
do