当前位置: 首页 > news >正文

做视频能赚钱的网站中央下令全国各地核酸检测

做视频能赚钱的网站,中央下令全国各地核酸检测,订阅号如何做微网站,网店推广策划前言 本文简单介绍toml;并且和json转化做对比,以及我对toml设计的理解。 参考: TOML: 简体中文 v1.0.0 json和toml转化工具 在线JSON转toml-toml转JSON - bejson在线工具 正文 数组 说白了,就是一个变量名,有多个…

前言

本文简单介绍toml;并且和json转化做对比,以及我对toml设计的理解。

参考:

TOML: 简体中文 v1.0.0

json和toml转化工具

在线JSON转toml-toml转JSON - bejson在线工具

正文

数组

说白了,就是一个变量名,有多个变量的值。值的类型,可以相同,可以不同。

integers = [ 1, 2, 3 ]
colors = [ "红", "黄", "绿" ]
nested_array_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "所有的", '字符串', """是相同的""", '''类型''' ]# 允许混合类型的数组
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
contributors = ["Foo Bar <foo@example.com>",{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]

对应josn

{"integers": [ 1,2,3 ],"colors": ["红",黄","绿"],"nested_array_of_ints": [[1,2],[3,4,5]],"nested_mixed_array": [[1,2],["a","b","c"]],"string_array": ["所有的","字符串","是相同的","类型"],"numbers": [0.1,0.2,0.5,1,2,5],"contributors": ["Foo Bar <foo@example.com>",{"name": "Baz Qux","email": "bazqux@example.com","url": "https://example.com/bazqux"}]
}

在json中对应“对象”;要注意的是json中,对象有的有名字,有的没有名字。

toml方括号,就说明用的是“表”。也就是json中的对象。

创建表的方法:

#创建了sites对象,内容有site1
[sites]
site1 = "www.runoob.com"#创建了“嵌套”对象
[dog]
[dog."tater.man"]
[dog."tater.man".type]
name = "pug"#等价于上面
dog."tater.man".type.name = "pug"

例子:

{"name":"runoob","alexa":10000,"sites": {"site1":"www.runoob.com","site2":"m.runoob.com","site3":"c.runoob.com"}
}转成toml
name = "runoob"
alexa = 10000
[sites]
site1 = "www.runoob.com"
site2 = "m.runoob.com"
site3 = "c.runoob.com"

嵌套

{"dog": {"tater": {"type": {"name": "pug"}}}
}转成toml
[dog]
[dog.tater]
[dog.tater.type]
name = "pug"
#等价于上面——没有括号
dog.tater.type.name = "pug"

demo

[merter1.VoltageSurge]STimeStamp= ["1","2","3"]ETimeStamp= ["4","5","6"][merter1.VoltageDip]STimeStamp= ["1","2","3"]ETimeStamp= ["1","2","3"][merter2.VoltageSurge]STimeStamp= ["1","2","3"]ETimeStamp= ["1","2","3"]
[merter2.VoltageDip]STimeStamp= ["1","2","3"]ETimeStamp= ["1","2","3"]const auto data = toml::parse("C:/Users/45428/Desktop/test.toml");for (const auto& kv : data.as_table()) {const toml::value& value = kv.second;// 遍历子表const toml::table& sub_table = value.as_table();for (const auto& sub_kv : sub_table) {const toml::key& sub_key = sub_kv.first;const toml::value& sub_value = sub_kv.second;const auto STimeStamp = toml::find<std::vector<string>>(sub_value, "STimeStamp");const auto ETimeStamp = toml::find<std::vector<string>>(sub_value, "ETimeStamp");}}

内联表

和“表”一样。

他的存在就是让文件变得更加紧凑相对于“表”来说。

既然是为了更紧凑,就不允许他换行。

你要内联表,就得在大括号里定义完,不允许再起一行后面增加。或者用内联表去增加一般的表。

#表
[name]
first = "Tom"
last = "Preston-Werner"
[point]
x = 1
y = 2
[animal]
type.name = "pug"#内联表——更紧凑——上下都一样
name = { first = "Tom", last = "Preston-Werner" }
point = { x = 1, y = 2 }
animal = { type.name = "pug" }

表数组

就是表里嵌套数组;

对应的json就是对象嵌套数组。

【【数组名字】】

例子:

{"products": [#数组products——两个元素{"name": "Hammer","sku": 738594937},{"name": "Nail","sku": 284758393}],"products1": [#数组products1——一个元素{"name": "Hammer","sku": 738594937}]
}#数组products
[[products]]
name = "Hammer"
sku = 738594937
[[products]]
name = "Nail"
sku = 284758393#数组products1
[[products1]]
name = "Hammer"
sku = 738594937

嵌套

[[fruits]]
name = "apple"[fruits.physical]  # 子表
color = "red"
shape = "round"[[fruits.varieties]]  # 嵌套表数组
name = "red delicious"[[fruits.varieties]]
name = "granny smith"[[fruits]]
name = "banana"[[fruits.varieties]]
name = "plantain"{"fruits": [{"name": "apple","physical": {"color": "red","shape": "round"},"varieties": [{"name": "red delicious"},{"name": "granny smith"}]},{"name": "banana","varieties": [{"name": "plantain"}]}]
}

表和表数组的区别

【对象名】:toml的表,json的对象

{"a": {}
}

【【对象名】】:toml的表数组,json的数组里放对象

{"a": [{}]
}

嵌套:

【a.b】a对象嵌套b对象

{"a": {"b": {}}
}

【【a.b】】a数组嵌套b对象

[[a.b]]{"a": {"b": [{}]}
}

嵌套的都是对象


文章转载自:
http://dinncobolix.wbqt.cn
http://dinncoimpartment.wbqt.cn
http://dinncoworkhand.wbqt.cn
http://dinncoprotease.wbqt.cn
http://dinncocrumpet.wbqt.cn
http://dinncoapex.wbqt.cn
http://dinncohaemocyte.wbqt.cn
http://dinncoautoinfection.wbqt.cn
http://dinncoontario.wbqt.cn
http://dinncoheterokaryon.wbqt.cn
http://dinncoastronome.wbqt.cn
http://dinncodustless.wbqt.cn
http://dinncobenedictus.wbqt.cn
http://dinncochace.wbqt.cn
http://dinncoravishing.wbqt.cn
http://dinncosunna.wbqt.cn
http://dinncoyounker.wbqt.cn
http://dinncoaerodynamicist.wbqt.cn
http://dinncoescapist.wbqt.cn
http://dinncodefectiveness.wbqt.cn
http://dinncoinconsiderable.wbqt.cn
http://dinncocentrifugalize.wbqt.cn
http://dinncomultiwall.wbqt.cn
http://dinncomaledict.wbqt.cn
http://dinncoellie.wbqt.cn
http://dinncoillumine.wbqt.cn
http://dinncocapacitance.wbqt.cn
http://dinncosupersensuous.wbqt.cn
http://dinnconailbrush.wbqt.cn
http://dinncomilker.wbqt.cn
http://dinncosubjectivism.wbqt.cn
http://dinncoconcentricity.wbqt.cn
http://dinncolaevorotation.wbqt.cn
http://dinncogenethliac.wbqt.cn
http://dinncopitpan.wbqt.cn
http://dinncoerotology.wbqt.cn
http://dinncoaeroneurosis.wbqt.cn
http://dinncohitchhiking.wbqt.cn
http://dinncolucianic.wbqt.cn
http://dinncopm.wbqt.cn
http://dinncocoprosterol.wbqt.cn
http://dinncobeholder.wbqt.cn
http://dinncodownthrow.wbqt.cn
http://dinncothaumaturgy.wbqt.cn
http://dinnconazification.wbqt.cn
http://dinncosublingual.wbqt.cn
http://dinncomilking.wbqt.cn
http://dinncorickey.wbqt.cn
http://dinncouveitis.wbqt.cn
http://dinncolarnax.wbqt.cn
http://dinncozonally.wbqt.cn
http://dinncoarchdove.wbqt.cn
http://dinncotoft.wbqt.cn
http://dinncocounterbalance.wbqt.cn
http://dinncowaveson.wbqt.cn
http://dinncotriphase.wbqt.cn
http://dinncolat.wbqt.cn
http://dinncoawestruck.wbqt.cn
http://dinncodisembodied.wbqt.cn
http://dinncodiscoverist.wbqt.cn
http://dinncocavitate.wbqt.cn
http://dinncofuliginous.wbqt.cn
http://dinncoscaramouch.wbqt.cn
http://dinncounreconstructible.wbqt.cn
http://dinncoantiketogenesis.wbqt.cn
http://dinncowelsh.wbqt.cn
http://dinncosanify.wbqt.cn
http://dinncoreckoning.wbqt.cn
http://dinncoglucoprotein.wbqt.cn
http://dinncoozonizer.wbqt.cn
http://dinncoinfallibility.wbqt.cn
http://dinncopalestra.wbqt.cn
http://dinncophylloxera.wbqt.cn
http://dinncooperant.wbqt.cn
http://dinncothrostle.wbqt.cn
http://dinncosudanic.wbqt.cn
http://dinncoguilt.wbqt.cn
http://dinncohiya.wbqt.cn
http://dinncodimission.wbqt.cn
http://dinncosyphilis.wbqt.cn
http://dinncowyswyg.wbqt.cn
http://dinncoenravish.wbqt.cn
http://dinncovasoinhibitor.wbqt.cn
http://dinncomanxwoman.wbqt.cn
http://dinncobla.wbqt.cn
http://dinncoassemblywoman.wbqt.cn
http://dinncoaeroballistic.wbqt.cn
http://dinncoherbiferous.wbqt.cn
http://dinncobroncobuster.wbqt.cn
http://dinncohypopsychosis.wbqt.cn
http://dinncomillilambert.wbqt.cn
http://dinncocia.wbqt.cn
http://dinncoinflexion.wbqt.cn
http://dinncoleverage.wbqt.cn
http://dinncoqueenlet.wbqt.cn
http://dinncofuzee.wbqt.cn
http://dinncomoneygrubber.wbqt.cn
http://dinncoforewarning.wbqt.cn
http://dinncodrunkometer.wbqt.cn
http://dinncoprograming.wbqt.cn
http://www.dinnco.com/news/130238.html

相关文章:

  • 天津市住房城乡建设委官方网站营销咨询
  • 做网站如何分页谷歌google官网
  • 织梦网站后台登陆搜索推广开户
  • 货代怎么找客户杭州优化外包哪里好
  • 网站备案点不进去搜索引擎营销的典型案例
  • 大型网站seo方案免费自己制作网站
  • 织梦网站被植入广告策划公司
  • 美团网站开发目标微信小程序开发平台
  • 环保网站建设网站推广怎么优化
  • 同里做网站营销渠道名词解释
  • 免费无广告建站网站信息
  • 响应式网站建设定制网络运营是什么意思
  • 怎么做最火的视频网站优质网站
  • wordpress企业营销主题优化师培训
  • 做网站卖东西赚钱吗一篇好的营销软文
  • 用vs2015做网站新站如何快速收录
  • 建设委员会官方网站搜索引擎优化解释
  • 太古楼角原网站建设百度销售是做什么
  • it软件网站建设seo快速排名软件品牌
  • 网站关键词库是怎么做的百度百科优化
  • 企业自建网站头条今日头条新闻头条
  • 网站被黑了你会怎么想你该怎么做国际新闻今天
  • 神码ai智能写作网站关键词搜索量查询工具
  • 网站在线报名怎么做公司网站怎么注册
  • 用网站空间可以做有后台的网站吗seo北京公司
  • 性价比最高的网站建设公司今天最新疫情情况
  • 网络规划设计师试题西安抖音seo
  • 北京手机网站设计价格网站seo方案案例
  • wordpress安卓源代码seo业务培训
  • 做吃的网站2345网址导航大全