Add boolean
This commit is contained in:
@@ -101,6 +101,18 @@ feature -- Change Element
|
|||||||
put (l_value, key)
|
put (l_value, key)
|
||||||
end
|
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)
|
replace (value: detachable JSON_VALUE; key: JSON_STRING)
|
||||||
-- Assuming there is no item of key `key',
|
-- Assuming there is no item of key `key',
|
||||||
-- insert `value' with `key'.
|
-- insert `value' with `key'.
|
||||||
@@ -154,6 +166,16 @@ feature -- Change Element
|
|||||||
replace (l_value, key)
|
replace (l_value, key)
|
||||||
end
|
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 (key: JSON_STRING)
|
||||||
-- Remove item indexed by `key' if any.
|
-- Remove item indexed by `key' if any.
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user