How do I combine text inputs in JSON?

Solution 1:

/tellraw can directly use an array:

/tellraw @s [{"text":"abc"},{"text":"123"}]

ExpertCoder14 showed that it's also possible to do that in strings in NBT, which I believed to be impossible before.

Alternatively you can also use "extra", in which you can then use arbitrarily many components again:

/setblock ~ ~ ~ oak_sign{Text1:"{\"text\":\"abc\",\"extra\":[{\"text\":\"123\"},{\"text\":\"lalala\"}]}"}

Solution 2:

Fabian Röling is correct that you can use an array in areas where your raw JSON text is inputted as a command input:

/tellraw @s [{"text":"abc"},{"text":"123"}]

However, when you are inputting raw JSON text into a string tag in NBT data, you can still use an array. Make sure to put the , separator after the } but before the ].

/data merge block ~ ~ ~ {CustomName:"[{\"text\":\"Custom Name of Chest\"}, {\"text\":\"Some More Text\"}]"}

Note that although it looks different, it is technically the same as the second example from Fabian Röling below, based on the way it behaves when adding other components to change font style and colour. This is evident because each section takes the formatting of the first unless provided with override instructions.

If you are playing on Minecraft 1.14+, why not try enclosing the whole data tag string using 's instead of "s? That way, you don't need to escape each double quote with a \.
Like this:

/data merge block ~ ~ ~ {CustomName:'[{"text":"Custom Name of Chest"}, {"text":"Some More Text"}]'}