@ Override public Iterable < JsonObject > convertRecord ( JsonArray outputSchema , String strInputRecord , WorkUnitState workUnit ) throws DataConversionException { JsonParser jsonParser = new JsonParser ( ) ; JsonObject inputRecord = ( JsonObject ) jsonParser . parse ( strInputRecord ) ; if ( ! this . unpackComplexSchemas ) { return new SingleRecordIterable <> ( inputRecord ) ; } JsonSchema schema = new JsonSchema ( outputSchema ) ; JsonObject rec = parse ( inputRecord , schema ) ; return new SingleRecordIterable ( rec ) ; }
Takes in a record with format String and Uses the inputSchema to convert the record to a JsonObject