Misplaced Pages

MessagePack

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

MessagePack is a computer data interchange format. It is a binary form for representing simple data structures like arrays and associative arrays . MessagePack aims to be as compact and simple as possible. The official implementation is available in a variety of languages, some official libraries and others community created, such as C , C++ , C# , D , Erlang , Go , Haskell , Java , JavaScript ( NodeJS ), Lua , OCaml , Perl , PHP , Python , Ruby , Rust , Scala , Smalltalk , and Swift .

#680319

67-518: Data structures processed by MessagePack loosely correspond to those used in JSON format. They consist of the following element types: MessagePack is more compact than JSON , but imposes limitations on array and integer sizes. On the other hand, it allows binary data and non-UTF-8 encoded strings. In JSON, map keys have to be strings, but in MessagePack there is no such limitation and any type can be

134-750: A configuration language . However, it does not support comments . In 2012, Douglas Crockford, JSON creator, had this to say about comments in JSON when used as a configuration language: "I know that the lack of comments makes some people sad, but it shouldn't. Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser." MongoDB uses JSON-like data for its document-oriented database . Some relational databases, such as PostgreSQL and MySQL, have added support for native JSON data types. This allows developers to store JSON data directly in

201-455: A JSON-based format to define the structure of JSON data for validation, documentation, and interaction control. It provides a contract for the JSON data required by a given application and how that data can be modified. JSON Schema is based on the concepts from XML Schema (XSD) but is JSON-based. As in XSD, the same serialization/deserialization tools can be used both for the schema and data, and it

268-573: A browser side plug-in with a proprietary messaging format to manipulate DHTML elements (this system is also owned by 3DO ). Upon discovery of early Ajax capabilities, digiGroups, Noosh, and others used frames to pass information into the user browsers' visual field without refreshing a Web application's visual context, realizing real-time rich Web applications using only the standard HTTP, HTML, and JavaScript capabilities of Netscape 4.0.5+ and Internet Explorer 5+. Crockford then found that JavaScript could be used as an object-based messaging format for such

335-513: A company cofounded by Crockford and others in March 2001. The cofounders agreed to build a system that used standard browser capabilities and provided an abstraction layer for Web developers to create stateful Web applications that had a persistent duplex connection to a Web server by holding two Hypertext Transfer Protocol (HTTP) connections open and recycling them before standard browser time-outs if no further data were exchanged. The cofounders had

