Class BodyParserEngineJson

    • Constructor Detail

      • BodyParserEngineJson

        @Inject
        public BodyParserEngineJson​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • invoke

        public <T> T invoke​(Context context,
                            Class<T> classOfT)
        Description copied from interface: BodyParserEngine
        Invoke the parser and get back a Java object populated with the content of this request. MUST BE THREAD SAFE TO CALL!
        Specified by:
        invoke in interface BodyParserEngine
        Parameters:
        context - The context
        classOfT - The class we expect
        Returns:
        The object instance populated with all values from raw request
      • getContentType

        public String getContentType()
        Description copied from interface: BodyParserEngine
        The content type this BodyParserEngine can handle MUST BE THREAD SAFE TO CALL!
        Specified by:
        getContentType in interface BodyParserEngine
        Returns:
        the content type. this parser can handle - eg. "application/json"