Closed logankilpatrick closed 4 years ago
I tried this:
attachment = "{\"attachments\" : [\"fallback\", \"Required plain-text summary of the attachment.\"]}"
but it still did not work.
julia> using JSON
julia> x = Dict("attachments" => [Dict("fallback" => "Required plain-text summary of the attachment", "color" => "#36a64f")])
Dict{String,Array{Dict{String,String},1}} with 1 entry:
"attachments" => Dict{String,String}[Dict("color"=>"#36a64f","fallback"=>"Required plain-text summary of the attachment")]
julia> JSON.json(x)
"{\"attachments\":[{\"color\":\"#36a64f\",\"fallback\":\"Required plain-text summary of the attachment\"}]}"
THANK YOU. That helped a lot
Hey all, I have the following JSON message that I need as a string so I can send it to a Restful API.
I cannot figure out the right way to convert this to a string so I can parse it and then pass it to the API.