Quick 'from the hip' idea: Try removing the carriage returns from the command, i.e. make the whole thing one line when you send it. It may be considering the newline as the end of input.
{"condition": "SNAME = Lights","objectList": [{"objnam": "ALL","keys": ["OBJNAM", "OBJTYP", "PARENT", "ACT"...