java.lang.Object
com.developer.nefarious.zjoule.plugin.login.utils.JsonValidator

public abstract class JsonValidator extends Object
Utility class for validating JSON strings.

This class provides a static method to check whether a given string is valid JSON. It uses the Google Gson library to attempt parsing the string and determine its validity.

This class is abstract to prevent instantiation.

  • Method Details

    • isValidJson

      public static boolean isValidJson(String json)
      Validates whether a given string is a well-formed JSON.
      Parameters:
      json - the string to validate.
      Returns:
      true if the string is valid JSON, false otherwise.