Second item in array not gets assigned from struct object, ArduinoJson
ArduinoJson stores strings differently depending on their types:


for const char*, it saves a pointer;
for other types (char*, String...) it copies the string.


Because ArduinoJson stores the copy of the string in the JsonDocument, you must increase the capacity of the JsonDocument.

In your case, you pass Peripheral::current_state, which is a String, so ArduinoJson makes a copy in the JsonDocument. Increasing capacity by a few bytes should solve the problem.

Note that the ArduinoJson Assistant also computes the number of bytes required to store all the strings. Look for "Additional bytes for strings duplication" on the right panel.