zoukankan      html  css  js  c++  java
  • JSON标准格式

    标准JSON的合法符号:{(左大括号)  }(右大括号)  "(双引号)  :(冒号)  ,(逗号)  [(左中括号)  ](右中括号)

    JSON字符串:特殊字符可在字符前面加 或使用 u 加 4位16进制数来处理

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {"name":"jobs"}  

    JSON布尔:必须小写的true和false

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {"bool":true}  

    JSON空:必须小写的null

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {"object":null}  

    JSON数值:不能使用8/16进制

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {"num":60}  
    2. {"num":-60}  
    3. {"num":6.6666}  
    4. {"num":1e+6}<!-- 1乘10的6次方,e不区分大小写 -->  
    5. {"num":1e-6}<!-- 1乘10的负6次方,e不区分大小写 -->  

    JSON对象

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {  
    2.     "starcraft": {  
    3.         "INC": "Blizzard",  
    4.         "price": 60  
    5.     }  
    6. }  

    JSON数组

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {  
    2.     "person": [  
    3.         "jobs",  
    4.         60  
    5.     ]  
    6. }  

    JSON对象数组

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. {  
    2.     "array": [  
    3.         {  
    4.             "name": "jobs"  
    5.         },  
    6.         {  
    7.             "name": "bill",  
    8.             "age": 60  
    9.         },  
    10.         {  
    11.             "product": "war3",  
    12.             "type": "game",  
    13.             "popular": true,  
    14.             "price": 60  
    15.         }  
    16.     ]  
    17. }  

     

  • 相关阅读:
    数据库连接池-配置 wallfilter问题解决-UncategorizedSQLException
    maven统一配置
    maven依赖排除
    list排序
    spring boot日志配置
    HDU 5281 Senior's Gun (贪心)
    Saving HDU (贪心)
    切割木板 (贪心)
    查找最少标记点 (贪心)
    字典序最小问题 (贪心)
  • 原文地址:https://www.cnblogs.com/jiangzhaowei/p/6837756.html
Copyright © 2011-2022 走看看