Turning JSON strings into objects with methods

前端 未结 8 501
抹茶落季
抹茶落季 2020-12-08 14:30

I have an app that allows users to generate objects, and store them (in a MySQL table, as strings) for later use. The object could be :

function Obj() {
             


        
8条回答
  •  悲哀的现实
    2020-12-08 15:21

    You would have to write your own stringify method that stores functions as properties by converting them to strings using the toString method.

提交回复
热议问题