Package org.apache.beam.sdk.transforms
Class ToJson<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PCollection<String>>
 
org.apache.beam.sdk.transforms.ToJson<T>
- All Implemented Interfaces:
- Serializable,- HasDisplayData
Creates a 
PTransform that serializes UTF-8 JSON objects from a Schema-aware
 PCollection (i.e. PCollection.hasSchema() returns true). JSON format is compatible with
 JsonToRow.
 For specifics of JSON serialization see RowJson.RowJsonSerializer.
- See Also:
- 
Field SummaryFields inherited from class org.apache.beam.sdk.transforms.PTransformannotations, displayData, name, resourceHints
- 
Method SummaryModifier and TypeMethodDescriptionexpand(PCollection<T> rows) Override this method to specify how thisPTransformshould be expanded on the givenInputT.static <T> ToJson<T> of()Methods inherited from class org.apache.beam.sdk.transforms.PTransformaddAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
- 
Method Details- 
of
- 
expandDescription copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods). - Specified by:
- expandin class- PTransform<PCollection<T>,- PCollection<String>> 
 
 
-