Add MapBufferList entry type to MapBuffer (#57360)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57360

Introduces a dedicated `MapBufferList` `DataType` for an ordered array of nested MapBuffers, instead of overloading the `Map` type for lists. This makes a list of MapBuffers self-describing and distinguishable from a single nested `Map` (they were byte-distinct in payload but previously shared the `Map` type tag). Updates the C++ builder (`putMapBufferList`), the Kotlin `MapBuffer` interface, `ReadableMapBuffer`, and `WritableMapBuffer`, and adds cross-language JNI round-trip coverage in the serialization instrumentation test.

Changelog:
[Android][Added] - Add a dedicated `MapBufferList` type to `MapBuffer` for ordered lists of nested `MapBuffer`s

landed-with-radar-review

Reviewed By: zeyap

Differential Revision: D109848477

fbshipit-source-id: 7f590d5999d0cc4ee2d9d28cc34ae9220e442e18
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-07-03 01:41:41 -07:00
1 parent e7cadaf9f3
commit 6a957746f6
15 files changed
+39 -5

No files matched your search

@@ -3264,6 +3264,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -3173,6 +3173,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -3261,6 +3261,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -5499,6 +5499,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -5423,6 +5423,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -5496,6 +5496,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -2185,6 +2185,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -2121,6 +2121,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}
@@ -2182,6 +2182,7 @@ enum facebook::react::MapBuffer::DataType : uint16_t {
IntBuffer,
Long,
Map,
MapBufferList,
String,
}