Universal Binary JSON Specification 通用二进制JSON规范
The universally compatible format specification for binary JSON.
二进制的JSON普遍兼容的格式规范
。 .Specification
规格

Examples 例子 Best Practices 最佳实践 Type Reference
参考型号
Libraries
图书馆

Developer Resources 开发资源 Links
链接
Thanks
谢谢
Contact
联系
.Current Version: Draft 8当前版本: 草案第8
1.Introduction 简介
2.Why 为什么
3.Goals 目标
4.Data Format 数据格式
5.Value Types 值类型
1.JSON JSON
2.Universal Binary JSON 通用二进制JSON
6.Container Types 容器类型
1.JSON JSON
2.Universal Binary JSON 通用二进制JSON
7.Streaming 流
1.No-Op Type NO - OP型
2.Unknown-Length Containers 未知长度的容器
8.Size Requirements 尺寸要求
9.Endianness 字节序
10.MIME Type MIME类型
11.File Extension 文件扩展名
12.History 历史
13.Changelog 变更
Introduction简介

--------------------------------------------------------------------------------

JSON has become a ubiquitous text-based file format for data interchange. JSON已经成为一个无处不在基于文本的文件格式进行数据交换。 Its simplicity, ease of processing and (relatively) rich data typing made it a natural choice for many developers needing to store or shuffle data between systems quickly and easy.其简单,易于加工和(相对)丰富的数据输入,使许多开发商为需要存储系统之间快速和容易或随机数据的一个自然选择。

Unfortunately, marshaling native programming language constructs in and out of a text-based representations does have a measurable processing cost associated with it.不幸的是,封送处理本地编程语言构造和一个基于文本的意见确实有一个可衡量的处理与它相关的成本。

In high-performance applications, avoiding the text-processing step of JSON can net big wins in both processing time and size reduction of stored information, which is where a binary JSON format becomes helpful.在高性能应用中,避免了JSON文本处理步骤可以净减少存储的信息,这是一个二进制JSON格式成为有用的处理时间和大小大的胜。

Why为什么

--------------------------------------------------------------------------------

Attempts to make using JSON faster through binary specifications like BSON , BJSON or Smile exist, but have been rejected from mass-adoption for two reasons:尝试使用JSON的速度通过像二进制规格BSON , BJSON或微笑存在,但一直拒绝从大量采用的原因有两个:

1.Custom (Binary-Only) Data Types : Inclusion of custom data types that have no ancillary in the original JSON spec, leaving room for incompatibilities to exist as different implementations of the spec handle the binary-only data types differently. 自定义(二进制)数据类型:列入原始的JSON规范不配套,离开房间的不兼容问题存在不同的实现规范处理的只有二进制的数据类型不同的自定义数据类型。
2.Complexity : Some specifications provide higher performance or smaller representations at the cost of a much more complex specification , making implementations more difficult which can slow or block adoption. 复杂性:有些规格提供更高的性能或成本较小的陈述更为复杂的规范,使实现比较困难,可以减缓或阻止通过。 One of the key reasons JSON became as popular as it did was because of its ease of use.的JSON成为受欢迎,因为它的关键原因之一是因为它的易用性。
BSON, for example, defines types for binary data, regular expressions, JavaScript code blocks and other constructs that have no equivalent data type in JSON. BSON,例如,定义为二进制数据,正则表达式,JavaScript代码块和JSON中没有等效的数据类型的其他结构类型。 BJSON defines a binary data type as well, again leaving the door wide open to interpretation that can potentially lead to incompatibilities between two implementations of the spec and Smile, while the closest, defines more complex data constructs and generation/parsing rules in the name of absolute space efficiency. BJSON以及定义二进制数据类型,再次离开门大开解释,有可能导致规范和微笑的两个实现之间不兼容,而最近的地方,更复杂的数据结构和发电/解析规则定义的名称绝对空间效率。

The existing binary JSON specifications all define incompatibilities or complexities that undo the singular tenant that made JSON so successful: simplicity .现有二进制的JSON规范定义的不兼容或复杂性,撤消JSON的如此成功:简单的奇异租户。

JSON's simplicity made it accessible to anyone, made implementations in every language available and made explaining it to anyone consuming your data immediate. JSON的简单性使任何人都访问,可用每一种语言的实现,并作出解释给任何人耗费您的数据立即。

Any successful binary JSON specification must carry these properties forward for it to be genuinely helpful to the community at large.任何成功的二进制JSON规范必须进行这些属性将在大型社会真正有用的。

This specification is defined around a singular construct used to build up and represent JSON values and objects.本规范是指围绕建立和代表JSON值和对象使用一个奇异的构造。 Reading and writing the format is trivial, designed with the goal of being understood in under 10 minutes (likely less if you are very comfortable with JSON already).阅读和写作的格式是微不足道的,与了解,在10分钟(如果你已经使用JSON是非常舒适的可能少)的目标设计。

Fortunately, while the Universal Binary JSON specification carriers these tenants of simplicity forward, it is also able to take advantage of optimized binary data structures that are (on average) 30% smaller than compacted JSON and specified for ultimate read performance; bringing simplicity, size and performance all together into a single specification that is 100% compatible with JSON.幸运的是,简单提出这些住户,而通用二进制JSON规范的运营商,它也能够采取优化的二进制数据结构的优势(平均)30%小于压实的JSON和指定为最终的读取性能;带来简洁,大小表现成一个单一的规范,它是100%与JSON兼容在一起。

Why not JSON+gzip?为什么不JSON + gzip的?
On the surface simply gzipping your compacted JSON may seem like a valid (and smaller) alternative to using the Universal Binary JSON specification, but there are two significant costs associated with this approach that you should be aware of: gzip压缩您的压实的JSON只是表面上看起来可能像使用通用二进制JSON规范有效的替代(小),但也有两个显著的​​成本,这种方法,你应该知道的:

1.At least a 50% performance overhead for processing the data.至少有50%的性能开销处理数据。
2.Lack of data clarity and inability to inspect it directly.缺乏清晰的数据无法直接检查。
While gzipping your JSON will give you great compression, about 75% on average, the overhead required to read/write the data becomes significantly higher.虽然gzip压缩你的JSON将会给你很大的压缩,平均约75%,所需的开销读/写的数据变得显著较高。 Additionally, because the binary data is now in a compressed format you can no longer open it directly in an editor and scan the human-readable portions of it easily; which can be important during debugging, testing or data verification and recovery.此外,因为现在是在一个压缩格式的二进制数据,你可以不再打开它直接在编辑器中轻松地扫描它的人类可读的部分,可在调试,测试或数据核查和恢复的重要。

Utilizing the Universal Binary JSON format will typically provide a 30% reduction in size and store your data in a read-optimized format offering you much higher performance than even compacted JSON.利用通用的二进制JSON格式通常会提供一个大小减少30 %和在读优化,为您提供性能远高于甚至压实的JSON格式存储数据。 If you had a usage scenario where your data is put into long-term cold storage and pulled out in large chunks for processing, you might even consider gzipping your Universal Binary JSON files, storing those, and when they are pulled out and unzipped, you can then process them with all the speed advantages of UBJ.如果你有你的数据是为长期的冷库使用方案,并退出在处理大块,你甚至可能考虑通用的二进制JSON文件gzip压缩,存储这些,而当他们拉出并解压,你可以处理所有UBJ速度优势。

As always, deciding which approach is right for your project depends heavily on what you need.与往常一样,决定哪种方法适合您的项目在很大程度上取决于你所需要的。

Goals目标

--------------------------------------------------------------------------------

The Universal Binary JSON specification has 3 goals:通用二进制JSON规范的有3个目标:

1. 1。 Universal Compatibility 通用兼容性

Meaning absolute compatibility with the JSON spec itself as well as only utilizing data types that are natively supported in all popular programming languages.与JSON规范本身的意义绝对的兼容性,以及仅利用数据本身支持所有流行的编程语言的类型。

This allows 1:1 transforms between standard JSON and Universal Binary JSON as well as efficient representation in all popular programming languages without requiring parser developers to account for strange data types that their language may not support.这允许1:1之间的标准JSON和通用二进制JSON以及在所有流行的编程语言的高效表示转换,而无需奇怪的数据类型,他们的语言可能不支持解析器开发。

2. 2。 Ease of Use 易于使用

The Universal Binary JSON specification is intentionally defined using a single core data structure to build up the entire specification. JSON规范的通用二进制是故意使用一个单一的核心数据结构定义,建立了完整的规范。

This accomplishes two things: it allows the spec to be understood quickly and allows developers to write trivially simple code to take advantage of it or interchange data with another system utilizing it.这就完成了两件事情:它可以迅速理解规范,并允许开发人员编写平凡简单的代码,利用它,或互换与另一个系统利用它的数据。

3. 3。 Speed / Efficiency 速度/效率

Typically the motivation for using a binary specification over a text-based one is speed and/or efficiency, so strict attention was paid to selecting data constructs and representations that are (roughly) 30% smaller than their compacted JSON counterparts and optimized for fast parsing.通常情况下,使用一个基于文本的二进制规范的动机是速度和/或效率,如此严格注重选择,(大约)30%,比其压实的JSON和快速解析优化的数据结构和交涉。

Data Format数据格式

--------------------------------------------------------------------------------

The Universal Binary JSON specification utilizes a single binary tuple to represent all JSON data types (both value and container types):通用二进制JSON规范使用单一的二进制记录代表所有JSON数据类型(价值和容器类型):

[ type , 1-byte char]([ length , 1 or 4-byte integer])([ data ]) [ 类型 ]([1字节字符的长度 ,1或4字节的整数])([ 数据 ]) Each element in the tuple is defined as: tuple中的每个元素被定义为:

•type 类型
◦A 1-byte ASCII char used to indicate the type of the data following it.一个1字节的ASCII字符用来表示以下的数据类型。
◦A single ASCII char was chosen to make manually walking and debugging data stored in the Universal Binary JSON format as easy as possible (eg making the data relatively readable in a hex editor).一个单一的ASCII字符选择手动行走和调试在尽可能简单的通用二进制JSON格式(例如,在十六进制编辑器读取数据相对)中存储的数据。
•length ( OPTIONAL ) 长度 ( 可选 )
◦1-byte or 4-byte length value based on the type specified. 1个字节或4字节的长度值基础上指定的类型 。 This allows for more aggressive compression and space-optimization when dealing with a lot of small values.这允许更积极的压缩和优化空间,在处理很多小值。
◦1-byte : An unsigned byte value (0 to 254) used to indicate the length of the data payload following it. 1个字节 :一个无符号字节的值(0到254),用来表示数据有效载荷的长度。 Useful for small items.实用小件物品。
◦4-byte : An unsigned integer value (0 to 2,147,483,647) used to indicate the length of the data payload following it. 4字节 :一个无符号整数的值(0到2,147,483,647),用来表示数据有效载荷的长度。 Useful for larger items.较大的项目有用。
•data ( OPTIONAL ) 数据 ( 可选 )
◦A run of bytes representing the actual binary data for this type of value.运行这种类型的值代表实际的二进制数据的字节。
In the name of efficiency, the length and data fields are optional depending on the type of value being encoded.在提高效率的名称, 长度和数据字段都是可选的取决于被编码的值的类型。 Some value are simple enough that just writing the 1-byte ASCII marker into the stream is enough to represent the value (eg null ) while others have a type that is specific enough that no length is needed as the length is implied by the type (eg int32 ).一些价值足够简单,只是流写入1个字节的ASCII标记是足够的代表值(如NULL),而另一些类型是不够具体, 没有长度是需要的长度是隐含类型(如INT32)。

The specifics of each data type will be spelled out down below for more clarity.每个数据类型的具体内容将列明下更清晰。

The basic organization provided by this tuple ( type-length-data ) allows each JSON construct to be represented in a binary format that is simple to read and write without the need for complex/custom encodings or null-termating bytes anywhere in the stream that has to be scanned for or references resolved.元( 类型-长度-数据 )提供基本的组织允许每个JSON的构造很简单,而不需要复杂/自定义编码或任何地方的空termating字节流读取和写一个二进制格式表示,要扫描或引用解决。

Value Types值类型

--------------------------------------------------------------------------------

This section describes the mapping between the 5 discrete value types from the JSON specification into the Universal Binary JSON format.本节介绍了从JSON规范的5成JSON格式的通用二进制离散值类型之间的映射。

JSON JSON
The JSON specification defines 7 value types: JSON规范定义的值类型:

•string 字符串
•number 数
•object (container) 对象(容器)
•array (container) 阵列(容器)
•true真
•false假
•null 空
Of those 7 values, 2 of them are types describing containers that hold the 5 basic values.其中7值,其中2例是描述拥有5个基本值的容器类型。 We have a separate section below for looking at the 2 container types specifically, so for the time being let's only consider the following 5 discrete value types:我们有一个单独的一节中寻找特别,所以让我们只考虑以下5个离散值类型2容器类型:

•string 字符串
•number 数
•true真
•false假
•null 空
Most of these types have a 1:1 mapping to a primitive type in most popular programming languages (Java, C, Python, PHP, Erlang, etc.) except for number .大多数这些类型有一个1:1映射到最流行 ​​的编程语言中的原始类型(Java和C,Python和PHP,二郎等) 数除外。 This makes defining the types for the 4 easy, but let's take a closer look at how we might deconstruct number into its core representations.这使得界定为4个简单的类型,但让我们仔细看看在我们如何解构到其核心交涉。

Number Type号码类型
In JavaScript, the Number type can represent any numeric value where as many other languages define numbers using 3-6 discrete numeric types depending on the type and length of the value being stored.在JavaScript中, Number类型可以代表任何数值,许多其他语言的定义使用3-6离散数值类型,这取决于被存储的值的类型和长度的数字。 This allows the runtime to handle numeric operations more efficiently.这使得运行时更有效地处理数值运算。

In order for the Universal Binary JSON specification to be a performant alternative to JSON, support for these most common numeric types had to be added to allow for more efficient reading and writing of numeric values.为了JSON规范的通用二进制是一个高性能的替代到JSON,支持这些最常见的数字类型已经被添加到允许更有效的阅读和写作的数值。

number is deconstructed in the Universal Binary JSON specification and defined by the following numeric types: 数量是在通用二进制JSON规范的解构,由下列数值类型定义:

•byte (8-bits, 1-byte)字节(8位,1个字节)
•int16 (16-bits, 2-bytes)的Int16(16位,2个字节)
•int32 (32-bits, 4-bytes) INT32(32位,4个字节)
•int64 (64-bits, 8-bytes)的Int64(64位,8个字节)
•float (32-bits, 4-bytes) FLOAT(32位,4个字节)
•double (64-bits, 8-bytes)双(64位,8个字节)
•huge (arbitrarily long, UTF-8 string-encoded numeric value).巨大的(任意长,使用UTF - 8字符串编码的数值)。
Trying to maintain a single number type represented in binary form would have lead to parsing complexity and slow-downs as the processing language would have to further inspect the value and map it to the most optimal type.试图保持二进制形式表示一个数字类型会导致解析的复杂性和缓慢起伏,为处理语言,将有进一步检查的价值和它映射到最优化的类型。 By pre-defining these 5 different numeric types directly in binary, in most languages the number can stay in their optimal form on disk and be deserialized back into their native representation with very little overhead.通过预先定义这5个不同的数字的类型,直接在二进制,在大多数语言的数量可以留在磁盘上的最佳形式和反序列化为自己的本机表示极少的开销。

When working on a platform like JavaScript that has a singular type for numbers, all of these 5 data types (with the exception of huge ) can simply be mapped back to the Number type with ease and no loss of precision.像JavaScript这样的一个平台,有一个奇异的数字类型的工作时,所有这些数据类型( 与异常巨大)可以简单地映射回 Number类型的轻松和无精度损失。

When converting these formats back to JSON, all of the numeric types can simply be rendered as the singular number type defined by the JSON spec without issue; there is total compatibility!当这些格式转换为JSON,所有数值类型可以简单地呈现为单数没有问题的JSON规范定义的类型,是总的兼容性!

64-bit Integers 64位整数

While almost all languages native support 64-bit integers, not all do (C89, JavaScript ( yet )) and care must be taken when encoding 64-bit integer values into binary JSON then attempting to decode it on a platform that doesn't support it.虽然几乎所有的语言的原生支持64位整数,并不是所有的做(C89,JavaScript的(还))和护理,然后试图在一个平台上不支持解码二进制的JSON编码成64位整数值时,必须采取它。

If you are fully aware of the platforms and runtime environments your binary JSON is being used on and know they all support 64-bit integers, then you are fine.如果你是充分认识到二进制的JSON正在使用,并知道它们都支持64位整数的平台和运行时环境,那么你的罚款。

If you are trying to deserialize 64-bit integers in a client's browser in JavaScript or another environment that does not support 64-bit integers, then you will want to take care to skip them in the input or have the client producing them encode them as double or huge values if that is easier to handle.如果你是试图以反序列化在客户端的浏览器在JavaScript或另一个环境,没有不支持64位整数64位整数,然后你会希望来采取照顾以跳过输入他们或有生产它们的客户端编码它们作为双或巨大的价值,如果这是比较容易处理。

Alternatively you might consider encoding your 64-bit values as doubles if you know you are going from the server to a client JavaScript environment with the binary-encoded information.另外,你可能会考虑您的64位值进行编码,作为增加一倍,如果你知道你是从服务器到客户端的JavaScript环境与二进制编码信息。

32-bit Floats 32位浮点数

All 32-bit float values are written into the binary format using the IEEE 754 single precision floating point format , which is the following structure:所有32位浮点值写入二进制使用IEEE 754格式的单精度浮点格式 ,这是以下结构:

◦Bit 31 (1 bit) – sign 31位(1位) - 标志
◦Bit 30-23 (8 bits) – exponent 30-23位(8位) - 指数
◦Bit 22-0 (23 bits) – fraction (significand) 22-0位(23位) - 一小部分(尾数)
64-bit Doubles 64位双打

All 64-bit double values are written into the binary format using the IEEE 754 double precision floating point format , which is the following structure:所有64位双值被写入到二进制使用IEEE 754格式的双精度浮点格式 ,这是以下结构:

◦Bit 63 (1 bit) – sign 63位(1位) - 标志
◦Bit 62-52 (11 bits) – exponent 62-52位(11位) - 指数
◦Bit 51-0 (52 bits) – fraction (significand) 51-0位(52位) - 一小部分(尾数)
huge Number Support 数量庞大的支持

Representation of arbitrarily long integer or decimal values > 64-bits in the Universal Binary JSON format is done by way of a UTF-8 encoded string.任意长的整数或小数的值代表在通用二进制JSON格式的64位是一个UTF - 8编码的字符串的方式。

The format of this string must adhere to the JSON number specification .此字符串的格式必须坚持的JSON 数量规范 。

This allows huge numbers to be portable across all platforms and easily converted to/from JSON as well as more robust handling on platforms that may not support arbitrarily large numbers.这使得大量在所有平台上的移植,并很容易地转换到/从JSON,以及更强大的处理平台上,可能不支持任意大的数字。

If you are working on a platform that has no support for huge numbers, please see our Best Practices recommendation on how to handle them.如果你工作在一个平台上,没有大量的支持,请参阅我们的最佳实践如何处理它们的建议。

Value Type Summary价值类型摘要
Now that we have clearly defined all of our numeric types and mapped the 4 remaining simple types to Universal Binary JSON, we have our final list of discrete value types:现在,我们有明确界定的所有数值类型和映射余下的4个通用二进制JSON的简单类型,我们有我们的离散值类型的最终名单:

1.null 空
2.true真
3.false假
4.byte字节
5.int16 Int16的
6.int32 INT32
7.int64 INT64
8.float浮动
9.double双
10.huge巨大的
11.string字符串
Now that we have defined all the types we need, let's see how these are actually represented in binary in the next section.现在,我们已经定义了我们所需要的所有类型,让我们来看看如何将这些实际上是在下一节中的二进制表示。

