Class JdbcJsonOutput

All Implemented Interfaces:
ComponentLifecycle, ComponentLifecycleExtension, ResultSetTranslator
Direct Known Subclasses:
JdbcJsonArrayOutput, JdbcJsonOutputLines

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

Takes the first result set and writes out each row as part of a json array. 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-output which is the preferred alternative to the fully qualified classname when building your configuration.