From 0e4830e0ede38ed37abc04fbe3e16da2049d1586 Mon Sep 17 00:00:00 2001 From: hkcomori Date: Fri, 10 May 2024 18:14:18 +0900 Subject: [PATCH] Add BarejsonFormat --- formats/BarejsonFormat.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 formats/BarejsonFormat.php diff --git a/formats/BarejsonFormat.php b/formats/BarejsonFormat.php new file mode 100644 index 00000000000..ccded499386 --- /dev/null +++ b/formats/BarejsonFormat.php @@ -0,0 +1,17 @@ +getItems()) != 1) { + throw new Exception('Unable to identify the target'); + } + $item = $this->getItems()[0]; + $content = $item->getContent() ?? ''; + $content = mb_convert_encoding($content, $this->getCharset(), 'UTF-8'); + return $content; + } +}