fixed a json format problem when some very complex function is used in QS