Universal Binary JSON通用二进制JSON
The Universal Binary JSON specification defines a total of 11 discrete value types (that we saw in the last section) all delimited in the binary file by a specific, 1-byte ASCII character (optionally) followed by a length and (optionally) a data payload containing the value data itself.通用二进制JSON规范定义了一个共有11个离散值类型(即我们在最后一节中所看到的)所有的二进制文件由一个具体的,1个字节的ASCII字符长度和(可选的)数据(可选)分隔有效载荷包含数值数据本身。

Some of the values ( null, true and false ) are specific enough that the single 1-byte ASCII character is enough to represent the value in the format and they will have no length or data section.一些值(NULL,true和 false)是不够具体,1个字节的ASCII字符足以代表格式的价值,他们不会有任何长度或数据段。

All of the numeric values (except huge ) automatically imply a length by virtue of the type of number they are.所有数值( 巨大的除外),自动意味着凭借他们的数量型的长度。 For example, a 4-byte int32 always has a length of 4-bytes; an 8-byte double always requires 8 bytes of data.例如,一个4字节的Int32总是有一个4字节的长度;一个8 字节双总是需要8个字节的数据。

In these cases the ASCII marker for these types are immediately followed by the data representing the number with no length value in between.在这些情况下,为这些类型的ASCII标志,紧接着代表没有长度值之间的数据。

Because string and huge are potentially variable length, they contain all 3 elements of the tuple: type-length-data .由于字符串和巨大的潜在的可变长度的,它们包含元组的所有3个要素:类型长度数据。

This table shows the official definitions of the 11 discrete value types:此表显示的11个离散值类型的正式定义:

Type类型 Size尺寸 Marker标记 Length?长度? Data?数据?
null空 1-byte 1个字节 Z ž No无 No无
true 真 1-byte 1个字节 T T No无 No无
false 假 1-byte 1个字节 F F No无 No无
byte字节 2-bytes 2个字节 B乙 No无 Yes是
int16 Int16的 3-bytes 3个字节 i我 No无 Yes是
int32 INT32 5-bytes 5字节 I我 No无 Yes是
int64 INT64 9-bytes 9字节 L大号 No无 Yes是
float (32-bit) FLOAT(32位) 5-bytes 5字节 d ð No无 Yes是
double (64-bit)双(64位) 9-bytes 9字节 D ð No无 Yes是
huge (number)巨大(数) 2-bytes + byte length of string. 2个字节+字符串的字节长度。 h h Yes是 Yes (if non-empty)是(如果非空)
huge (number)巨大(数) 5-bytes + byte length of string. 5字节+字符串的字节长度。 H H Yes是 Yes (if non-empty)是(如果非空)
string字符串 2-bytes + byte length of string. 2个字节+字符串的字节长度。 s小号 Yes是 Yes (if non-empty)是(如果非空)
string字符串 5-bytes + byte length of string. 5字节+字符串的字节长度。 S小号 Yes是 Yes (if non-empty)是(如果非空)

The duplicate (lowercased) 'h' and 's' types are just versions of those types that allow for a 1-byte length (instead of 4-byte length) to be used for more compact storage when length is <= 254 .重复的(小写)“H”和“S”型的版本允许长度为1字节的类型(而不是4个字节的长度),使用更紧凑的存储长度为<= 254时。
With each field of the table described as:称为表的每个字段:

Type 类型

•The binary value data type defined by the spec.二进制值数据类型的规范定义。
Size 尺寸

•The byte-size of the construct, as stored in the binary format.构造的字节大小,存储在二进制格式。 This is not the value of the length field, just an indicator to you (the reader) of approximately how much space writing out a value of this type will take.这是不是长度字段的值,只是一个指标给你约多少空间写 ​​出这种类型的值将(读者) 。
Marker 标记

•The single ASCII character marker used to delimit the different types of values in the binary format.单一的ASCII字符标记用来分隔不同类型的值二进制格式。 When reading in bytes from a file stored in this format, you can simply check the decimal value of the byte (eg 'A' = 65) and switch on that value for processing.当以这种格式存储的文件的字节的阅读,您可以简单地检查字节的十进制值(例如“A”= 65)和开关处理该值。
Length? 长度?

•Indicates if the data type provides a length value between the ASCII marker and the data payload.表示,如果数据类型提供了一个之间的ASCII标记和数据有效载荷的长度值。
•Many of the data types represented in the binary format either don't have a length ( null, true or false ) or their types (eg the numeric values) are specific enough that the length is implied.许多代表在二进制格式的数据类型,要么没有长度(空,真或假 )或者它们的类型(如数值)是不够具体的长度是隐含的。
•When specifying the length for a string or huge value (UTF-8 encoded), the length must represent the number of bytes of the UTF-8 string and not the number of characters in the string .当指定为一个字符串或巨大的价值(UTF - 8编码)的长度, 长度必须代表UTF - 8 字符串的字节数,而不是字符串中的字符数。
For example, English typically uses 1-byte per character, so the string “hello” has a length of 5.例如,英语通常使用1个字节,每个字符,因此字符串“hello”的长度为5。 The same string in Russian is “привет” with a byte length of 12 and in Arabic the text becomes “مرحبا” with a byte length of 10.在俄罗斯的相同的字符串是“привет”的12个字节长度和阿拉伯文的文字变成了“مرحبا”的10字节长度。
Data? 数据?

•Indicates if the data type provides a data payload representing the value.表示如果数据类型提供了一个数据负载值。
•Most types except for null, true and false provide a data payload indicating their value.除了 ​​为空,真与假的大多数类型提供数据的有效载荷,表明自己的价值。
•Variable-length types like string and huge do not provide a data payload when they are empty (ie length of 0).More specifically, if you are writing a parser for the Universal Binary JSON format and you encounter a string of length 0, you know the very next byte is an ASCII marker for another value since the string has no data payload.像字符串和巨大的变长类型不提供数据的有效载荷,当它们是空的 (即长度为0),更具体,如果你正在写一个解析器对JSON格式的通用二进制,你遇到一个长度为0的字符串,你知道下一个字节是为另一个值的ASCII标记,因为String没有数据有效载荷。
Using Numeric Types 使用数字类型

It is always recommended to use the smallest numeric type that fits your needs.它始终是建议使用最小的数值类型,适合您的需要。 For data with a large amount of numeric data, this can cut down the size of the payloads significantly (on average a 50% reduction in size).对于大量的数字数据的数据,这可以减少有效载荷的大小显着(平均大小减少50 %)。

Using the huge Type 使用巨大的类型

