Skip to main content

Core Types

This page documents the public Java API for core types, generated from the Javadoc by the javadoc tool. Values are immutable, builders are concrete and fluent, validation runs when you call .build(), and typed getters read built values back.

Buildable

A concrete fluent builder that materializes one immutable Slack value.

Build

Builds and validates an immutable value.

public T build()

Returns: a defensive snapshot of the configured value

ThrowsWhen
ValidationExceptionif the configured value breaks a Slack Block Kit rule

Slackblocks

Package metadata shared with the conformance corpus.

SlackblocksJson

JSON serialization helpers for clients that do not use Slack's Java SDK.

Write — SlackObject

Serializes one slackblocks value or payload to compact JSON.

public static String write(SlackObject value)
ParameterDescription
valuea built slackblocks value

Returns: compact Slack-compatible JSON

Related types: SlackObject

Write — Collection<? extends SlackObject>

Serializes an ordered collection of slackblocks values, such as a list of blocks, to a compact JSON array.

public static String write(Collection<? extends SlackObject> values)
ParameterDescription
valuesbuilt slackblocks values

Returns: compact Slack-compatible JSON array

Related types: SlackObject

SlackObject

An immutable value that can be serialized to Slack's JSON wire format.

ToMap

Returns an immutable, JSON-compatible representation of this value.

public Map<String,Object> toMap()

Returns: the Slack wire representation

ToJson

Serializes this value to compact Slack-compatible JSON.

public default String toJson()

Returns: compact JSON containing this value