Serializing composite type to json

It works for me:

julia> using JSON

julia> type Foo
           a::String
           b::Float64
       end

julia> JSON.json(Foo("xyz",1.2))
"{\"a\":\"xyz\",\"b\":1.2}"
1 Like