402-542: A document is submitted directly for approval as a draft International Standard (DIS) to the ISO member bodies or as a final draft International Standard (FDIS), if the document was developed by an international standardizing body recognized by the ISO Council. The first step, a proposal of work (New Proposal), is approved at the relevant subcommittee or technical committee (e.g., SC 29 and JTC 1 respectively in

469-442: A long process that commonly starts with the proposal of new work within a committee. Some abbreviations used for marking a standard with its status are: Abbreviations used for amendments are: Other abbreviations are: International Standards are developed by ISO technical committees (TC) and subcommittees (SC) by a process with six steps: The TC/SC may set up working groups  (WG) of experts for

536-533: A lot of argument about how you pronounce that, but I strictly don't care." After RFC 4627 had been available as its "informational" specification since 2006, JSON was first standardized in 2013, as ECMA -404. RFC 8259, published in 2017, is the current version of the Internet Standard STD 90, and it remains consistent with ECMA-404. That same year, JSON was also standardized as ISO/IEC 21778:2017. The ECMA and ISO/IEC standards describe only

603-494: A map key, including types like maps and arrays, and, like YAML , numbers. Compared to BSON , MessagePack is more space-efficient. BSON is designed for fast in-memory manipulation, whereas MessagePack is designed for efficient transmission over the wire. For example, BSON requires null terminators at the end of all strings and inserts string indexes for list elements, while MessagePack doesn't. BSON represents both arrays and maps internally as documents, which are maps, where an array

670-467: A practice which would have destroyed interoperability." JSON disallows "trailing commas", a comma after the last value inside a data structure. Trailing commas are a common feature of JSON derivatives to improve ease of use. RFC 8259 describes certain aspects of JSON syntax that, while legal per the specifications, can cause interoperability problems. In 2015, the IETF published RFC 7493, describing

737-548: A proposal to form a new global standards body. In October 1946, ISA and UNSCC delegates from 25 countries met in London and agreed to join forces to create the International Organization for Standardization. The organization officially began operations on 23 February 1947. ISO Standards were originally known as ISO Recommendations ( ISO/R ), e.g., " ISO 1 " was issued in 1951 as "ISO/R 1". ISO

SECTION 10

#1732790977681

804-572: A relational database without having to convert it to another data format. JSON being a subset of JavaScript can lead to the misconception that it is safe to pass JSON texts to the JavaScript eval () function. This is not safe, due to certain valid JSON texts, specifically those containing U+2028 LINE SEPARATOR or U+2029 PARAGRAPH SEPARATOR , not being valid JavaScript code until JavaScript specifications were updated in 2019, and so older engines may not support it. To avoid

871-436: A relatively small number of standards, ISO standards are not available free of charge, but rather for a purchase fee, which has been seen by some as unaffordable for small open-source projects. The process of developing standards within ISO was criticized around 2007 as being too difficult for timely completion of large and complex standards, and some members were failing to respond to ballots, causing problems in completing

938-424: A replacement for XML-RPC or SOAP . It is a simple protocol that defines only a handful of data types and commands. JSON-RPC lets a system send notifications (information to the server that does not require a response) and multiple calls to the server that can be answered out of order. Asynchronous JavaScript and JSON (or AJAJ) refers to the same dynamic web page methodology as Ajax , but instead of XML , JSON

1005-613: A round-table discussion and voted on whether to call the data format JSML (JavaScript Markup Language) or JSON (JavaScript Object Notation), as well as under what license type to make it available. The JSON.org website was launched in 2001. In December 2005, Yahoo! began offering some of its Web services in JSON. A precursor to the JSON libraries was used in a children's digital asset trading game project named Cartoon Orbit at Communities.com (the State cofounders had all worked at this company previously) for Cartoon Network , which used

1072-526: A schema to define the data types. Protocol Buffers compiler creates boilerplate code in the target language to facilitate integration of serialization into the application code; MessagePack returns only a dynamically typed data structure and provides no automatic structure checks. MessagePack is referenced in RFC   7049 of CBOR . JSON JSON ( JavaScript Object Notation , pronounced / ˈ dʒ eɪ s ən / or / ˈ dʒ eɪ ˌ s ɒ n / )

1139-469: A single value and each attribute can appear at most once on each element. XML separates "data" from "metadata" (via the use of elements and attributes), while JSON does not have such a concept. Another key difference is the addressing of values. JSON has objects with a simple "key" to "value" mapping, whereas in XML addressing happens on "nodes", which all receive a unique ID via the XML processor. Additionally,

1206-553: A system. The system was sold to Sun Microsystems , Amazon.com , and EDS . JSON was based on a subset of the JavaScript scripting language (specifically, Standard ECMA -262 3rd Edition—December 1999 ) and is commonly used with JavaScript, but it is a language-independent data format. Code for parsing and generating JSON data is readily available in many programming languages . JSON's website lists JSON libraries by language. In October 2013, Ecma International published

1273-510: A valid JSON text must consist of only an object or an array type, which could contain other types within them. This restriction was dropped in RFC   7158 , where a JSON text was redefined as any serialized value. Numbers in JSON are agnostic with regard to their representation within programming languages. While this allows for numbers of arbitrary precision to be serialized, it may lead to portability issues. For example, since no differentiation

1340-447: Is "pronounced / ˈ dʒ eɪ . s ə n / , as in ' Jason and The Argonauts ' ". The first (2013) edition of ECMA-404 did not address the pronunciation. The UNIX and Linux System Administration Handbook states, " Douglas Crockford , who named and promoted the JSON format, says it's pronounced like the name Jason. But somehow, 'JAY-sawn' seems to have become more common in the technical community." Crockford said in 2011, "There's

1407-637: Is "to develop worldwide Information and Communication Technology (ICT) standards for business and consumer applications." There was previously also a JTC 2 that was created in 2009 for a joint project to establish common terminology for "standardization in the field of energy efficiency and renewable energy sources". It was later disbanded. As of 2022 , there are 167 national members representing ISO in their country, with each country having only one member. ISO has three membership categories, Participating members are called "P" members, as opposed to observing members, who are called "O" members. ISO

SECTION 20

#1732790977681

1474-489: Is a map with keys as decimal strings counting up from 0. MessagePack on the other hand represents both maps and arrays as arrays, where each map key-value pair is contiguous, making odd items keys and even items values. The Protocol Buffers format provides a significantly more compact transmission format than MessagePack because it doesn't transmit field names. However, while JSON and MessagePack aim to serialize arbitrary data structures with type tags, Protocol Buffers requires

1541-466: Is a voluntary organization whose members are recognized authorities on standards, each one representing one country. Members meet annually at a General Assembly to discuss the strategic objectives of ISO. The organization is coordinated by a central secretariat based in Geneva . A council with a rotating membership of 20 member bodies provides guidance and governance, including setting the annual budget of

1608-464: Is abused, ISO should halt the process... ISO is an engineering old boys club and these things are boring so you have to have a lot of passion ... then suddenly you have an investment of a lot of money and lobbying and you get artificial results. The process is not set up to deal with intensive corporate lobbying and so you end up with something being a standard that is not clear. International Workshop Agreements (IWAs) are documents that establish

1675-514: Is allowed and ignored around or between syntactic elements (values and punctuation, but not within a string value). Four specific characters are considered whitespace for this purpose: space , horizontal tab , line feed , and carriage return . In particular, the byte order mark must not be generated by a conforming implementation (though it may be accepted when parsing JSON). JSON does not provide syntax for comments . Early versions of JSON (such as specified by RFC   4627 ) required that

1742-520: Is also valid JavaScript syntax. The specification was started in 2012 and finished in 2018 with version 1.0.0. The main differences to JSON syntax are: JSON5 syntax is supported in some software as an extension of JSON syntax, for instance in SQLite . JSONC (JSON with Comments) is a subset of JSON5 used in Microsoft's Visual Studio Code : Several serialization formats have been built on or from

1809-401: Is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of name–value pairs and arrays (or other serializable values). It is a commonly used data format with diverse uses in electronic data interchange , including that of web applications with servers . JSON is a language-independent data format. It

1876-517: Is an abbreviation for "International Standardization Organization" or a similar title in another language, the letters do not officially represent an acronym or initialism . The organization provides this explanation of the name: Because 'International Organization for Standardization' would have different acronyms in different languages (IOS in English, OIN in French), our founders decided to give it

1943-521: Is approved as an International Standard (IS) if a two-thirds majority of the P-members of the TC/SC is in favour and not more than one-quarter of the total number of votes cast are negative. After approval, the document is published by the ISO central secretariat , with only minor editorial changes introduced in the publication process before the publication as an International Standard. Except for

2010-522: Is funded by a combination of: International standards are the main products of ISO. It also publishes technical reports, technical specifications, publicly available specifications, technical corrigenda (corrections), and guides. International standards Technical reports For example: Technical and publicly available specifications For example: Technical corrigenda ISO guides For example: ISO documents have strict copyright restrictions and ISO charges for most copies. As of 2020 ,

2077-422: Is made between integer and floating-point values, some implementations may treat 42 , 42.0 , and 4.2E+1 as the same number, while others may not. The JSON standard makes no requirements regarding implementation details such as overflow , underflow , loss of precision, rounding, or signed zeros , but it does recommend expecting no more than IEEE 754 binary64 precision for "good interoperability". There

MessagePack - Misplaced Pages Continue

2144-405: Is necessary is the serialization of data types that are not part of the JSON standard, for example, dates and regular expressions . The official MIME type for JSON text is application/json , and most modern implementations have adopted this. Legacy MIME types include text/json , text/x-json , and text/javascript . The standard filename extension is .json. JSON Schema specifies

2211-535: Is no inherent precision loss in serializing a machine-level binary representation of a floating-point number (like binary64) into a human-readable decimal representation (like numbers in JSON) and back since there exist published algorithms to do this exactly and optimally. Comments were intentionally excluded from JSON. In 2012, Douglas Crockford described his design decision thus: "I removed comments from JSON because I saw people were using them to hold parsing directives,

2278-401: Is not a data interchange language. CBOR has a superset of the JSON data types, but it is not text-based. Ion is also a superset of JSON, with a wider range of primary types, annotations, comments, and allowing trailing commas. XML has been used to describe structured data and to serialize objects. Various XML-based protocols exist to represent the same kind of data structures as JSON for

2345-465: Is not the fifth version of JSON). YAML version 1.2 is a superset of JSON; prior versions were not strictly compatible. For example, escaping a slash / with a backslash \ is valid in JSON, but was not valid in YAML. YAML supports comments, while JSON does not. CSON (" CoffeeScript Object Notation") uses significant indentation , unquoted keys, and assumes an outer object declaration. It

