Class ParseContextSerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<ParseContext>
org.apache.tika.serialization.serdes.ParseContextSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class ParseContextSerializer extends com.fasterxml.jackson.databind.JsonSerializer<ParseContext>
Serializes ParseContext to JSON.

Typed objects from the context map are serialized under a "typed" key. JSON configs are serialized at the top level.

Example output:

 {
   "typed": {
     "handler-config": {"type": "XML", "parseMode": "RMETA"}
   },
   "metadata-filters": ["mock-upper-case-filter"]
 }
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(ParseContext parseContext, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers)
     

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ParseContextSerializer

      public ParseContextSerializer()
  • Method Details

    • serialize

      public void serialize(ParseContext parseContext, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<ParseContext>
      Throws:
      IOException