tinymce-util-JSON

发布于 2019-05-06 字数1606 浏览 904 评论 0

Examples

// JSON parse a string into an object
var obj = tinymce.util.JSON.parse(somestring);

// JSON serialize a object into an string
var str = tinymce.util.JSON.serialize(obj);

Methods

name summary defined by
parse() Unserializes/parses the specified JSON string into a object. tinymce.util.JSON
serialize() Serializes the specified object as a JSON string. tinymce.util.JSON

Methods

parse

parse(text:string):Object

Unserializes/parses the specified JSON string into a object.

Parameters
  • text (string) – JSON String to parse into a JavaScript object.
Return value
  • Object – Object from input JSON string or undefined if it failed.

serialize

serialize(obj:Object):string

Serializes the specified object as a JSON string.

Parameters
  • obj (Object) – Object to serialize as a JSON string.
Return value
  • string – JSON string serialized from input.

Can’t find what you’re looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.

您暂时不能评论!

管理员开启了需要登录才能够评论,你可以免费注册一个本站的账号。

还没有评论!

目前还没有任何评论,快来抢沙发吧!