All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stackify.api.common.util.SkipJsonUtil Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
package com.stackify.api.common.util;

import lombok.experimental.UtilityClass;

/**
 * Utility to append ' #SKIPJSON' to a string message if JSON is detected.
 *
 * @author Darin Howard
 */
@UtilityClass
public class SkipJsonUtil {

    public static String execute(final String source) {
        // check if message contains JSON
        if (source != null &&
                source.contains("{") &&
                source.contains("}")) {
            return source + " #SKIPJSON";
        }

        return source;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy