Fixed errors recently introduced
This commit is contained in:
@@ -31,7 +31,7 @@ feature -- Conversion
|
|||||||
from_json (j: attached like value): detachable like object
|
from_json (j: attached like value): detachable like object
|
||||||
-- Convert from JSON value. Returns Void if unable to convert
|
-- Convert from JSON value. Returns Void if unable to convert
|
||||||
local
|
local
|
||||||
s_name, s_key, s_option: detachable STRING_32
|
s_id, s_location, s_status: detachable STRING_32
|
||||||
q: INTEGER_8
|
q: INTEGER_8
|
||||||
o: ORDER
|
o: ORDER
|
||||||
i : ITEM
|
i : ITEM
|
||||||
@@ -40,11 +40,11 @@ feature -- Conversion
|
|||||||
do
|
do
|
||||||
is_valid_from_json := True
|
is_valid_from_json := True
|
||||||
|
|
||||||
s_name ?= json.object (j.item (id_key), Void)
|
s_id ?= json.object (j.item (id_key), Void)
|
||||||
s_key ?= json.object (j.item (location_key), Void)
|
s_location ?= json.object (j.item (location_key), Void)
|
||||||
s_option ?= json.object (j.item (status_key), Void)
|
s_status ?= json.object (j.item (status_key), Void)
|
||||||
|
|
||||||
create o.make (s_name, s_key, s_option)
|
create o.make (s_id, s_location, s_status)
|
||||||
|
|
||||||
if attached {JSON_ARRAY} j.item (items_key) as l_val then
|
if attached {JSON_ARRAY} j.item (items_key) as l_val then
|
||||||
l_array := l_val.array_representation
|
l_array := l_val.array_representation
|
||||||
@@ -59,12 +59,11 @@ feature -- Conversion
|
|||||||
else
|
else
|
||||||
q := 0
|
q := 0
|
||||||
end
|
end
|
||||||
|
if
|
||||||
s_name ?= json.object (jv.item (id_key), Void)
|
attached {STRING_32} json.object (jv.item (name_key), Void) as s_name and then
|
||||||
s_key ?= json.object (jv.item (location_key), Void)
|
attached {STRING_32} json.object (jv.item (size_key), Void) as s_key and then
|
||||||
s_option ?= json.object (jv.item (status_key), Void)
|
attached {STRING_32} json.object (jv.item (option_key), Void) as s_option
|
||||||
|
then
|
||||||
if s_name /= Void and s_key /= Void and s_option /= Void then
|
|
||||||
if is_valid_item_customization (s_name, s_key, s_option,q) then
|
if is_valid_item_customization (s_name, s_key, s_option,q) then
|
||||||
create i.make (s_name, s_key, s_option, q)
|
create i.make (s_name, s_key, s_option, q)
|
||||||
o.add_item (i)
|
o.add_item (i)
|
||||||
|
|||||||
Reference in New Issue
Block a user