flymis/WebRoot/dojojs/src/json.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.json");
dojo.require("dojo.lang.func");
dojo.require("dojo.string.extras");
dojo.require("dojo.AdapterRegistry");
dojo.json = {
// jsonRegistry: AdapterRegistry a registry of type-based serializers
jsonRegistry: new dojo.AdapterRegistry(),
register: function( /*String*/ name,
/*function*/ check,
/*function*/ wrap,
/*optional, boolean*/ override){
// summary:
// Register a JSON serialization function. JSON serialization
// functions should take one argument and return an object
// suitable for JSON serialization:
// - string
// - number
// - boolean
// - undefined
// - object
// - null
// - Array-like (length property that is a number)
// - Objects with a "json" method will have this method called
// - Any other object will be used as {key:value, ...} pairs
//
// If override is given, it is used as the highest priority JSON
// serialization, otherwise it will be used as the lowest.
// name:
// a descriptive type for this serializer
// check:
// a unary function that will be passed an object to determine
// whether or not wrap will be used to serialize the object
// wrap:
// the serialization function
// override:
// optional, determines if the this serialization function will be
// given priority in the test order
dojo.json.jsonRegistry.register(name, check, wrap, override);
},
evalJson: function(/*String*/ json){
// summary:
// evaluates the passed string-form of a JSON object
// json:
// a string literal of a JSON item, for instance:
// '{ "foo": [ "bar", 1, { "baz": "thud" } ] }'
// return:
后面还有 96 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。