[JSON].typeOf( keyPath )
语法:[JSON].typeOf( keyPath )
返回:[String | Number | Boolean | Json | Array | Function | 空字符]
说明:获取指定键名值的类型
示例:
Set jsonObj = toJson("{a: 'test', b: 1, c:true, d:[1,2,3,4], e:{a1:2}}")
Response.Write "a的类型:"& jsonObj.typeOf("a") & "<br/>"
Response.Write "b的类型:"& jsonObj.typeOf("b") & "<br/>"
Response.Write "c的类型:"& jsonObj.typeOf("c") & "<br/>"
Response.Write "d的类型:"& jsonObj.typeOf("d") & "<br/>"
Response.Write "e的类型:"& jsonObj.typeOf("e") & "<br/>"
注意:
返回空字符时,可能是未知类型,或者指定键名不存在!
[JSON].typeOf( keyPath )的更多相关文章
- [JSON].valueOf( keyPath )
语法:[JSON].valueOf( keyPath ) 返回:[任意类型 | null] 说明:获取键名路径原值,它保留原始值的类型 示例: b = sysFile.binary("tes ...
- [JSON].getObj( keyPath )
语法:[JSON].getObj( keyPath ) 返回:[JSON] 说明:返回指定键名路径的JSON对象,指定键名路径不存在时返回空的toJson对象(强烈建议使用 [JSON].exists ...
- [JSON].value( keyPath )
语法:[JSON].value( keyPath ) 返回:[String | Null] 说明:获取指定键名路径值的字符串格式 示例: Set jsonObj = toJson("{bod ...
- [JSON].exists( keyPath )
语法:[JSON].exists( keyPath ) 返回:[True | False] 说明:检测指定键名路径是否存在 示例: Set jsonObj = toJson("{div:{' ...
- [JSON].remove( keyPath )
语法:[JSON].remove( keyPath ) 返回:无 说明:移除指定路径的键 示例: Set jsonObj = toJson("{div:{'#text-1': 'is tex ...
- [JSON].set(keyPath, value)
语法:[JSON].set( keyPath, value ) 返回:[True | False] 说明:设置键值 参数: keyPath [keyPath 必需] 键名路径字符串 value ...
- 【JSON类】使用说明
理解键名路径 键名路径(keyPath)用于定位json的键,比如:{book: {title:”中国人”} },键名路径 book.title 表定位到book下的title键. 对于值是数组类型的 ...
- vs里根据json快速创建对应类的方法
有时候,我们在调用别人接口的时候,服务端返回了一个json格式的字符串,我们要获取json里面的数据的话一般有两种方式: 1.通过正则 2.反序列化成一个对象 第一种方式这里不再多说,主要说一下第二种 ...
- 【C#公共帮助类】JsonHelper 操作帮助类, 以后再也不用满地找Json了,拿来直接用
四个主要操作类:JsonConverter .JsonHelper .JsonSplit .AjaxResult 一.JsonConverter: 自定义查询对象转换动态类.object动态类转换j ...
随机推荐
- spring使用Redis自定义前缀后缀名(去掉SimpleKey []+自定义)
spring中自动加上 SimpleKey [] 解决方案 一.自定义后缀名 1.定义类实现KeyGenerator接口 MyKeyGenerator package com.wbg.springRe ...
- jQuery Cookie操作cookie
jQuery cookie下载地址:http://plugins.jquery.com/cookie/ 使用jquery.cookie.js依赖于jquery 基本用法: 1. 创建cookie ...
- Race UVA - 12034(dp+打表)
Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded ...
- Network Security Threats
Network Security Combination of low-cost powerful computing and high-performance networks is a two-e ...
- Nginx自定义模块编写:根据post参数路由到不同服务器
Nginx自定义模块编写:根据post参数路由到不同服务器 2014-05-05 15:27 blogread IT技术博客 字号:T | T Nginx可以轻松实现根据不同的url 或者 get参数 ...
- 防sql注入攻击
这两天看了个防sql注入,觉得有必要总结一下: 首先需要做一些php的安全配置: 1 在php.ini 中把display_errors改成OFF display_errors = OFF 或在php ...
- [译]React如何区别class和function
原文 How Does React Tell a Class from a Function? 译注: 一分钟概览-- React最后采用了在React.Component上加入isReactComp ...
- JAVA数据类型能串门不?
JAVA这几种数据类型,能否串门?入了人家门,就得按人家规矩来,入乡随俗哦,难免发生有自觉的 还有不情愿被动的. 自动类型转换 自动类型转换:容量小的数据类型可以自动转换为容量大的数据类型.在图中,黑 ...
- mysqld_safe之三言两语
today,one buddy in IMG wechat group 2 asked "why i've installed the MySQL 5.7 on linux serv ...
- 04JavaScript语法
1.JavaScript 语法 JavaScript 是一个脚本语言. 它是一个轻量级,但功能强大的编程语言 2.JavaScript 字面量 在编程语言中,一般固定值称为字面量,如 3.14. 数字 ...