Skip to main content
edited tags
Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
edited tags
Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
added 1509 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

Current:

{
  "associated_users": [
    {
      "user_id": 242897,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 9272,
      "on_site": {
        "name": "Stack Overflow",
        "logo_url": "http://sstatic.net/so/img/logo.png",
        "api_endpoint": "http://api.stackoverflow.com",
        "site_url": "http://stackoverflow.com",
        "description": "Q&A for programmers",
        "icon_url": "http://sstatic.net/so/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 38306,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 111,
      "on_site": {
        "name": "Server Fault",
        "logo_url": "http://sstatic.net/sf/img/logo.png",
        "api_endpoint": "http://api.serverfault.com",
        "site_url": "http://serverfault.com",
        "description": "Q&A for system administrators and IT professionals",
        "icon_url": "http://sstatic.net/sf/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 31747,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 100,
      "on_site": {
        "name": "Super User",
        "logo_url": "http://sstatic.net/su/img/logo.png",
        "api_endpoint": "http://api.superuser.com",
        "site_url": "http://superuser.com",
        "description": "Q&A for computer enthusiasts and power users",
        "icon_url": "http://sstatic.net/su/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 144906,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 1252,
      "on_site": {
        "name": "Stack Overflow Meta",
        "logo_url": "http://sstatic.net/mso/img/logo.png",
        "api_endpoint": "http://api.meta.stackoverflow.com",
        "site_url": "http://meta.stackoverflow.com",
        "description": "Q&A about Stack Overflow, Server Fault, and Super User",
        "icon_url": "http://sstatic.net/mso/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    // stackapss  missing
    {
      "user_id": 14,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 3123,
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    }
  ]
}

Proposed: (i would be happy to meet you half way and tolerate the nested on_site node if only we can get the site id on the root as shown)

{
  "associated_users": [
    {
      "user_id": 242897,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 9272,
      "site_name": "Stack Overflow",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 38306,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 111,
      "site_name": "Server Fault",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 31747,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 100,
      "site_name": "Super User",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 144906,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 1252,
      "site_name": "Stack Overflow Meta",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 14,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 3123,
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    }
  ]
}
{
  "associated_users": [
    {
      "user_id": 242897,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 9272,
      "on_site": {
        "name": "Stack Overflow",
        "logo_url": "http://sstatic.net/so/img/logo.png",
        "api_endpoint": "http://api.stackoverflow.com",
        "site_url": "http://stackoverflow.com",
        "description": "Q&A for programmers",
        "icon_url": "http://sstatic.net/so/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 38306,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 111,
      "on_site": {
        "name": "Server Fault",
        "logo_url": "http://sstatic.net/sf/img/logo.png",
        "api_endpoint": "http://api.serverfault.com",
        "site_url": "http://serverfault.com",
        "description": "Q&A for system administrators and IT professionals",
        "icon_url": "http://sstatic.net/sf/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 31747,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 100,
      "on_site": {
        "name": "Super User",
        "logo_url": "http://sstatic.net/su/img/logo.png",
        "api_endpoint": "http://api.superuser.com",
        "site_url": "http://superuser.com",
        "description": "Q&A for computer enthusiasts and power users",
        "icon_url": "http://sstatic.net/su/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 144906,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 1252,
      "on_site": {
        "name": "Stack Overflow Meta",
        "logo_url": "http://sstatic.net/mso/img/logo.png",
        "api_endpoint": "http://api.meta.stackoverflow.com",
        "site_url": "http://meta.stackoverflow.com",
        "description": "Q&A about Stack Overflow, Server Fault, and Super User",
        "icon_url": "http://sstatic.net/mso/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 14,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 3123,
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    }
  ]
}

Current:

{
  "associated_users": [
    {
      "user_id": 242897,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 9272,
      "on_site": {
        "name": "Stack Overflow",
        "logo_url": "http://sstatic.net/so/img/logo.png",
        "api_endpoint": "http://api.stackoverflow.com",
        "site_url": "http://stackoverflow.com",
        "description": "Q&A for programmers",
        "icon_url": "http://sstatic.net/so/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 38306,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 111,
      "on_site": {
        "name": "Server Fault",
        "logo_url": "http://sstatic.net/sf/img/logo.png",
        "api_endpoint": "http://api.serverfault.com",
        "site_url": "http://serverfault.com",
        "description": "Q&A for system administrators and IT professionals",
        "icon_url": "http://sstatic.net/sf/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 31747,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 100,
      "on_site": {
        "name": "Super User",
        "logo_url": "http://sstatic.net/su/img/logo.png",
        "api_endpoint": "http://api.superuser.com",
        "site_url": "http://superuser.com",
        "description": "Q&A for computer enthusiasts and power users",
        "icon_url": "http://sstatic.net/su/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 144906,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 1252,
      "on_site": {
        "name": "Stack Overflow Meta",
        "logo_url": "http://sstatic.net/mso/img/logo.png",
        "api_endpoint": "http://api.meta.stackoverflow.com",
        "site_url": "http://meta.stackoverflow.com",
        "description": "Q&A about Stack Overflow, Server Fault, and Super User",
        "icon_url": "http://sstatic.net/mso/apple-touch-icon.png"
      },
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    // stackapss  missing
    {
      "user_id": 14,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 3123,
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    }
  ]
}

Proposed: (i would be happy to meet you half way and tolerate the nested on_site node if only we can get the site id on the root as shown)

{
  "associated_users": [
    {
      "user_id": 242897,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 9272,
      "site_name": "Stack Overflow",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 38306,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 111,
      "site_name": "Server Fault",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 31747,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 100,
      "site_name": "Super User",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 144906,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 1252,
      "site_name": "Stack Overflow Meta",
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    },
    {
      "user_id": 14,
      "user_type": "registered",
      "display_name": "code poet",
      "reputation": 3123,
      "email_hash": "df4a7fbd8a054fd6193ca0ee62952f1f"
    }
  ]
}
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading