Thanks, guys @StefanKarpinski & @Palli for a quick response and recommendations. I found a mistake with constructor obj[:w] ./ sum(obj[:w])
where GMMmodel expects exactly 1.0 and the SHA256 signature did not fit. Sorry I also applied round in the constructor of a struct.
However, I have a new problem with valid writing a vector or value using serialization (method JSON3.write
). I would expect to write the vector as a valid JSON format (and a simple format for other parsers). For e.g vector Foo([2.3, 4.5, NaN], NaN)
as
{ “a”: [2.3, 4.5, null ], “b”: null} #This is expected
As I mentioned in the link. Some suggestions for (de)serialize?
I tried to choose a number as a string.
JSON3.StructType(::Type{<:Float64}) = JSON3.StringType()
but I’ll just get only this {"a": ["2.3", "4.5", "null" ], "b": "null"}
duplicate quotes