Typescript objects serialization?

前端 未结 5 1390
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 06:40

Are there any means for JSON serialization/deserialization of Typescript objects so that they don\'t loose type information? Simple JSON.parse(JSON.stringify) has t

5条回答
  •  时光说笑
    2021-02-02 06:55

    I think the better way is to use this library. It makes it easier to serialize/deserialize object/json.

    https://www.npmjs.com/package/@peerlancers/json-serialization

提交回复
热议问题