File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 521521include (" errors.jl" )
522522
523523include (" entities/AbstractDFG.jl" )
524+ include (" entities/Bloblet.jl" )
524525
525526# Data Blob extensions
526527include (" DataBlobs/entities/BlobEntry.jl" )
Original file line number Diff line number Diff line change 1+ struct Bloblet
2+ label:: Symbol
3+ val:: String
4+ end
5+
6+ const Bloblets = LittleDict{Symbol, Bloblet}
7+
8+ StructUtils. structlike (:: Type{Bloblets} ) = false
9+ StructUtils. arraylike (:: Type{Bloblets} ) = false
10+ StructUtils. dictlike (:: Type{Bloblets} ) = false
11+ StructUtils. noarg (:: Type{Bloblets} ) = false
12+
13+ function StructUtils. lower (bloblet:: Bloblets )
14+ return map (collect (values (bloblet))) do (m)
15+ return (label = m. label, val = m. val)
16+ end
17+ end
18+
19+ function StructUtils. lift (:: Type{Bloblets} , json_vector:: Vector )
20+ return Bloblets (
21+ Symbol (x[" label" ]) => Bloblet (Symbol (x[" label" ]), x[" val" ]) for x in json_vector
22+ )
23+ end
You can’t perform that action at this time.
0 commit comments