The huge numeric type is intended for values > 64-bit in size. > 64位大小值的目的是巨大的数字类型。 It is considered a violation of this specification to store numeric values (that can be more efficiently represented by the other numeric types) as a huge .它被认为是违反本规范的存储作为一个巨大的的数值(可以更有效地代表其他数字类型) 。

This decision was made in order to simplify the parsing logic required to process the Universal Binary JSON specification; there is no need to introspect huge values to see if they contain normal/safe or smaller numeric values if your platform doesn't support it.这一决定是为了简化需要处理JSON规范的通用二进制的解析逻辑,有没有需要反省的巨大价值,看看他们是否包含正常/安全或更小的数值,如果你的平台不支持。 The values are skipped or an error returned to the caller.跳过值或错误返回给调用者。

Only use huge values when you need to (safely and portably) represent values > 64-bit .只有当你需要使用大值(安全和可移植)代表值> 64位 。

UTF-8 Encoding UTF - 8编码

The JSON specification does not dictate a specific required encoding, it does however use UTF-8 as the default encoding. JSON规范并没有规定一个具体的要求编码,但它作为默认编码使用UTF - 8。

The Universal Binary JSON specification dictates UTF-8 as the required string encoding . This will allow you to easily exchange binary JSON between open systems that all follow this encoding requirement.通用二进制JSON规范要求, UTF - 8为所需的字符串编码 ,这将允许您轻松地交换二进制的JSON之间的开放式系统,都遵循这种编码要求。

Fortunately, this is ideal for a multitude of reasons like space efficiency and compatibility across systems and alternative formats.幸运的是,这是理想的原因有许多像空间效率和跨系统和其他格式的兼容性。

To further clarify the binary layout of these data types, below are some visual examples of what the bytes would look like inside of a binary JSON file.为了进一步弄清这些数据类型的二进制布局,下面是一些可视化的例子看起来像里面的二进制JSON文件的字节。

NOTE : [ ]-block notation is used for readability, the [ ] characters are not actually written out in the binary format. 注 :[]块的符号是用[]字符的可读性,是不实际写入二进制格式 。

Binary Representation二进制表示 Description说明
[Z] [Z] 1-byte, null value 1个字节,空值
[T] [T] 1-byte, true value 1个字节,真正的价值
[F] [F] 1-byte, false value 1字节,值为false
[B][127] [B] [127] 2-bytes, 8-bit byte value of 127 2个字节,127字节的8位值
[I][32427] [一] [32427] 5-bytes, 32-bit integer value of 32,427 5字节,32位的32427的整数值
[L][12147483647] [L] [12147483647] 9-bytes, 64-bit integer value of 12,147,483,647 9个字节,64位整数12147483647价值
[d][3.14159] [D] [3.14159] 5-bytes, 32-bit float value of 3.14159 5字节,32位float值的3.14159
[D][72.38138221]研究[D] [72.38138221] 9-bytes, 64-bit double value of 72.38138221 9个字节,64位双精度值72.38138221
[s][5][hello] [S] [5] [打招呼] 7 bytes, string UTF-8 “hello” (English) 7个字节,字符串的UTF - 8“你好”(英文)
[s][12][привет] [S] [12] [привет] 14 bytes, string UTF-8 “hello” (Russian) 14个字节,字符串的UTF - 8“你好”(俄罗斯)
[s][10][مرحبا] [S] [10] [مرحبا] 12 bytes, string UTF-8 “hello” (Arabic) 12个字节,字符串的UTF - 8“你好”(阿拉伯语)
[S][0][0][0][1024][...super long string...] [S] [0] [0] [0] [1024 ][...超长字符串...] 5 bytes + 1024 bytes for the super long string 5个字节+ 1024字节的超长字符串
[s][4][name][s][3][bob] [S] [4] [名称] [S] [3] [鲍勃] 6 + 5 bytes, equivalent of “name”: “bob” 6 + 5个字节,相当于“名”:“鲍勃”

Now that we have seen how the JSON data value types map to the binary format, in the next section we will see how we can combine these values together into the two container types (objects and arrays) to create complex object hierarchies using the Universal Binary JSON format.现在,我们已经看到的JSON数据值类型如何映射到二进制格式,在下一节我们将看到我们如何能够结合这些值到两个容器类型(对象和数组)共同创建复杂的对象层次结构,使用通用二进制JSON格式。

Container Types容器类型

--------------------------------------------------------------------------------

In this section we will look at the 2 remaining JSON value types that we are referring to as “container types”, namely object and array .在本节中,我们将在余下的2 JSON值类型,我们称之为“容器类型”, 即对象和数组。

JSON JSON
The two JSON container types are described as follows:两个JSON容器类型说明如下:

object 对象

•A construct containing 0 or more name-value pairings, where the name is always a string and the value can be any valid value type including container types themselves.包含0个或多个名称-值配对的构造,其中名称始终是一个字符串值可以是任何有效的值类型,包括容器类型本身。
array 数组

•A flat list of values only, where the values can by any valid value type including container types themselves.一个平面列表值只,其中的值可以通过任何有效的值类型包括集装箱类型本身。
•The JSON specification does not make it a requirement that the values in an array are all of the same type and neither does the Universal Binary JSON specification. JSON规范不使一个数组中的值是相同类型的所有要求,也不JSON规范的通用二进制。
Advanced : This can actually be to your benefit. 高级 :这其实是可以到您的利益。 Take for example an array of 'int64′ values, as you are writing them out to a file or a stream, you can check the actual value of each int64 and depending on the value, encode each one into the smallest possible numeric type (eg byte , int32 , etc.). “INT64”值的数组为例,你正在写一个文件或流,你可以检查每一个INT64,取决于值的实际价值,每一个编码成尽可能小的数值类型(例如字节,INT32等)。

This can lead to a significant size reduction (say 50% smaller ) in smaller numeric values!这可能会导致在较小的数值(小50%说)一个显著的大小减少!

Given these two constructs, let's see how they are modeled in the Universal Binary JSON format.鉴于这两种结构,让我们来看看他们是如何在通用二进制JSON格式为蓝本。

Universal Binary JSON通用二进制JSON
The two container types defined by JSON are modeled using the same tuple that defines all of our other data structures in this specification so far with a minor modification: the length value is considered a count of the child elements the container holds.两个容器类型的JSON定义为蓝本,使用相同的元组在本规范中定义的所有其他数据结构与一个小的修改,到目前为止 :长度值被认为是一个容器中包含的子元素的计数。 It does not mean the byte length of the child elements.这并不意味着子元素的字节长度。

