Class JoltSpecBuilder


  • public class JoltSpecBuilder
    extends java.lang.Object
    Builds a JoltSpec object containing a valid Jolt transform specification. This JoltSpec object can be reused for all transformations using the same specification.
    Author:
    https://github.com/mcweba [Marc-Andre Weber]
    • Constructor Summary

      Constructors 
      Constructor Description
      JoltSpecBuilder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JoltSpec buildSpec​(java.lang.String jsonSpec)
      See buildSpec(String, boolean) with false for param withMetadata
      static JoltSpec buildSpec​(java.lang.String jsonSpec, boolean withMetadata)
      Builds a JoltSpec object based on the provided string representation of the json spec.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JoltSpecBuilder

        public JoltSpecBuilder()
    • Method Detail

      • buildSpec

        public static JoltSpec buildSpec​(java.lang.String jsonSpec,
                                         boolean withMetadata)
                                  throws JoltSpecException
        Builds a JoltSpec object based on the provided string representation of the json spec. If an error occurs during the creation of the spec, a JoltSpecException is thrown.
        Parameters:
        jsonSpec - the string representation of the spec
        withMetadata - does the json input to use the spec against has meta data
        Returns:
        returns a JoltSpec
        Throws:
        JoltSpecException - when an error occurred during spec parsing