Module bus.setting

Class Toml

java.lang.Object
org.miaixz.bus.setting.metric.toml.Toml

public class Toml extends Object
A utility class providing static methods for reading and writing TOML data.
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

  • Constructor Details

    • Toml

      public Toml()
  • Method Details

    • read

      public static Map<String,Object> read(org.miaixz.bus.core.io.resource.Resource resource)
      Reads and parses TOML data from a given Resource.
      Parameters:
      resource - The resource containing the TOML data.
      Returns:
      A map representing the parsed TOML data.
    • write

      public static void write(Map<String,Object> data, Writer writer)
      Writes the given data map to a Writer in TOML format.
      Parameters:
      data - The map of data to be written.
      writer - The writer to which the TOML data will be written.