You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's not very much documentation around the custom serialization API and it took a bit of hunting around in the code to figure out how to make something work.
using JSON
struct MySerialization <:JSON.CommonSerializationend# Define specific method for Missing
JSON.show_json(io::JSON.StructuralContext, s::MySerialization, x::Missing) =
JSON.show_json(io, s, "~missing~")
myjson(x) =sprint(JSON.show_json, MySerialization(), x)
println(myjson(Dict("foo"=>missing)))
# {"foo":"~missing~"}
The text was updated successfully, but these errors were encountered:
There's not very much documentation around the custom serialization API and it took a bit of hunting around in the code to figure out how to make something work.
The text was updated successfully, but these errors were encountered: