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

Can we? I'm missing #94 in official version.

```julia # 1.11 julia> :UUID in propertynames(Base) true # 1.10 julia> :UUID in propertynames(Base) false ``` Causes this test to fail: https://github.com/JuliaData/StructTypes.jl/blob/47c4691d9b5f72455566658a50d950bfb1522a75/test/runtests.jl#L263-L281

Make example in docstring return a `NamedTuple`. I was very confused and did not get my defaults to work until I noticed that `defaults(::Type{T}) where {T}` returns a NamedTuple.

I met a problem when trying to deserialize something with `JSON3.jl` with a default value that isn't in the type fields, and found these lines were defined under the wrong...

The goal here is to remove a lot of the boilerplate necessary for dealing with abstract types: ```Julia abstract type Vehicle end StructTypes.@auto Vehicle # Can be called *before* the...

Assuming i have a have piece of code which has an `StructTypes.AbstractType()` which already has it's `StructTypes.subtypes(::Type{Vehicle})` set but i now want to add a new subtype at run time....

Julia Version: 1.7.2. I see that `Real` is supposed to be `StructTypes.NumberType()`, but it can't actually deserialize: ```` julia> JSON3.read("456", Real) ERROR: ArgumentError: invalid JSON at byte position 1 while...

Suppose I have a package, in which I need to serialize some data that contain a `LongDNA{4}`, but do not want to expose the private (non-documented) memory layout of `LongDNA`....

@kshyatt ``` │┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:32 JSON3.:(var"#read#16")(false, pairs(NamedTuple()::NamedTuple{(), Tuple{}})::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, #self#::typeof(JSON3.read), str::String, _3::Type{TrinityApi._PipeCommunication.Data}) ││┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:40 = JSON3.read(JSON3.StructType(T::Type{TrinityApi._PipeCommunication.Data})::StructTypes.UnorderedStruct, buf::Base.CodeUnits{UInt8, String}, pos::Int64, len::Int64, b::UInt8, T::Type{TrinityApi._PipeCommunication.Data}) │││┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:566 JSON3.:(var"#read#50")(pairs(NamedTuple()::NamedTuple{(),...

Let's say I have a type hierarchy like this: abstract type Parent end mutable struct Child1