2412-425: Is produced, for example, for audio and video coding standards is called a verification model (VM) (previously also called a "simulation and test model"). When a sufficient confidence in the stability of the standard under development is reached, a working draft (WD) is produced. This is in the form of a standard, but is kept internal to working group for revision. When a working draft is sufficiently mature and

2479-617: Is restricted. The organization that is known today as ISO began in 1926 as the International Federation of the National Standardizing Associations ( ISA ), which primarily focused on mechanical engineering . The ISA was suspended in 1942 during World War II but, after the war, the ISA was approached by the recently-formed United Nations Standards Coordinating Committee (UNSCC) with

2546-452: Is self-describing. It is specified in an Internet Draft at the IETF, with the latest version as of 2024 being "Draft 2020-12". There are several validators available for different programming languages, each with varying levels of conformance. The JSON standard does not support object references , but an IETF draft standard for JSON-based object references exists. JSON-RPC is a remote procedure call (RPC) protocol built on JSON, as

2613-472: Is the data format. AJAJ is a web development technique that provides for the ability of a web page to request new data after it has loaded into the web browser . Typically, it renders new data from the server in response to user actions on that web page. For example, what the user types into a search box , client-side code then sends to the server, which immediately responds with a drop-down list of matching database items. JSON has seen ad hoc usage as

