@@ -247,6 +247,11 @@ function interped_data(rawdata, rawoffsets, ::Type{Bool}, ::Type{Nojagg})
247247 # specialized case to get Vector{Bool} instead of BitVector
248248 return map (ntoh,reinterpret (Bool, rawdata))
249249end
250+ function interped_data (rawdata, rawoffsets, :: Type{String} , :: Type{Nojagg} )
251+ rawoffsets .= rawoffsets .+ 1
252+ vov_bytes = VectorOfVectors (rawdata, rawoffsets)
253+ return [readtype (IOBuffer (v), String) for v in vov_bytes]
254+ end
250255function interped_data (rawdata, rawoffsets, :: Type{T} , :: Type{J} ) where {T, J<: JaggType }
251256 # there are two possibility, one is the leaf is just normal leaf but the title has "[...]" in it
252257 # magic offsets, seems to be common for a lot of types, see auto.py in uproot3
@@ -481,12 +486,16 @@ function leaf_jaggtype(leaf, _jaggtype)
481486 _fTitle = replace (leaf. fTitle, " [$(leafLen) ]" => " " )
482487 # looking for more `[var]`
483488 m = match (r" \[\D +\] " , _fTitle)
484- _type = FixLenVector{Int (leafLen), _type}
489+ _vtype = FixLenVector{Int (leafLen), _type}
485490 if isnothing (m)
486- return _type, Nojagg
491+ if leaf isa TLeafC
492+ return String, Nojagg
493+ else
494+ return _vtype, Nojagg
495+ end
487496 else
488497 # FIXME this only handles [var][fix] case
489- return Vector{_type }, Nooffsetjagg
498+ return Vector{_vtype }, Nooffsetjagg
490499 end
491500 end
492501 _type = _jaggtype === Nojagg ? _type : Vector{_type}
0 commit comments