We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c27450b commit 086b039Copy full SHA for 086b039
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORGenerator.java
@@ -622,8 +622,13 @@ public final void writeStartObject(Object forValue) throws IOException {
622
}
623
624
public final void writeStartObject(int elementsToWrite) throws IOException {
625
+ writeStartObject(null, elementsToWrite);
626
+ }
627
+
628
+ @Override
629
+ public void writeStartObject(Object forValue, int elementsToWrite) throws IOException {
630
_verifyValueWrite("start an object");
- _streamWriteContext = _streamWriteContext.createChildObjectContext(null);
631
+ _streamWriteContext = _streamWriteContext.createChildObjectContext(forValue);
632
_pushRemainingElements();
633
_currentRemainingElements = elementsToWrite;
634
_writeLengthMarker(PREFIX_TYPE_OBJECT, elementsToWrite);
0 commit comments