zoukankan      html  css  js  c++  java
  • json

    JSON简介:http://www.json.org/json-zh.html

    JSON提供了json.js包:http://www.json.org/json.js

    JSON的规则: 对象是一个无序的“‘名称/值’对”集合。一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值’ 对”之间使用“,”(逗号)分隔。

    值(value)可以是双引号括起来的字符串(string)、数值(number)、truefalsenull、对象(object)或者数组(array)。这些结构可以嵌套。

    数组是值(value)的有序集合。一个数组以“[”(左中括号)开始,“]”(右中括号)结束。值之间使用“,”(逗号)分隔。

    如:

         var user =    

        {    

            "username":"andy",   

            "age":20,   

            "info": { "tel""123456""cellphone""98765"},   

            "address":   

                [   

                    {"city":"beijing","postcode":"222333"},   

                    {"city":"newyork","postcode":"555666"}   

                ]   

        }  

     

       alert(user.username);   

     

        alert(user.age);   

        alert(user.info.cellphone);   

        alert(user.address[0].city);   

        alert(user.address[0].postcode);   

           

        user.username = "Tom";   

        alert(user.username);   

  • 相关阅读:
    EBS 获取用户密码
    Using Create directory & UTL_FILE in Oracle
    Loops with PL/SQL
    Create trigger
    Oracle DB解锁和 rerun FA depreciation
    oracle中数组的运用
    FNDLOAD使用大全
    不安装Oracle客户端,透过PL/SQL Developer连接Server DB
    R12组织屏蔽
    Oracle DB Link创建
  • 原文地址:https://www.cnblogs.com/linzheng/p/1876562.html
Copyright © 2011-2022 走看看