当前位置:网站首页>what exactly is json (c# json)
what exactly is json (c# json)
2022-07-31 15:15:00 【Full stack programmer webmaster】
大家好,又见面了,我是你们的朋友全栈君.
If the point in you is a superior,那……You should come here for identification..Many partners engaged in data analysis work from“最简单”的神器—Excel开始入门的,对编程语言、Many tools of the computer world are poorly understood.to do structured data,Just go and study by yourselfsql,学习sql server或是mysql数据库.to be semi-structured、Unstructured data has to learn things likemongo数据库的东西. Every day, I hear the programmer brother across from me say that I will pack a package for you.json吧,will this work?阿,json是个啥?管不了这么多了,secretly thinking,Since you can pack,I can take this bag apart.……不敢说,It became a programmer to encourage division,Laugh at the opposite programmer Oppa.言归正传.
1. 初识JSON
这是个json,Stored data describes a personJohn Smith的一些个人信息,比如姓名,是否活着,年龄,Information such as address and phone number.其中,地址address和电话号码phoneNumbers呢,The following also includes the state、城市、街道,家庭电话、Information such as office phone number and mobile phone number.
If only previously contacted storage inExcel或者sql serverStructured data in a structured database,Then the first time I sawjson格式的数据,must be new.Perceptual knowledge about it first,operate it later.
this data organization,条理清晰,It can better represent the attribute relationship of entities such as people or things in nature.Can be understood as a tree structure,a tree with branches,tree with leaves.
2. 操作JSON
打开Ipython,Type in the following code,The next operation also uses the value of this variable as a chestnut.
你看了一眼,would say I know this,Is it not a dictionary?在Ipython中使用type()获得js变量的数据类型.
you're right,就是个dict类型.
2.1 写入json文件
2.2 读出json文件
save what you read,What is a data type.
You can see that we writejsonfile is adict类型,After reading it is still adict类型.这也就是json区别于csvfile place.csv文件呢,No matter what type of data structure you are writing to,The read is always a string of characters.json文件呢,The essence is also stored as a string,区别于csv的是,通过json.load读出json,The type of data can be automatically parsed.
2.3 区分json.dump()与json.dumps()
json.dump()
使用时,You need to specify the need to write the data,and a write stream.The function implemented by the following code is tojswrite the content to the desktop onetest.json的文档中.After executing the code, you can see that there is one more on the desktoptest.json文件.
json.dumps()
The method used is relatively simple,directly write thedict传递给这个函数.
3. Identify by inferenceJSON
3.1 区分json与dict
Sometimes will suddenly make confused,想json跟dict到底是什么关系,有什么区别呢?In fact, that's what you don't understandjson和dict本身的概念.
json
Essentially a way of organizing files,比如你熟悉的txt, csv, doc,docx,xls,xlsx文件等等.
dict
is a data structure defined in a programming language,比如列表list,比如集合set,比如字符串str,There are e.g. arraysarray.
3.2 区分json与XML
XML和JSON都使用结构化方法来标记数据.
JSON 简单的语法格式和清晰的层次结构明显要比 XML 容易阅读,并且在数据交换方面,由于 JSON 所使用的字符要比 XML 少得多,可以大大得节约传输数据所占用得带宽
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/128257.html原文链接:https://javaforall.cn
边栏推荐
- 看交互设计如何集成到Scrum敏捷流程中
- border控件的使用
- Advanced Mathematics - Commonly Used Indefinite Integral Formulas
- 763.划分字母区间——之打开新世界
- WPF项目--控件入门基础用法,必知必会XAML
- 大健云仓冲刺美股:增营收反减利润 京东与DCM是股东
- 谷歌CTS测试(cta测试)
- NPM淘宝镜像(最新版本)于2021-11-21 16:53:52发布新版本npm镜像[通俗易懂]
- R语言计算时间序列数据的移动平均值(滚动平均值、例如5日均线、10日均线等):使用zoo包中的rollmean函数计算k个周期移动平均值
- RecyclerView高效使用第三节
猜你喜欢
如何进行需求分析评审
为什么黑客领域几乎一片男生?
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
为什么毕业季不要表白?
TCP详解
消息队列消息数据存储MySQL表设计
三、数组
Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
RecyclerView的高效使用第一节
随机推荐
NPM Taobao mirror (latest version) released a new version of npm mirror at 2021-11-21 16:53:52 [easy to understand]
消息队列消息数据存储MySQL表设计
DeepLab系列学习
易驱线主控芯片对比(电动三轮电机90O瓦世纪通达)
Excel快速对齐表格的中姓名(两个字姓名和三个字姓名对齐)
乡村基冲刺港交所:5个月期内亏2224万 SIG与红杉中国是股东
json到底是什么(c# json)
radiobutton的使用
Unity中实现点选RenderTexture中的3D模型
LeetCode二叉树系列——110.平衡二叉树
ES6 类
工程水文学试卷
Word table to Excel
网线RJ45接口针脚[通俗易懂]
R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化分组箱图、使用ggpar函数改变图形化参数(caption、添加、修改可视化图像的题注、脚注内容)
微信聊天记录中搜索红包
Word表格转到Excel中
力扣:738.单调递增的数字
2021 OWASP TOP 10 漏洞指南
ASP.NET Core 产生连续 Guid