Class LargeJsonArrayPathSplitter

  • All Implemented Interfaces:
    MessageSplitter

    @ComponentProfile(summary="Split an arbitrarily large JSON array, with use of simple element traversal.",
                      since="3.8.4",
                      tag="json,splitting")
    public class LargeJsonArrayPathSplitter
    extends LargeJsonArraySplitter
    Split an arbitrarily large JSON array.

    This allows you to split via simple element traversal, so the path cannot be assumed to be an XPath. /path/to/repeating/element would be fine, but //repeating/element would not. It works based on JsonParser and navigates based on JsonToken.START_OBJECT events only.

    Note: tested with an 85Mb file containing an array of >15k JSON objects

    In the adapter configuration file this class is aliased as large-json-array-path-splitter which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • LargeJsonArrayPathSplitter

        public LargeJsonArrayPathSplitter()
    • Method Detail

      • getPath

        public java.lang.String getPath()
      • setPath

        public void setPath​(java.lang.String path)
        Set the xpath-alike path to the element on which you want to split.

        Note that this is only a pseudo-xpath evaluator as it only allows simple element traversal and not any XPath functions. /path/to/repeating/element would be fine, but //repeating/element would not. It works based on JsonParser and navigates based on JsonToken.START_OBJECT events only.

        Parameters:
        path - the path.
      • getSuppressPathNotFound

        public java.lang.Boolean getSuppressPathNotFound()
      • setSuppressPathNotFound

        public void setSuppressPathNotFound​(java.lang.Boolean suppressPathNotFound)
      • getSuppressPathNotAnArray

        public java.lang.Boolean getSuppressPathNotAnArray()
      • setSuppressPathNotAnArray

        public void setSuppressPathNotAnArray​(java.lang.Boolean suppressPathNotAnArray)