Class SchemaJson
java.lang.Object
com.darkcollective.relix.semantic.json.SchemaJson
Serializes a
Schema to JSON, shared by the logical-plan
(LogicalPlanJson) and physical-plan
(relix-plan's PhysicalPlanJson) serializers so the encoding is
defined once.
A schema is rendered as an object:
{ "open": false, "columns": [ { "name": "id", "type": "N" }, … ] }
An open (schema-on-read) schema has "open": true and an empty
columns array. Column type codes use ScalarType.code().-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwrite(JsonWriter writer, Schema schema) Writesschemaas a JSON object value intowriter.
-
Method Details
-
write
Writesschemaas a JSON object value intowriter.- Parameters:
writer- the writer to emit into; must not be nullschema- the schema to serialize; must not be null
-