[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:
Olivier Ligot
2012-08-02 14:06:48 +02:00
parent 6fa0d56465
commit aedf8ec1cd

View File

@@ -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)