Julia building strings with no allocation

Solution for Julia building strings with no allocation
is Given Below:

I am trying to build a string up from small parts to send to a websocket.

#Example input from somewhere else
side = "left"
jumps = 3.482
string_of_id = "Caterpillar"
sz = 100
speller = "lower"

function stringConcat(side::String, px::Float64, ticker::String, sz::Int64, ordType::String)

    return string("""{"id":"""", string(abs(rand(Int64))), """","message":[{"Key1":""", string(rand(1:10000)), ""","Leftorright":"""", side, 
                    """","numjump":""", string(jumps), ""","jumpid":"""", string_of_id, """","sz":""", string(sz), ""","speller":"""", type_of_speller,

# 255.780 ns (9 allocations: 911 bytes)

Is there a way to preallocate to avoid allocations, or other tricks I can use? Right now I believe this many allocations is quite excessive.

The https://github.com/JuliaString/Strs.jl ecosystem contains quite a few packages that attempt to improve the performance of strings in Julia, including string literals with https://github.com/JuliaString/StrLiterals.jl.

For strings that will be reused frequently, you might also check out https://github.com/JuliaString/InternedStrings.jl