JSON(JavaScript 对象表示法)是一种轻量级的数据交换格式,广泛用于 Web 应用和 API 通信。以下是一些 JSON 数据示例,展示了不同的数据结构。

  1. 单个对象:
{
  'name': 'John Doe',
  'age': 30,
  'email': 'johndoe@example.com'
}
  1. 数组对象:
[
  {
    'name': 'John Doe',
    'age': 30,
    'email': 'johndoe@example.com'
  },
  {
    'name': 'Jane Smith',
    'age': 25,
    'email': 'janesmith@example.com'
  }
]
  1. 嵌套对象:
{
  'name': 'John Doe',
  'age': 30,
  'email': 'johndoe@example.com',
  'address': {
    'street': '123 Main St',
    'city': 'New York',
    'state': 'NY'
  }
}

这些示例展示了 JSON 数据的基本结构,你可以根据这些示例创建自己的 JSON 数据,并根据你的需求进行调整。

JSON 数据示例:对象、数组和嵌套结构

原文地址: http://www.cveoy.top/t/topic/RNM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录