2680-655: The International Electrotechnical Commission . It is headquartered in Geneva , Switzerland. The three official languages of ISO are English , French , and Russian . The International Organization for Standardization in French is Organisation internationale de normalisation and in Russian, Международная организация по стандартизации ( Mezhdunarodnaya organizatsiya po standartizatsii ). Although one might think ISO

2747-551: The Internet Engineering Task Force obsoleted RFC   7159 when it published RFC   8259 , which is the current version of the Internet Standard STD 90. Crockford added a clause to the JSON license stating, "The Software shall be used for Good, not Evil", in order to open-source the JSON libraries while mocking corporate lawyers and those who are overly pedantic. On the other hand, this clause led to license compatibility problems of

MessagePack - Misplaced Pages Continue

2814-523: The Unicode line terminators U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR to appear unescaped in quoted strings, while ECMAScript 2018 and older do not. This is a consequence of JSON disallowing only "control characters". For maximum portability, these characters should be backslash-escaped. JSON exchange in an open ecosystem must be encoded in UTF-8 . The encoding supports

2881-411: The "I-JSON Message Format", a restricted profile of JSON that constrains the syntax and processing of JSON to avoid, as much as possible, these interoperability issues. While JSON provides a syntactic framework for data interchange, unambiguous data interchange also requires agreement between producer and consumer on the semantics of specific use of the JSON syntax. One example of where such an agreement

2948-438: The JSON license with other open-source licenses since open-source software and free software usually imply no restrictions on the purpose of use. The following example shows a possible JSON representation describing a person. Although Crockford originally asserted that JSON is a strict subset of JavaScript and ECMAScript , his specification actually allows valid JSON documents that are not valid JavaScript; JSON allows

3015-561: The JSON specification. Examples include ISO Early research and development: Merging the networks and creating the Internet: Commercialization, privatization, broader access leads to the modern Internet: Examples of Internet services: The International Organization for Standardization ( ISO / ˈ aɪ s oʊ / ) is an independent, non-governmental , international standard development organization composed of representatives from

