当前位置:网站首页>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
边栏推荐
- 《微信小程序-进阶篇》Lin-ui组件库源码分析-Icon组件
- R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化分组箱图、使用ggpar函数改变图形化参数(legend、修改可视化图像的图例在整图中的位置)
- NPM淘宝镜像(最新版本)于2021-11-21 16:53:52发布新版本npm镜像[通俗易懂]
- SQL、HQL、JPQL 到底有什么区别
- R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the grouped box plot, use the ggpar function to change the graphical parameters (caption, add, modify th
- The use of button controls
- 763.划分字母区间——之打开新世界
- Gorm—Go语言数据库框架
- 公告
- Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
猜你喜欢
随机推荐
网线RJ45接口针脚[通俗易懂]
SIGABRT 报错时的注意事项和解决方法
最小费用最大流问题详解
易驱线主控芯片对比(电动三轮电机90O瓦世纪通达)
Getting started with UnityShader (1) - GPU and Shader
如何进行需求分析评审
QGIS 加载WMS数据,重新投影
格林美瑞交所IPO:募资3.8亿美元 更多中国企业将赴欧洲上市
Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
TRACE32 - Common Operations
button控件的使用
Network cable RJ45 interface pins [easy to understand]
TextBlock控件入门基础工具使用用法,取上法入门
R语言检验样本是否符合正态性(检验样本是否来自一个正态分布总体):shapiro.test函数检验样本是否符合正态分布(normality test)
NC | 中国农大草业学院杨高文组揭示发现多因子干扰会降低土壤微生物多样性的积极效应...
Ubantu专题5:设置静态ip地址
【CUDA学习笔记】初识CUDA
Essential Learning for Getting Started with Unity Shader - Transparency Effect
charles进行弱网测试(app弱网测试怎么做)
R language moves time series data forward or backward (custom lag or lead period): use the lag function in the dplyr package to move the time series data forward by one day (set the parameter n to a p









