如何识别数据格式

我具有两种格式的相同类型的数据,但是我不确定它们是哪种格式。

数据格式1

{
  "ArraytionGroup": {
    "-xmlns:xsd": "http://www.w3.org/2001/XMLSchema","-xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance","LocationGroup": [
      {
        "Id": "6","Uuid": "894055b6-971ecc0c7224","Name": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","#text": "gtg"
        },"GroupId": { "-xmlns": "http://www.air-watch.com/servicemodel/resources" },"LocationGroupType": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","#text": "C"
        },"Country": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","#text": "s"
        },"Locale": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","#text": "kk"
        },"ParentLocationGroup": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","-uuid": "bdce439362","#text": "70"
        },"CreatedOn": {
          "-xmlns": "http://www.air-watch.com/servicemodel/resources","#text": "2/21/2018 3:08:55 PM"
        },}

数据格式2

<?xml version="1.0" encoding="utf-8" ?>
<SarttGroupSe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.air-watch.com/servicemodel/resources">
    <Page>0</Page>
    <PageSize>500</PageSize>
    <Total>61</Total>
    <LocationGroups>
        <Id xmlns="">655</Id>
        <Name>EDX</Name>
        <GroupId>DDDD</GroupId>
        <LocationGroupType>Container</LocationGroupType>
        <Country/>
        <Locale/>
        <Users>0</Users>
        <Admins>0</Admins>
        <Devices>0</Devices>
    </LocationGroups>
    <LocationGroups>
        <Id xmlns="">2</Id>
        <Name>EE</Name>
        <GroupId>New</GroupId>
        <LocationGroupType>C</LocationGroupType>
        <Country/>
        <Locale/>
        <Users>0</Users>
        <Admins>0</Admins>
        <Devices>0</Devices>
    </LocationGroups>
    <LocationGroups>
        <Id xmlns="">6</Id>
        <Name>RAC</Name>
        <LocationGroupType>Ciner</LocationGroupType>
        <Country/>
        <Locale/>
        <Users>0</Users>
        <Admins>0</Admins>
        <Devices>0</Devices>
    </LocationGroups>
</SarttGroupSe>

这些数据可以用什么格式帮助我?

iCMS 回答:如何识别数据格式

JSON对象用花括号{}包围。

JSON对象以键/值对的形式编写。

键必须是字符串,并且值必须是有效的JSON数据类型(字符串,数字,对象,数组,布尔值或null)。

示例{ "name":"John","age":30,"car":null } 那么你的第一个例子是一个json对象 在json validator

中验证您的第一个示例

Element对象表示XML文档中的元素。元素可以包含属性,其他元素或文本。如果元素包含文本,则文本将在文本节点中表示。

示例<year>2005</year>,那么第二个示例是xml对象

xml validator

中尝试第二个示例
本文链接:https://www.f2er.com/2164937.html

大家都在问