Deep Cloning an object on the client side (GWT + Javascript) ?

后端 未结 2 1012
春和景丽
春和景丽 2021-01-21 16:30

I know of a Deep Cloning library in Java, which I use in my server side code.

However, right now I need to \"deep clone\" an object on the client side code. I believe t

2条回答
  •  北海茫月
    2021-01-21 16:56

    Another option that I use is converting the Java object to JSON, and then converting back to a Java object.

    Where this is not the cleanest way, there is answer to a different question that indicates that this is a faster way than the traditional clone() method (which is not supported in GWT).

提交回复
热议问题