Exactly what “ child element ” means depends on the container.究竟是什么“ 子元素 ”是指依赖于容器中。 In an object, a single child element is a name-value pair; in an array, a child element is a single value.在一个对象,一个子元素是一个名称-值对数组中的一个子元素是一个单一的值。
More specifically, the tuple stays exactly the same, it is just the meaning of the center length element that changes:更具体地说,元组保持完全相同,它仅仅是中心长度元素的变化,这意味着:

[ type , 1-byte char]([ count , 1 or 4-byte integer])([ data ]) [ 类型 ,1字节的char]([1 计数 ,或4字节的整数])([ 数据 ]) All the code used to process the constructs defined by this specification stays the same, but when an object or array construct are encountered, the code needs to be aware that the length value is the child element count so it can know when the scope of the container ends.用于处理本规范所定义的结构的所有代码保持不变,但时遇到一个对象或数组构造,代码需要知道, 长度值是子元素计数,因此可以知道的范围容器结束。

For example, if you have an object that contains 4 arrays of length 50, the length argument for the object is 4 (because it contains the four arrays) while the length argument for each array is 50 (because they each hold 50 elements).例如,如果你有一个对象,它包含4数组的长度为50,对象的长度参数是4(因为它包含了四个阵列),同时为每个数组的长度参数是50(因为它们各自持有50个元素)。

Unknown-length container types are also supported by the Universal Binary JSON specification and are covered in detail in the Streaming section of this document.未知长度的集装箱类型也支持通用二进制JSON规范,并在流节本文件中详细介绍。
Additionally, the only optional field in the tuple for container types is data , if the container is empty and contains no elements (ie the length is 0) then there is no data segment.此外,只有在容器类型的元组的可选字段是数据 ,如果容器是空的,包含任何元素(即长度为0),那么有没有数据段。

All together, the definitions for the object and array container types looks like this:总之, 对象和数组的容器类型的定义看起来像这样:

Type类型 Size尺寸 Marker标记 Length?长度? Data?数据?
object对象 2-bytes + byte length of data. 2个字节数据的字节长度。 o Ø Yes是 Yes (if non-empty)是(如果非空)
object对象 5-bytes + byte length of data. 5字节数据的字节长度。 O Ø Yes是 Yes (if non-empty)是(如果非空)
array数组 2-bytes + byte length of data. 2个字节数据的字节长度。 a一 Yes是 Yes (if non-empty)是(如果非空)
array数组 5-bytes + byte length of data. 5字节数据的字节长度。 A一 Yes是 Yes (if non-empty)是(如果非空)

array and object can also be specified in a more compact manner using 1-byte for the length when it is <= 254 . 数组和对象也可以指定在一个更紧凑, 长度<= 254时,使用1个字节的方式。 Specifying a length of 255 for the 1-byte variants has a special meaning of length unknown and is covered in more detail in the Streaming section of the spec.指定255个 长度为1字节的变种有一个未知长度的特殊含义,是在更详细地涵盖的流节的规范。
The details for each field are the same as described for the non-container values in the previous section with the one caveat that length is a count of child elements and not the number of bytes representing the contents of the container.每个字段的详细信息是相同的,如在上一节的一个警告 ,长度是一个子元素的计数,而不是代表容器的内容的字节数的非集装箱值所述。

Let's look at a quick example of encoding an object , again using the handy [ ]-notation we used before simply for readability (the [ ] chars are not written out or part of the file format).让我们来看看编码对象的一个简单的例子,再次使用的方便[]符号,我们用简单的可读性([]字符不写出来或部分的文件格式)之前。

Consider the following JSON (30-bytes compacted):考虑下面的JSON(压缩30字节):

{ {
"id" : 1234567890 , “ID”:1234567890,
"name" : "bob" “名”:“鲍勃”
} }
Storing that object in the Universal Binary JSON format would look like this (whitespace added for readability):在通用二进制JSON格式存储对象看起来像这样(空白补充可读性):

[o][2] 2 bytes [O] [2] 2个字节 [s][2][id][I][1234567890] 4 + 5 = 9 bytes [S] [2] [ID] [我] [1234567890] 4 + 5 = 9个字节 [s][4][name][s][3][bob] 6 + 5 = 11 bytes [S] [4] [名称] [S] [3] [鲍勃] 6 + 5 = 11个字节 Our Universal Binary JSON format is 22 bytes, 27% smaller than our compacted JSON!我们的通用二进制JSON格式是22个字节,比我们板结的JSON更小的27% !
Walking through our example above, using a word-journey this is what a parser might see and do:步行通过我们上面的例子,用一个字的旅程,这是一个解析器可能会看到什么,做:

