StructTypes.jl icon indicating copy to clipboard operation
StructTypes.jl copied to clipboard

Abstract definitions and convenience methods for describing, processing, and constructing Julia objects

Results 21 StructTypes.jl issues
Sort by recently updated
recently updated
newest added

Currently `ArrayType()` iterates element-wise over an array type using the default `iterate(x::T)` method when serializing. This has the effect of flattening higher dimensional arrays into vectors. Matrices, for instance, become...

Would it be possible to define default `StructType` for `NamedTuple`s as `StructTypes.OrderedStruct()`? Or are there any obvious conflicts I'm not seeing? It seems like the problems that might arise because...

Perhaps I'm misunderstanding the intention of `CustomStruct` but I believe it is missing a `constructfrom` method. Even after defining the required methods I get, e.g. ```julia ◖◗ ST.constructfrom(Dict{String,Any}, c) ERROR:...

something along the lines of the following would be nice ```julia StructTypes.constructfrom!(::StructTypes.DictType, target::AbstractDict, source) = merge!(target, source) StructTypes.constructfrom!(::StructTypes.ArrayType, target, source) = append!(target, source) ```

Right now I have some project where I build a very small database by using a Dict that maps singleton types to arbitrary types. for example: ```julia abstract type BaseType...

It seems like this package has some overlap with https://github.com/JuliaObjects/ConstructionBase.jl . I'm opening this issue for the sake of cross-referencing.

I started out thinking this only happened for nested types, but as I set out to make a MWE, I got even more confused. Here it is ```julia using JSON3,...

There is `fieldprefix` function, which transform flat structure into nested objects. Is it possible in some way to have an opposite operation? As an example, consider following article structure written...

I think it would be useful to have a standard interface for programmatic structure. Here I give the basic structure, but StructTypes related features can be added to the functions....

`typeof(Int) == DataType` As does basically all other types of types, with the exclusion of unions and unionalls. While we can have multiple things using same name because of shadowing,...