Every line of 'sequelize tojson' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
228 toJSON(): any { 229 return { 230 '@class': 'Model', 231 data: this.toJS(), 232 }; 233 }
75 toJSON () { 76 return this._database 77 }
31 toJSON() { return _.extend(super.toJSON(...arguments), {query: this.get('query').toJSON()}); }
142 toJSON() { 143 return pack([ NodeType.FIELD, this.name, this.fields, this.fragments, this.calls ]) 144 }
153 function toJSON(value) { 154 return JSON.parse(value.toString()); 155 }
68 toJSON() { 69 return this.to(Array); 70 }
140 function valueToJson_(val) { 141 if (typeof val == 'object' && 'toJSON' in val) { 142 return val.toJSON(); 143 } 144 145 return val; 146 }
339 toJson() { 340 const json: any = { global: {}, layout: {} }; 341 Model._attributeDefinitions.toJson(json.global, this._attributes); 342 343 // save state of nodes 344 this.visitNodes((node) => { 345 node._fireEvent("save", undefined); 346 }); 347 348 json.borders = this._borders._toJson(); 349 json.layout = (this._root as RowNode)._toJson(); 350 return json; 351 }
9 function toJson(string) { 10 try { 11 return JSON.parse(string) 12 } catch (err) { 13 return string 14 } 15 }