我曾尝试查看他们文档的Mozilla JSON stringify页面以及 SO 和 Google 上的此处,但没有找到任何解释。我已经使用了JSON.stringify很多时间,但从未遇到过这个结果。
我有一组 JSON 对象:
[
    {
        "param_2": "Description 1",
        "param_0": "Name 1",
        "param_1": "VERSION 1"
    },
    {
        "param_2": "Description 2",
        "param_0": "Name 2",
        "param_1": "VERSION 2"
    },
    {
        "param_2": "Description 3",
        "param_0": "Name 3",
        "param_1": "VERSION 3"
    }
]
它附加到我的$scope. 为了将POST它们作为一个参数,我使用了该JSON.stringify()方法并收到以下信息:
   [
        {
            "param_2": "Description 1",
            "param_0": "Name 1",
            "param_1": "VERSION 1",
            "$$hashKey": "005"
        },
        {
            "param_2": "Description 2",
            "param_0": "Name 2",
            "param_1": "VERSION 2",
            "$$hashKey": "006"
        },
        {
            "param_2": "Description 3",
            "param_0": "Name 3",
            "param_1": "VERSION 3",
            "$$hashKey": "007"
        }
    ]
我只是好奇$$hashkey属性到底是什么,因为我期望从stringify方法中得到与以下更相似的东西(即,没有$$hashkey):
[
    {
        "1":{
            "param_2": "Description 1",
            "param_0": "Name 1",
            "param_1": "VERSION 1"
        },
         "2":{
            "param_2": "Description 2",
            "param_0": "Name 2",
            "param_1": "VERSION 2"
        },
         "3":{
            "param_2": "Description 3",
            "param_0": "Name 3",
            "param_1": "VERSION 3"
        }
    }
]
我不确定这是否是一个因素,但我正在使用以下内容:
- Angularjs 1.1.5,
 - jQuery 1.8.2
 - Spring 3.0.4
 
我也在服务器端使用 Spring security 3.0.7。
它没有给我造成任何问题,但我想知道原因和原因 $$hashkey