3082-447: The XML standard defines a common attribute xml:id , that can be used by the user, to set an ID explicitly. XML tag names cannot contain any of the characters !"#$ %&'()*+,/;<=>?@[\]^`{|}~ , nor a space character, and cannot begin with - , . , or a numeric digit, whereas JSON keys can (even if quotation mark and backslash must be escaped). XML values are strings of characters , with no built-in type safety . XML has

3149-450: The allowed syntax, whereas the RFC covers some security and interoperability considerations. JSON grew out of a need for a real-time server-to-browser session communication protocol without using browser plugins such as Flash or Java applets, the dominant methods used in the early 2000s. Crockford first specified and popularized the JSON format. The acronym originated at State Software,

3216-491: The case of MPEG, the Moving Picture Experts Group ). A working group (WG) of experts is typically set up by the subcommittee for the preparation of a working draft (e.g., MPEG is a collection of seven working groups as of 2023). When the scope of a new work is sufficiently clarified, some of the working groups may make an open request for proposals—known as a "call for proposals". The first document that

3283-418: The central secretariat. The technical management board is responsible for more than 250 technical committees , who develop the ISO standards. ISO has a joint technical committee (JTC) with the International Electrotechnical Commission (IEC) to develop standards relating to information technology (IT). Known as JTC 1 and entitled "Information technology", it was created in 1987 and its mission

