Class ModelSerializer
- java.lang.Object
-
- software.amazon.smithy.model.shapes.ModelSerializer
-
public final class ModelSerializer extends java.lang.Object
Serializes aModel
to anObjectNode
.The serialized value sorts all map key-value pairs so that they contain a consistent key ordering, reducing noise in diffs based on serialized model.
After serializing to an ObjectNode, the node can then be serialized to formats like JSON, YAML, Ion, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelSerializer.Builder
Builder used to createModelSerializer
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModelSerializer.Builder
builder()
ObjectNode
serialize(Model model)
-
-
-
Method Detail
-
serialize
public ObjectNode serialize(Model model)
-
builder
public static ModelSerializer.Builder builder()
- Returns:
- Returns a builder used to create a
ModelSerializer
.
-
-