[FIX] Convertion from DS_HASH_TABLE keys to JSON
This is useful when the type of the key is something else than a STRING and we have a JSON converter for this type.
This commit is contained in:
@@ -64,7 +64,11 @@ feature -- Conversion
|
|||||||
until
|
until
|
||||||
c.after
|
c.after
|
||||||
loop
|
loop
|
||||||
|
if attached {JSON_STRING} json.value (c.key) as l_key then
|
||||||
|
js := l_key
|
||||||
|
else
|
||||||
create js.make_json (c.key.out)
|
create js.make_json (c.key.out)
|
||||||
|
end
|
||||||
jv := json.value (c.item)
|
jv := json.value (c.item)
|
||||||
if jv /= Void then
|
if jv /= Void then
|
||||||
Result.put (jv, js)
|
Result.put (jv, js)
|
||||||
|
|||||||
Reference in New Issue
Block a user