plain

public static String plain(Object value)

As a pet file writes it: text as is (empty text as ""), whole numbers without a trailing .0, .nan and .inf, maps as { key: value } and a missing value as nothing.