Ah, you can ignore my suggestion then. I was wondering if this was sending newline delimited JSON, which looks like this:
"{\"temperature_celsius\":3.9}\n"
i.e a newline only after the end of the whole JSON record. Scuh a stream can be read as text, with one complete JSON record per text line.
What you’ve got is not structured like that, and since it is flat (no nesting, and hopefully no field names containing a }) your approach is reading to the next closing } is the best approach.
I wasn’t suggesting anything for the sending (Arduino) side, just your receiving end.
Cheers,
Cameron