3350-553: The concept of schema , that permits strong typing, user-defined types, predefined tags, and formal structure, allowing for formal validation of an XML stream. JSON has several types built-in and has a similar schema concept in JSON Schema . XML supports comments, while JSON does not. Support for comments and other features have been deemed useful, which has led to several nonstandard JSON supersets being created. Among them are HJSON, HOCON, and JSON5 (which despite its name,

3417-421: The confidence people have in the standards setting process", and alleged that ISO did not carry out its responsibility. He also said that Microsoft had intensely lobbied many countries that traditionally had not participated in ISO and stacked technical committees with Microsoft employees, solution providers, and resellers sympathetic to Office Open XML: When you have a process built on trust and when that trust

SECTION 50

#1732790977681

3484-413: The document, the draft is then approved for submission as a Final Draft International Standard (FDIS) if a two-thirds majority of the P-members of the TC/SC are in favour and if not more than one-quarter of the total number of votes cast are negative. ISO will then hold a ballot among the national bodies where no technical changes are allowed (a yes/no final approval ballot), within a period of two months. It

3551-437: The first edition of its JSON standard ECMA-404. That same year, RFC   7158 used ECMA-404 as a reference. In 2014, RFC   7159 became the main reference for JSON's Internet uses, superseding RFC   4627 and RFC   7158 (but preserving ECMA-262 and ECMA-404 as main references). In November 2017, ISO/IEC JTC 1/SC 22 published ISO/IEC 21778:2017 as an international standard. On December 13, 2017,

3618-616: The full Unicode character set, including those characters outside the Basic Multilingual Plane (U+0000 to U+FFFF). However, if escaped, those characters must be written using UTF-16 surrogate pairs . For example, to include the Emoji character U+1F610 😐 NEUTRAL FACE in JSON: JSON became a strict subset of ECMAScript as of the language's 2019 revision. JSON's basic data types are: Whitespace

3685-481: The language's 2019 revision. Various JSON parser implementations have suffered from denial-of-service attack and mass assignment vulnerability . JSON is promoted as a low-overhead alternative to XML as both of these formats have widespread support for creation, reading, and decoding in the real-world situations where they are commonly used. Apart from XML, examples could include CSV and supersets of JSON. Google Protocol Buffers can fill this role, although it

3752-520: The many pitfalls caused by executing arbitrary code from the Internet, a new function, JSON . parse () , was first added to the fifth edition of ECMAScript, which as of 2017 is supported by all major browsers. For non-supported browsers, an API-compatible JavaScript library is provided by Douglas Crockford . In addition, the TC39 proposal "Subsume JSON" made ECMAScript a strict JSON superset as of

3819-860: The national standards organizations of member countries. Membership requirements are given in Article 3 of the ISO Statutes. ISO was founded on 23 February 1947, and (as of July 2024 ) it has published over 25,000 international standards covering almost all aspects of technology and manufacturing. It has over 800 technical committees (TCs) and subcommittees (SCs) to take care of standards development. The organization develops and publishes international standards in technical and nontechnical fields, including everything from manufactured products and technology to food safety, transport, IT, agriculture, and healthcare. More specialized topics like electrical and electronic engineering are instead handled by

3886-721: The necessary steps within the prescribed time limits. In some cases, alternative processes have been used to develop standards outside of ISO and then submit them for its approval. A more rapid "fast-track" approval procedure was used in ISO/IEC JTC 1 for the standardization of Office Open XML (OOXML, ISO/IEC 29500, approved in April 2008), and another rapid alternative "publicly available specification" (PAS) process had been used by OASIS to obtain approval of OpenDocument as an ISO/IEC standard (ISO/IEC 26300, approved in May 2006). As

3953-492: The next stage, called the "enquiry stage". After a consensus to proceed is established, the subcommittee will produce a draft international standard (DIS), and the text is submitted to national bodies for voting and comment within a period of five months. A document in the DIS stage is available to the public for purchase and may be referred to with its ISO DIS reference number. Following consideration of any comments and revision of

4020-411: The preparation of a working drafts. Subcommittees may have several working groups, which may have several Sub Groups (SG). It is possible to omit certain stages, if there is a document with a certain degree of maturity at the start of a standardization project, for example, a standard developed by another organization. ISO/IEC directives also allow the so-called "Fast-track procedure". In this procedure,

4087-427: The same kind of data interchange purposes. Data can be encoded in XML in several ways. The most expansive form using tag pairs results in a much larger (in character count) representation than JSON, but if data is stored in attributes and 'short tag' form where the closing tag is replaced with /> , the representation is often about the same size as JSON or just a little larger. However, an XML attribute can only have

SECTION 60

#1732790977681

4154-472: The short form ISO . ISO is derived from the Greek word isos ( ίσος , meaning "equal"). Whatever the country, whatever the language, the short form of our name is always ISO . During the founding meetings of the new organization, however, the Greek word explanation was not invoked, so this meaning may be a false etymology . Both the name ISO and the ISO logo are registered trademarks and their use

4221-509: The subcommittee is satisfied that it has developed an appropriate technical document for the problem being addressed, it becomes a committee draft (CD) and is sent to the P-member national bodies of the SC for the collection of formal comments. Revisions may be made in response to the comments, and successive committee drafts may be produced and circulated until consensus is reached to proceed to

4288-414: The typical cost of a copy of an ISO standard is about US$ 120 or more (and electronic copies typically have a single-user license, so they cannot be shared among groups of people). Some standards by ISO and its official U.S. representative (and, via the U.S. National Committee, the International Electrotechnical Commission ) are made freely available. A standard published by ISO/IEC is the last stage of

4355-410: Was derived from JavaScript , but many modern programming languages include code to generate and parse JSON-format data. JSON filenames use the extension .json . Douglas Crockford originally specified the JSON format in the early 2000s. He and Chip Morningstar sent the first JSON message in April 2001. The 2017 international standard (ECMA-404 and ISO/IEC 21778:2017) specifies that "JSON"

4422-517: Was suggested at the time by Martin Bryan, the outgoing convenor (chairman) of working group 1 (WG1) of ISO/IEC JTC 1/SC 34 , the rules of ISO were eventually tightened so that participating members that fail to respond to votes are demoted to observer status. The computer security entrepreneur and Ubuntu founder, Mark Shuttleworth , was quoted in a ZDNet blog article in 2008 about the process of standardization of OOXML as saying: "I think it de-values

4489-426: Was used for configuring GitHub 's Atom text editor . There is also an unrelated project called CSON ("Cursive Script Object Notation") that is more syntactically similar to JSON. HOCON ("Human-Optimized Config Object Notation") is a format for human-readable data, and a superset of JSON. The uses of HOCON are: JSON5 ("JSON5 Data Interchange Format") is an extension of JSON syntax that, just like JSON,

#680319