mirror of https://github.com/Hax-io/jstruct
parent
d8b59673c3
commit
0faf5a089b
|
@ -151,8 +151,17 @@ public RecordType fromJSON(RecordType)(JSONValue jsonIn)
|
|||
{
|
||||
mixin("record."~structNames[cnt])~= jsonVal.boolean();
|
||||
}
|
||||
else static if(__traits(isSame, ForeachType!(structTypes[cnt]), float))
|
||||
{
|
||||
mixin("record."~structNames[cnt])~= cast(float)jsonVal.floating();
|
||||
}
|
||||
else static if(__traits(isSame, ForeachType!(structTypes[cnt]), double))
|
||||
{
|
||||
mixin("record."~structNames[cnt])~= cast(double)jsonVal.floating();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue