jquery json to string?

后端 未结 5 1083
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 13:58

Instead of going from a json string and using $.parseJSON, I need to take my object and store it in a variable as string representing json.

(A library I\'m dealing w

5条回答
  •  隐瞒了意图╮
    2020-11-27 14:45

    You could parse the JSON to an object, then create your malformed JSON from the ajavscript object. This may not be the best performance-wise, tho.

    Otherwise, if you only need to make very small changes to the string, just treat it as a string, and mangle it using standard javascript.

提交回复
热议问题