Class Json

java.lang.Object
ai.webscraping.internal.Json

public final class Json extends Object
Centralised Jackson helpers. The ObjectMapper configuration lives here so the rest of the SDK never touches Jackson directly.
  • Method Details

    • read

      public static <T> T read(String body, Class<T> type)
    • read

      public static <T> T read(String body, com.fasterxml.jackson.core.type.TypeReference<T> type)
    • tryRead

      public static <T> T tryRead(String body, Class<T> type)
      Returns the parsed value, or null if the body is not valid JSON for the requested shape. Used for best-effort parsing of the API's error envelope where a non-JSON body should fall back silently.