1.I see an “o”, so I know I am parsing an object and that the next byte is the length (or count) for this object.我看到一个“O”,所以我知道我分析的对象 ,下一个字节是此对象的长度 (或计数)。
2.I see a “2″, so I know the object contains 2 elements that I must account for to know when the object scope is closed (because we don't use the { } brackets like JSON).我看到一个“2”,所以我知道该对象包含2个元素,我必须知道何时关闭对象的范围是帐户(,因为我们不使用像JSON的括号{}) 。
3.I see an “s”, knowing how the name-value pairings inside of an object work, I know this is the name portion of some upcoming value.我看到一个“S”,知道如何内的工作对象的名称-值配对,我知道这是一些即将到来的值的名称部分。
4.I see an “I”, I know this is an int32 value and that it belongs to the name I parsed in the previous step.我看到一个“I”,我知道这是一个Int32值,它属于我在前面的步骤解析的名称。
5.I see another “s”, I know this is a new name-value pair and this is the name portion.我看到另一个“S”,我知道这是一个新的名称-值对,这是名称的一部分。
6.I see another “s” and know this is the value belonging to the name I just processed.我看到另一个“S”,知道这是属于我刚刚处理的名称值。
7.I have just parsed 2 values, so now I know the object scope is closed.我刚才解析2个值,所以现在我知道了对象的范围是封闭的。
Encoding objects containing other objects would work identically except we would have encountered another 'o' or 'O' marker and descended a level further into a new object.编码对象包含其他对象的工作相同,我们会遇到另一个“O”或“O”标记下降到一个新的对象的水平进一步的除外。

Let's look at another example, this time a simple JSON array construct (remember, they only contain values and not name-value pairs like objects ).让我们来看看另外一个例子,这个时候一个简单的JSON数组构造(记住,它们只包含价值观和不喜欢的对象名称-值对)。

This array is 48-bytes in compacted JSON:此数组是在压实的JSON 48个字节:

[ [
null , 空 ,
true , 真实 ,
false , 假的 ,
4782345193 , 4782345193,
153.132417549 , 153.132417549,
"ham" “火腿”
] ]
Storing the array in the Universal Binary JSON format would look like this (whitespace added for readability):在通用二进制JSON格式存储阵列看起来像这样(空白补充可读性):

[a][6] - 2 bytes [A] [6] - 2个字节 [Z] - 1 byte [Z] - 1个字节 [T] - 1 byte [T]的 - 1个字节 [F] - 1 byte [F] - 1个字节 [I][4782345193] - 5 bytes [我] [4782345193] - 5个字节 [D][153.132417549] - 9 bytes研究[D] [153.132417549] - 9个字节 [s][3][ham] - 5 bytes [S] [3] [火腿] - 5个字节 Our Universal Binary JSON format is 24 bytes or 50% smaller than the compacted JSON!我们的通用二进制JSON格式是24个字节或50%以上的压实JSON较小!
Because the container types specify their total child element count, it is easier and faster for parsers to know when the scope of a container has closed or is still open waiting for more children (eg in the case of streaming over the network).由于容器类型指定其总的子元素计数,它是为解析器更容易​​和更快知道什么时候一个容器的范围已关闭或等待更多的儿童(如通过网络流的情况下)仍然是开放的。 This is not unlike the high-performance Redis protocol .这是没有什么不同的高性能的再分配协议。

This also has the added benefit of not needing any terminating values in the binary that need to be scanned for to know when a container-scope is closed.这也有额外的好处,不需要任何终止值,需要知道什么时候封闭容器的范围扫描的二进制。 This way data can be read in chunks and not read-and-scanned byte-by-byte.这种方式可以读取数据块和读取和扫描字节逐字节。

As was mentioned previously though, there are some cases where having an unbounded container are important (for example, streaming content from a server as it generates it on-the-fly).由于以前虽然提到,有一些情况,其中有无限的容器,是重要的(例如,流媒体服务器的内容,因为它会产生飞)。

In the next section we will take a look at the Universal Binary JSON constructs that are optimized for streaming.在下一节,我们将在通用二进制JSON流优化结构。 Fortunately, there are only 3 and they are just as easy as the constructs we have covered so far!幸运的是,只有3个,他们也很容易的构造,我们到目前为止所!

Streaming流

--------------------------------------------------------------------------------

The Universal Binary JSON specification is optimized for fast read-speed by prefixing the byte-length of every construct to the front of it, this allows parsers to digest entire chunks of the data stream at a time without scanning for terminating byte values. JSON规范的通用二进制为快速读取速度优化前缀每到它前面的构造的字节长度,这使得解析器消化时间没有终止的字节值扫描整个数据流的块。

Unfortunately, this model of data becomes very expensive (and sometimes impossible) to adhere to in a streaming-friendly environment where a server may be generating UBJ formatted data on-the-fly and streaming it back in real time to the client.不幸的是,这个数据模型变得非常昂贵(有时是不可能的)服务器可能会产生飞UBJ格式的数据和流媒体客户端实时流媒体友好的环境中坚持。

If the server had to adhere to the prefixed-length requirement of this specification up until now, it would have to generate, buffer and count all the elements in its reply before writing out the Universal Binary JSON so it could correctly prefix the lengths to all the containers.如果服务器要坚持的前缀长度的要求,本规范到现在为止,它会生成,缓冲区,并写出通用二进制JSON之前,指望在其答复中的所有元素,因此它可以正确的前缀长度的所有容器。

In this section of the specification we look at 1 new additional type to the Universal Binary JSON specification that compliments our streaming scenario and then two minor changes to the existing container types to enable easy and efficient streaming with unknown-length support for our array and object containers.在这部分的规范,我们期待在1个新的额外的类型的通用二进制JSON规范,致意,我们流的情况下,然后两个现有的容器类型的轻微变化,使简单而有效的与未知的长度为支持我们的数组和对象流容器。

HttpClient josn网络传输(二进制的byte流)
博客分类: JSON
.

现在越来越多的 Java 应用程序需要直接通过 HTTP 协议来访问网络资源 ,今天就来讨论下 json 的传输形式。

Client 客户端

Java代码
1.package httpjson;
2.
3.import java.io.ByteArrayInputStream;
4.import java.io.InputStream;
5.
6.import net.sf.json.JSONObject;
7.
8.import org.apache.commons.httpclient.HttpClient;
9.import org.apache.commons.httpclient.methods.PostMethod;
10.import org.apache.commons.httpclient.params.HttpClientParams;
11.import org.apache.log4j.Logger;
12.import org.junit.Test;
13.
14.
15.public class ClientDemo {
16.
17. private final static Logger _log = Logger.getLogger(ClientDemo.class);
18.
19. @Test
20. public void login(){
21. String url = "http://192.168.0.3:8081/httpjson/demoHttpJson" ;
22. // String url = "http://www.weibo.com.cn" ;
23. JSONObject json = new JSONObject();
24. json.put("username","test");
25. json.put("password", "test");
26. doPostClient(json, url);
27. }
28.
29. @SuppressWarnings("deprecation")
30. public static void doPostClient(JSONObject json ,String url){
31.
32. HttpClient httpClient = new HttpClient();
33. //httpClient.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY);
34. System.setProperty("apache.commons.httpclient.cookiespec","COMPATIBILITY");
35. PostMethod postMethod = new PostMethod(url);
36. InputStream in = new ByteArrayInputStream(json.toString().getBytes());
37. postMethod.setRequestBody(in);
38. HttpClientParams params = new HttpClientParams();
39. params.setConnectionManagerTimeout(10000L);
40. httpClient.setParams(params);
41. try {
42. httpClient.executeMethod(postMethod);
43. //获取二进制的byte流
44. byte[] b = postMethod.getResponseBody();
45. String str = new String(b,"UTF-8");
46. _log.debug("client:"+str);
47. }catch (Exception e) {
48. // TODO: handle exception
49. System.out.println(e.getMessage()+","+e.getStackTrace());
50. }finally{
51. postMethod.releaseConnection();
52. }
53. }
54.
55.}

Service 服务端

Java代码
1.package httpjson;
2.
3.import java.io.ByteArrayOutputStream;
4.import java.io.IOException;
5.import java.io.PrintWriter;
6.
7.import javax.servlet.ServletException;
8.import javax.servlet.ServletInputStream;
9.import javax.servlet.http.HttpServlet;
10.import javax.servlet.http.HttpServletRequest;
11.import javax.servlet.http.HttpServletResponse;
12.
13.import net.sf.json.JSONObject;
14.
15.import org.apache.log4j.Logger;
16.
17./**
18. * Servlet implementation class DemoHttpJson
19. */
20.public class DemoHttpJson extends HttpServlet {
21. private static final long serialVersionUID = 1L;
22.
23. private final static Logger _log = Logger.getLogger(HttpJsonUtil.class);
24. /**
25. * Default constructor.
26. */
27. public DemoHttpJson() {
28. // TODO Auto-generated constructor stub
29. }
30.
31. /**
32. * @see HttpServlet#doGet
33. */
34. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35. // TODO Auto-generated method stub
36. // TODO Auto-generated method stub
37. this.doPost(request, response);
38. }
39.
40. /**
41. * @see HttpServlet#doPost
42. */
43.
44. protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
45. ServletInputStream servletInputStream = request.getInputStream();
46. ByteArrayOutputStream out = new ByteArrayOutputStream ();
47. byte[] b = new byte[1024];
48. int i = 0;
49. // inputStream 转 byte
50. while((i = servletInputStream.read(b,0,1024))>0){
51. out.write(b,0,i);
52. }
53.
54. byte[] req = out.toByteArray();
55.
56. String str = new String(req,"UTF-8");
57. JSONObject reqJson = JSONObject.fromObject(str);
58. JSONObject json = new JSONObject();
59. json.put("VER","1.0");
60. if(reqJson.get("username").equals("demo")){
61. json.put("msg","true");
62. _log.debug("登录成功");
63. }else{
64. json.put("msg","false");
65. _log.debug("登录失败");
66. }
67.
68. PrintWriter pw = response.getWriter();
69. pw.write(json.toString());
70. }
71.
72.}

