diff --git a/src/Data/ByteArray/Builder.hs b/src/Data/ByteArray/Builder.hs index 0344dff..7b187e0 100644 --- a/src/Data/ByteArray/Builder.hs +++ b/src/Data/ByteArray/Builder.hs @@ -460,9 +460,9 @@ shortTextUtf8 a = -- and JSON special characters will be escaped. Additionally, the -- result is surrounded by double quotes. For example: -- --- * @foo ==> "foo"@ --- * @\_"_/ ==> "\\_\"_/"@ --- * @helloworld ==> "hello\u001Bworld"@ (where is code point 0x1B) +-- * @foo ==\> "foo"@ (no escape sequences) +-- * @\\_"_\/ ==\> "\\\\_\\"_\/"@ (escapes backslashes and quotes) +-- * @hello\world ==> "hello\\u001Bworld"@ (where @\@ is code point 0x1B) shortTextJsonString :: ShortText -> Builder shortTextJsonString a = let !(ByteArray ba) = shortTextToByteArray a