Skip to content

Commit

Permalink
Remove writeShape from ShapeSerializer
Browse files Browse the repository at this point in the history
SerializableShapes can just call this themselves, and this reduces
the work needed to implement a serializer.
  • Loading branch information
mtdowling committed Apr 14, 2024
1 parent 8b2a00e commit 3fd35da
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.time.Instant;
import java.util.function.Consumer;
import software.amazon.smithy.java.runtime.core.schema.SdkSchema;
import software.amazon.smithy.java.runtime.core.schema.SerializableShape;
import software.amazon.smithy.java.runtime.core.serde.document.Document;

/**
Expand Down Expand Up @@ -138,15 +137,6 @@ public interface ShapeSerializer extends Flushable {
*/
void writeTimestamp(SdkSchema schema, Instant value);

/**
* Serialize a shape, document, or any other kind of value that emits the Smithy data model into this serializer.
*
* @param value Shape to serialize.
*/
default void writeShape(SerializableShape value) {
value.serialize(this);
}

/**
* Serialize a document shape.
*
Expand Down

0 comments on commit 3fd35da

Please sign in to comment.