public static String apply(String source, String patch, FieldMetaDataProvider fieldDataProvider)
            throws HyscaleException {

        if (StringUtils.isBlank(source)) {
            return patch;
        }

        if (StringUtils.isBlank(patch)) {
            return source;
        }
        JsonObject mergedJsonObject = null;
        try (JsonReader sourceJsonReader = Json.createReader(new StringReader(source)); JsonReader patchJsonReader = Json.createReader(new StringReader(patch));) {
            // Convert String to Json Object
            JsonObject sourceJson = sourceJsonReader.readObject();
            JsonObject patchJson = patchJsonReader.readObject();

            // Convert JSON Object to String
            mergedJsonObject = mergeJsonObjects(sourceJson, patchJson, fieldDataProvider);
            if (mergedJsonObject != null) {
                return mergedJsonObject.toString();
            }

        } catch (JsonParsingException e) {
            HyscaleException ex = new HyscaleException(e, CommonErrorCode.INVALID_JSON_FORMAT);
            logger.error("Invalid Json format for source or patch", ex);
            throw ex;
        }

        return null;

    }
Convert String input for source and patch to Json 
and calls {@link #mergeJsonObjects(JsonObject, JsonObject, FieldMetaDataProvider)}
Convert result of {@link #mergeJsonObjects(JsonObject, JsonObject, FieldMetaDataProvider)} to String

@param source
@param patch
@param fieldDataProvider
@return String - Json representation after merging source and patch
@throws HyscaleException
commons/src/main/java/io/hyscale/commons/framework/patch/StrategicPatch.java