We have written lots of lines to tell the model that we need json.
I can not emphasize more. We first tell the model that the output needs to be json. Then we emphasize two more times that we need only json. Nothing else.
It indeed returns json most of the times but inside the json items, it is all \n.