Skip to content

Commit c0cac7c

Browse files
authored
CBOR: update RFC number and corresponding links (#3088)
RFC 8949 obsoleted RFC 7049 some time ago. Yet our documentation refers to 7049 instead of 8949. This change updates the RFC number and replaces links to point to recent RFC.
1 parent 40ce547 commit c0cac7c

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

docs/formats.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ stable, these are currently experimental features of Kotlin Serialization.
4040

4141
## CBOR (experimental)
4242

43-
[CBOR][RFC 7049] is one of the standard compact binary
43+
[CBOR][RFC 8949] is one of the standard compact binary
4444
encodings for JSON, so it supports a subset of [JSON features](json.md) and
4545
is generally very similar to JSON in use, but produces binary data.
4646

@@ -157,7 +157,7 @@ BF # map(*)
157157

158158
### Byte arrays and CBOR data types
159159

160-
Per the [RFC 7049 Major Types] section, CBOR supports the following data types:
160+
Per the [RFC 8949 Major Types] section, CBOR supports the following data types:
161161

162162
- Major type 0: an unsigned integer
163163
- Major type 1: a negative integer
@@ -1607,9 +1607,9 @@ This chapter concludes [Kotlin Serialization Guide](serialization-guide.md).
16071607

16081608

16091609
<!-- references -->
1610-
[RFC 7049]: https://tools.ietf.org/html/rfc7049
1610+
[RFC 8949]: https://tools.ietf.org/html/rfc8949
16111611
[IoT]: https://en.wikipedia.org/wiki/Internet_of_things
1612-
[RFC 7049 Major Types]: https://tools.ietf.org/html/rfc7049#section-2.1
1612+
[RFC 8949 Major Types]: https://tools.ietf.org/html/rfc8949#section-3.1
16131613

16141614
<!-- Java references -->
16151615
[java.io.DataOutput]: https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html

dokka/moduledoc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Extensions for kotlinx.serialization.json.Json for integration with the [kotlinx
1414
Currently experimental.
1515

1616
# Module kotlinx-serialization-cbor
17-
Concise Binary Object Representation (CBOR) format implementation, as per [RFC 7049](https://tools.ietf.org/html/rfc7049).
17+
Concise Binary Object Representation (CBOR) format implementation, as per [RFC 8949](https://tools.ietf.org/html/rfc8949).
1818

1919
# Module kotlinx-serialization-hocon
2020
Allows deserialization of `Config` object from popular [lightbend/config](https://github.com/lightbend/config) library
@@ -66,4 +66,4 @@ Experimental generator of ProtoBuf schema from Kotlin classes.
6666
Properties serialization format implementation that represents the input data as a plain map of properties.
6767

6868
# Package kotlinx.serialization.cbor
69-
Concise Binary Object Representation (CBOR) format implementation, as per [RFC 7049](https://tools.ietf.org/html/rfc7049).
69+
Concise Binary Object Representation (CBOR) format implementation, as per [RFC 8949](https://tools.ietf.org/html/rfc8949).

formats/cbor/commonMain/src/kotlinx/serialization/cbor/ByteString.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import kotlinx.serialization.*
1818
* )
1919
* ```
2020
*
21-
* See [RFC 7049 2.1. Major Types](https://tools.ietf.org/html/rfc7049#section-2.1).
21+
* See [RFC 8949 3.1. Major Types](https://tools.ietf.org/html/rfc8949#section-3.1).
2222
*/
2323
@SerialInfo
2424
@Target(AnnotationTarget.PROPERTY)

formats/cbor/commonMain/src/kotlinx/serialization/cbor/Cbor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import kotlinx.serialization.modules.*
1010

1111
/**
1212
* Implements [encoding][encodeToByteArray] and [decoding][decodeFromByteArray] classes to/from bytes
13-
* using [CBOR](https://tools.ietf.org/html/rfc7049) specification.
13+
* using [CBOR](https://tools.ietf.org/html/rfc8949) specification.
1414
* It is typically used by constructing an application-specific instance, with configured behaviour, and,
1515
* if necessary, registered custom serializers (in [SerializersModule] provided by [serializersModule] constructor parameter).
1616
*

formats/cbor/commonMain/src/kotlinx/serialization/cbor/internal/Decoder.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ internal class CborParser(private val input: ByteArrayInput, private val verifyO
481481
/**
482482
* Determines if [curByte] represents an indefinite length CBOR item.
483483
*
484-
* Per [RFC 7049: 2.2. Indefinite Lengths for Some Major Types](https://tools.ietf.org/html/rfc7049#section-2.2):
484+
* Per [RFC 8949: 3.2. Indefinite Lengths for Some Major Types](https://tools.ietf.org/html/rfc8949#section-3.2):
485485
* > Four CBOR items (arrays, maps, byte strings, and text strings) can be encoded with an indefinite length
486486
*/
487487
private fun isIndefinite(): Boolean {
@@ -576,7 +576,7 @@ private val normalizeBaseBits = SINGLE_PRECISION_NORMALIZE_BASE.toBits()
576576

577577

578578
/*
579-
* For details about half-precision floating-point numbers see https://tools.ietf.org/html/rfc7049#appendix-D
579+
* For details about half-precision floating-point numbers see https://tools.ietf.org/html/rfc8949#name-half-precision
580580
*/
581581
private fun floatFromHalfBits(bits: Short): Float {
582582
val intBits = bits.toInt()

0 commit comments

Comments
 (0)