Hide certain values in output from JSON.stringify()

后端 未结 13 1566
有刺的猬
有刺的猬 2020-12-02 15:13

Is it possible to exclude certain fields from being included in the json string?

Here is some pseudo code

var x = {
    x:0,
    y:0,
    divID:\"xyz         


        
13条回答
  •  不思量自难忘°
    2020-12-02 15:30

    I've used toJSON solution based on a small library that i've written in order to get Typing at Runtime https://stackoverflow.com/a/55917109/4236151

提交回复
热议问题