CBOR

Concise Binary Object Representation (amb acrònim anglès CBOR) és un format de serialització de dades binàries basat lliurement en JSON de C. Bormann. Igua

CBOR
CBOR

Tipusformat de serialització de dades i format de fitxer Modifica el valor a Wikidata
Versió inicial
2013 Modifica el valor a Wikidata
Més informació
Lloc webcbor.io (anglès) Modifica el valor a Wikidata

Concise Binary Object Representation (amb acrònim anglès CBOR) és un format de serialització de dades binàries basat lliurement en JSON de C. Bormann. Igual que JSON, permet la transmissió d'objectes de dades que contenen parells nom-valor, però d'una manera més concisa. Això augmenta la velocitat de processament i transferència a costa de la llegibilitat humana. Està definit a IETF.[1]

Entre altres usos, és la capa de serialització de dades recomanada per a la suite de protocols CoAP Internet of Things[2] i el format de dades en què es basen els missatges COSE. També s'utilitza en el protocol client a autenticador (CTAP) dins l'àmbit del projecte FIDO2.[3]

CBOR es va inspirar en MessagePack, que va ser desenvolupat i promogut per Sadayuki Furuhashi. CBOR va ampliar MessagePack, sobretot permetent distingir les cadenes de text de les cadenes de bytes, que es va implementar el 2013 a MessagePack.[4][5]

Dades del CBOR Element de dades 1 Element de dades 2
Recompte de bytes 1 byte (capçalera de l'element de dades CBOR) Variable Variable 1 byte (capçalera de l'element de dades CBOR) Variable Variable
Estructura Tipus major Recompte curt Recompte ampliat (opcional) Càrrega útil de dades (opcional) Tipus major Recompte curt Recompte ampliat (opcional) Càrrega útil de dades (opcional)
Recompte de bits 3 bits 5 bits 8 bits × variable 8 bits × variable 3 bits 5 bits 8 bits × variable 8 bits × variable

Referències

  1. «CBOR — Concise Binary Object Representation | Overview» (en anglès).
  2. «CoAP — Constrained Application Protocol | Overview» (en anglès). Arxivat de l'original el 2017-01-03. [Consulta: 19 novembre 2022].
  3. «FIDO2 Project» (en anglès). FIDO Alliance. [Consulta: 11 maig 2018].
  4. «Discussions on the upcoming MessagePack spec that adds the string type to the protocol». GitHub. [Consulta: 4 gener 2022].
  5. «RFC 8949: Concise Binary Object Representation (CBOR)». IETF, 01-12-2020.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.