Skip to content

Commit

Permalink
Add one more writeStartObject() overload for Smile backend (similar…
Browse files Browse the repository at this point in the history
… to CBOR)
  • Loading branch information
cowtowncoder committed Sep 7, 2022
1 parent 5ef0368 commit 169d2fb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,15 @@ public final void writeStartObject(Object forValue) throws IOException
_streamWriteContext = ctxt;
_writeByte(TOKEN_LITERAL_START_OBJECT);
}


@Override // since 2.14
public void writeStartObject(Object forValue, int elementsToWrite) throws IOException {
_verifyValueWrite("start an object");
SmileWriteContext ctxt = _streamWriteContext.createChildObjectContext(forValue);
_streamWriteContext = ctxt;
_writeByte(TOKEN_LITERAL_START_OBJECT);
}

@Override
public final void writeEndObject() throws IOException
{
Expand Down

0 comments on commit 169d2fb

Please sign in to comment.