libmir/mir-ion

deserializeJson does not handle associative array arrays properly

ellie-idb opened this issue · 1 comments

Reported by @adamdruppe on the D discord, this fails:

import mir.ion.deser.json : deserializeJson;
string d = `[{"test": 1}, {"second": 2}]`;
writeln(d.deserializeJson!(int[string][])); // prints out [[], []]

Upon further investigation, I found that using deserializeDynamicJson works here:

writeln(d.deserializeDynamicJson!(int[string][])); // prints out [["test": 1], ["second": 2]]

Is this intended behavior? I'm assuming that this is a bug -- please advise @9il.

9il commented

Fixed in the new release.