@@ -127,24 +127,18 @@ end
127127
128128const Blobentries = OrderedDict{Symbol, Blobentry}
129129
130- # TODO write Blobentries as array
131- # StructUtils.dictlike(::Type{Blobentries}) = false
132- # StructUtils.structlike(::Type{Blobentries}) = false
133- # StructUtils.arraylike(::Type{Blobentries}) = false
130+ function StructUtils. lower (entries:: Blobentries )
131+ return map (collect (values (entries))) do (entry)
132+ return StructUtils. lower (entry)
133+ end
134+ end
134135
135- # function StructUtils.lower(entries::Blobentries)
136- # return map(collect(values(entries))) do (entry)
137- # return StructUtils.lower(entry)
138- # end
139- # end
136+ function StructUtils. makedict (s:: StructUtils.StructStyle , T:: Type{Blobentries} , json_vector)
137+ entries = T ()
138+ foreach (json_vector) do obj
139+ entry, _ = StructUtils. make (s, Blobentry, obj)
140+ return push! (entries, Symbol (obj. label[]) => entry)
141+ end
142+ return entries, nothing
143+ end
140144
141- # function StructUtils.lift(s::StructUtils.StructStyle, T::Type{Blobentries}, json_vector)
142- # entries = T()
143- # @warn "lifting" s T json_vector
144- # foreach(json_vector) do obj
145- # global gobj = obj
146- # return push!(entries, Symbol(obj.label) => StructUtils.make(s, Blobentry, obj))
147- # end
148- # @warn "lifted Blobentries" entries
149- # return entries, nothing
150- # end
0 commit comments