zoukankan      html  css  js  c++  java
  • JSON

    Mou icon

    JSON(JavaScript Object Notation)

    JSON:一种轻量级的数据交换格式。

    特点:易于人阅读和编写。同时也易于机器解析和生成。 它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集。 JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。 这些特性使JSON成为理想的数据交换语言。

    JSON建构于两种结构


    “名称/值”对的集合(A collection of name/value pairs)。不同的语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组 (associative array)。
    值的有序列表(An ordered list of values)。在大部分语言中,它被理解为数组(array)。
    这些都是常见的数据结构。事实上大部分现代计算机语言都以某种形式支持它们。这使得一种数据格式在同样基于这些结构的编程语言之间交换成为可能。


    json文件实例

    {
        "images" : [
                    {
                    "orientation" : "portrait",
                    "idiom" : "iphone",
                    "extent" : "full-screen",
                    "minimum-system-version" : "7.0",
                    "scale" : "2x"
                    },
                    {
                    "orientation" : "portrait",
                    "idiom" : "iphone",
                    "subtype" : "retina4",
                    "extent" : "full-screen",
                    "minimum-system-version" : "7.0",
                    "scale" : "2x"
                    }
                    ],
        "info" : {
            "version" : 1,
            "author" : "xcode"
        }
    }
    

    JSON解析:

    JSON解析代码github托管地址

    https://github.com/liukunpengiOS/JSON

    git clone 地址

    https://github.com/liukunpengiOS/json.git

  • 相关阅读:
    Django shortcut functions
    Android 度量单位
    WPF 资源
    WPF Template
    python 常用库
    python 元类
    android中控制ListView宽度和高度
    layout可以显示,程序调用就出错
    请问在pulltorefreshGridView中的图片设置了大小之后怎么就不显示了呢
    Activity表单传值问题
  • 原文地址:https://www.cnblogs.com/liukunpeng/p/3736691.html
Copyright © 2011-2022 走看看