Class JdbcJsonOutputLines

  • All Implemented Interfaces:
    ComponentLifecycle, ComponentLifecycleExtension, ResultSetTranslator

    @ComponentProfile(summary="Output the first resultset as JSON line-by-line",
                      tag="json,jdbc,line")
    public class JdbcJsonOutputLines
    extends JdbcJsonOutput
    Implementation of ResultSetTranslator that outputs the first result set as json.

    Takes the first result set and writes out each row as its own JSON object. You should use this output implementation if you are executing a SELECT via JdbcDataQueryService.

     
        { "firstName": "John", "lastName": "Doe" }
        { "firstName": "Anna", "lastName": "Smith" }
        { "firstName": "Peter", "lastName": "Jones" }
     
     

    In the adapter configuration file this class is aliased as jdbc-json-first-resultset-line-output which is the preferred alternative to the fully qualified classname when building your configuration.