执行 public void login()
控制台日志

Java代码
1.service log
2.[11/10/11 00:09:48] [DemoHttpJson-DEBUG 64] 登录失败
3.
4.
5.client log
6.[11/10/11 00:09:48] [ClientDemo-DEBUG 46] client:
7.{"VER":"1.0","msg":"false"}

转载 json 文章相关推荐

  1. CSDN转载别人文章的详细步骤

    经常遇到一篇很好的文章,但是CSDN没有转载功能,所以需要我们自己处理一下. 目录 一.找到原文,右键点击审查元素(有的浏览器是检查) 二.点击下图箭头位置 三.再点击需要转载的文章的标题 四.完成上 ...

  2. 转载--json调用示例

    转载--json调用示例 json的常用数据格式 { name:value }  Object , 键值对形式的对象 [ Object,Object ] 对象数组 示例: var  o=[{" ...

  3. 公众号openid能做用户识别_做公众号能不能转载别人文章?我的建议是...

    源自:做公众号能不能转载别人文章?我的建议是... 经常有人问: 做公众号能不能转载其他号的文章?会不会不好? 首先抛出我的观点: 能,肯定的. 容我简单说一下: 1 转载不是什么丢人的事,恰恰相反, ...

  4. 做公众号能不能转载别人文章做文章素材?

    常常有人问: 做微信公众号能不能转载其他号的文章?会不会欠好? 首要抛出我的观念: 能,必定的. 容我简单说一下: 1.转载不是什么丢人的事,恰恰相反,只需随意看一些大号就会发现,他们每天都需求转载, ...

  5. 数据的游戏:冰与火--转载本站文章请注明作者和出处 酷壳 – CoolShell.cn ,请勿用于任何商业用途

    我对数据挖掘和机器学习是新手,从去年7月份在Amazon才开始接触,而且还是因为工作需要被动接触的,以前都没有接触过,做的是需求预测机器学习相关的.后来,到了淘宝后,自己凭兴趣主动地做了几个月的和用户 ...

  6. 做公众号能不能转载别人文章做文章素材?我的建议是...

    常常有人问: 做微信公众号能不能转载其他号的文章?会不会欠好? 首要抛出我的观念: 能,必定的. 容我简单说一下: 1.转载不是什么丢人的事,恰恰相反,只需随意看一些大号就会发现,他们每天都需求转载, ...

  7. 企业微信 添加白名单_微信公众号如何加白名单账号授权转载原创文章?,需要技巧...

    工具/材料 微信公众号.网络 电脑等 操作方法 01 在微信公众平台登录入口,输入账号,进入公众号后台,如下图所示. 02 在公众号后台,在功能下找到并点击"原创声明功能",如下图 ...

  8. CSDN转载别人文章的操作

    说在前面 对于喜欢逛CSDN的人来说,看别人的博客确实能够对自己有不小的提高.有时候看到特别好的博客想转载,但是不能一个字一个字的敲,一张图片一张图片的截图,这样怪麻烦也浪费时间.这时候我们就想转载别 ...

  9. [转载] json字符串转list_Python入门进阶教程JSON操作

    参考链接: python json 0: 入门介绍 「关注我,和我一起放下灵魂,让灵魂去搬砖.」 作者:一叶 介绍:放不下灵魂的搬砖者 全文共1225字,阅读全文需6分钟 Python版本3.8.0, ...

最新文章

  1. C++关键字deprecated
  2. 用好MySQL的21个好习惯!
  3. 苹果因芯片短缺优先生产iPhone 13 常规iPad平均交付时间超7周
  4. three.js两个点给线条加宽度_2020湘乡线条立体逼真方兴装饰诚信服务
  5. 存储过程中ORA-01031: insufficient privileges的解决方法
  6. 洛谷3916 图的遍历
  7. 专业软件 —— Adobe Audition
  8. go set up on ubuntu
  9. Redo Log的逻辑与物理结构
  10. 数据挖掘学习07 - 《数据挖掘导论》第二章:数据
  11. MySQL常用语句总结
  12. 拼多多API接口:item_search - 根据关键词取商品列表
  13. linux 移动硬盘 mac,Mac下使用NTFS格式的移动硬盘
  14. 迭代阈值法 matlab,MATLAB快速迭代收缩阈值算法
  15. 防盗报警器c语言程序,(完整版)基于单片机的家庭防盗报警系统doc毕业论文
  16. python三国演义人物出场统计txt文本_python实例:三国演义TXT文本词频分析
  17. 领悟书生写论坛之类图设计
  18. PS怎样把低像素图片变成高像素图片
  19. 铸造工艺问题6——砂型涂料多厚,刷几次?芯头斜度?新旧砂的作用树脂、固化剂的作用
  20. 数据库的行格式ROW_FORMAT

热门文章

  1. django-生鲜商城项目笔记
  2. Oracle 体系结构(8)—— Oracle 的审计文件(Audit files)
  3. 致Andorid初学者-从入门到精通,这一篇文带你省略学习路上的歪歪扭扭
  4. ArcGIS打开山东天地图WMTS服务
  5. sfc流程图怎么画_GX Works2编程软件SFC流程图编写
  6. 无法启动此应用因为计算机丢失,解决提示“无法启动此程序,因为计算机中丢失chrome_elf.dll”的问题...
  7. 安装centOS7报未知错误
  8. Labview中数据类型转换
  9. taobao.top.oaid.decrypt( OAID解密 )淘宝开放平台店铺订单解密接口,店铺订单明文接口,店铺订单买家信息解密接口对接教程
  10. echarts图表刚加载进来缩在一起