Skip to content

Commit bc30b9e

Browse files
author
Jonas Wilfert
committed
fixed nested unions types
1 parent 0c95ebb commit bc30b9e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/json.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ end
2525

2626
lower(o::T) where {T<:APIModel} = JSONWrapper(o)
2727
function lower(o::T) where {T<:UnionAPIModel}
28-
if typeof(o.value) <: APIModel
28+
if typeof(o.value) <: UnionAPIModel
29+
return lower(o.value)
30+
elseif typeof(o.value) <: APIModel
2931
return JSONWrapper(o.value)
3032
elseif typeof(o.value) <: Union{String,Real}
3133
return o.value

0 commit comments

Comments
 (0)