From aaba07118596440c990698e4badc65943dfd8915 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Thu, 1 Jan 2026 16:39:45 +0100 Subject: [PATCH] Add MediaType.YAML_UTF_8 (see RFC 9512 for yaml.org) Added YAML media type constant for YAML format. --- guava/src/com/google/common/net/MediaType.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guava/src/com/google/common/net/MediaType.java b/guava/src/com/google/common/net/MediaType.java index 07732d9aa66f..ff618945af15 100644 --- a/guava/src/com/google/common/net/MediaType.java +++ b/guava/src/com/google/common/net/MediaType.java @@ -808,6 +808,14 @@ private static MediaType addKnownType(MediaType mediaType) { */ public static final MediaType FONT_WOFF2 = createConstant(FONT_TYPE, "woff2"); + /** + * Media type for the YAML Format, as standardized in RFC 9512 in February 2024. + * + * @since 33.6 + */ + public static final MediaType YAML_UTF_8 = createConstantUtf8(APPLICATION_TYPE, "yaml"); + private final String type; private final String subtype; private final ImmutableListMultimap parameters;